BUILD.gn 230 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944
  1. # Copyright 2014 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/config/android/config.gni")
  5. import("//build/config/arm.gni")
  6. import("//build/config/dcheck_always_on.gni")
  7. import("//build/config/host_byteorder.gni")
  8. import("//build/config/mips.gni")
  9. import("//build/config/sanitizers/sanitizers.gni")
  10. import("//build_overrides/build.gni")
  11. if (is_android) {
  12. import("//build/config/android/rules.gni")
  13. }
  14. import("gni/snapshot_toolchain.gni")
  15. import("gni/v8.gni")
  16. # Specifies if the target build is a simulator build. Comparing target cpu
  17. # with v8 target cpu to not affect simulator builds for making cross-compile
  18. # snapshots.
  19. target_is_simulator = (target_cpu != v8_target_cpu && !v8_multi_arch_build) ||
  20. (current_cpu != v8_current_cpu && v8_multi_arch_build)
  21. # For faster Windows builds. See https://crbug.com/v8/8475.
  22. emit_builtins_as_inline_asm = is_win && is_clang
  23. declare_args() {
  24. # Print to stdout on Android.
  25. v8_android_log_stdout = false
  26. # Dynamically set an additional dependency from v8/custom_deps.
  27. v8_custom_deps = ""
  28. # Turns on all V8 debug features. Enables running V8 in a pseudo debug mode
  29. # within a release Chrome.
  30. v8_enable_debugging_features = is_debug
  31. # Sets -DV8_ENABLE_FUTURE.
  32. v8_enable_future = false
  33. # Sets -DSYSTEM_INSTRUMENTATION. Enables OS-dependent event tracing
  34. v8_enable_system_instrumentation = (is_win || is_mac) && !v8_use_perfetto
  35. # Sets the GUID for the ETW provider
  36. v8_etw_guid = ""
  37. # Sets -DVERIFY_HEAP.
  38. v8_enable_verify_heap = ""
  39. # Sets -DVERIFY_PREDICTABLE
  40. v8_enable_verify_predictable = false
  41. # Enable compiler warnings when using V8_DEPRECATED apis.
  42. v8_deprecation_warnings = true
  43. # Enable compiler warnings when using V8_DEPRECATE_SOON apis.
  44. v8_imminent_deprecation_warnings = true
  45. # Embeds the given script into the snapshot.
  46. v8_embed_script = ""
  47. # Allows the embedder to add a custom suffix to the version string.
  48. v8_embedder_string = ""
  49. # Sets -dENABLE_DISASSEMBLER.
  50. v8_enable_disassembler = ""
  51. # Sets the number of internal fields on promise objects.
  52. v8_promise_internal_field_count = 0
  53. # Sets -dENABLE_GDB_JIT_INTERFACE.
  54. v8_enable_gdbjit = ""
  55. # Sets -dENABLE_VTUNE_JIT_INTERFACE.
  56. v8_enable_vtunejit = false
  57. # Sets -dENABLE_VTUNE_TRACEMARK.
  58. v8_enable_vtunetracemark = false
  59. # Sets -dENABLE_HUGEPAGE
  60. v8_enable_hugepage = false
  61. # Sets -dENABLE_HANDLE_ZAPPING.
  62. v8_enable_handle_zapping = !is_on_release_branch || is_debug
  63. # Enable slow dchecks.
  64. v8_enable_slow_dchecks = false
  65. # Enable fast mksnapshot runs.
  66. v8_enable_fast_mksnapshot = false
  67. # Optimize code for Torque executable, even during a debug build.
  68. v8_enable_fast_torque = ""
  69. # Enable the registration of unwinding info for Windows x64 and ARM64.
  70. v8_win64_unwinding_info = true
  71. # Enable code comments for builtins in the snapshot (impacts performance).
  72. # This also enables v8_code_comments.
  73. v8_enable_snapshot_code_comments = false
  74. # Allow runtime-enabled code comments (with --code-comments). Enabled by
  75. # default in debug builds.
  76. # Sets -dV8_CODE_COMMENTS
  77. v8_code_comments = ""
  78. # Allow runtime-enabled debug code (with --debug-code). Enabled by default in
  79. # debug builds.
  80. # Sets -dV8_ENABLE_DEBUG_CODE
  81. v8_enable_debug_code = ""
  82. # Enable native counters from the snapshot (impacts performance, sets
  83. # -dV8_SNAPSHOT_NATIVE_CODE_COUNTERS).
  84. # This option will generate extra code in the snapshot to increment counters,
  85. # as per the --native-code-counters flag.
  86. v8_enable_snapshot_native_code_counters = ""
  87. # Enable code-generation-time checking of types in the CodeStubAssembler.
  88. v8_enable_verify_csa = false
  89. # Enable pointer compression (sets -dV8_COMPRESS_POINTERS).
  90. v8_enable_pointer_compression = ""
  91. v8_enable_pointer_compression_shared_cage = ""
  92. v8_enable_31bit_smis_on_64bit_arch = false
  93. # Sets -dOBJECT_PRINT.
  94. v8_enable_object_print = ""
  95. # Sets -dV8_TRACE_MAPS.
  96. v8_enable_trace_maps = ""
  97. # Sets -dV8_ENABLE_CHECKS.
  98. v8_enable_v8_checks = ""
  99. # Sets -dV8_TRACE_UNOPTIMIZED.
  100. v8_enable_trace_unoptimized = ""
  101. v8_enable_trace_ignition = false
  102. v8_enable_trace_baseline_exec = false
  103. # Sets -dV8_TRACE_FEEDBACK_UPDATES.
  104. v8_enable_trace_feedback_updates = false
  105. # Sets -dV8_ATOMIC_OBJECT_FIELD_WRITES and turns all field write operations
  106. # into relaxed atomic operations.
  107. v8_enable_atomic_object_field_writes = ""
  108. # Controls the default value of v8_enable_concurrent_marking_state. See the
  109. # default setting code below.
  110. v8_enable_concurrent_marking = true
  111. # Sets -dV8_IGNITION_DISPATCH_COUNTING.
  112. # Enables counting frequencies of bytecode dispatches. After building in this
  113. # configuration, subsequent runs of d8 can output frequencies for each pair
  114. # of (current, next) bytecode instructions executed if you specify
  115. # --trace-ignition-dispatches-output-file, or can generate a JS object with
  116. # those frequencies if you run with --expose-ignition-statistics and call the
  117. # extension function getIgnitionDispatchCounters().
  118. v8_enable_ignition_dispatch_counting = false
  119. # Runs mksnapshot with --turbo-profiling. After building in this
  120. # configuration, any subsequent run of d8 will output information about usage
  121. # of basic blocks in builtins.
  122. v8_enable_builtins_profiling = false
  123. # Runs mksnapshot with --turbo-profiling-verbose. After building in this
  124. # configuration, any subsequent run of d8 will output information about usage
  125. # of basic blocks in builtins, including the schedule and disassembly of all
  126. # used builtins.
  127. v8_enable_builtins_profiling_verbose = false
  128. # Provides the given V8 log file as an input to mksnapshot, where it can be
  129. # used for profile-guided optimization of builtins.
  130. #
  131. # To do profile-guided optimizations of builtins:
  132. # 1. Build with v8_enable_builtins_profiling = true
  133. # 2. Run your chosen workload with the --turbo-profiling-log-builtins flag.
  134. # For Chrome, the invocation might look like this:
  135. # chrome --no-sandbox --disable-extensions
  136. # --js-flags="--turbo-profiling-log-builtins --logfile=path/to/v8.log"
  137. # "http://localhost/test-suite"
  138. # 3. Optionally repeat step 2 for additional workloads, and concatenate all of
  139. # the resulting log files into a single file.
  140. # 4. Build again with v8_builtins_profiling_log_file set to the file created
  141. # in steps 2-3.
  142. v8_builtins_profiling_log_file = ""
  143. # Enables various testing features.
  144. v8_enable_test_features = ""
  145. # Enable short builtins call instruction sequences by un-embedding builtins.
  146. # Sets -dV8_SHORT_BUILTIN_CALLS
  147. v8_enable_short_builtin_calls = ""
  148. # Enable support for external code range relative to the pointer compression
  149. # cage.
  150. # Sets -dV8_EXTERNAL_CODE_SPACE
  151. v8_enable_external_code_space = ""
  152. # Enable the Maglev compiler.
  153. # Sets -dV8_ENABLE_MAGLEV
  154. v8_enable_maglev = ""
  155. # With post mortem support enabled, metadata is embedded into libv8 that
  156. # describes various parameters of the VM for use by debuggers. See
  157. # tools/gen-postmortem-metadata.py for details.
  158. v8_postmortem_support = false
  159. # Use Siphash as added protection against hash flooding attacks.
  160. v8_use_siphash = false
  161. # Switches off inlining in V8.
  162. v8_no_inline = false
  163. # Override OS page size when generating snapshot
  164. v8_os_page_size = "0"
  165. # Similar to vfp but on MIPS.
  166. v8_can_use_fpu_instructions = true
  167. # Similar to the ARM hard float ABI but on MIPS.
  168. v8_use_mips_abi_hardfloat = true
  169. # Controls the threshold for on-heap/off-heap Typed Arrays.
  170. v8_typed_array_max_size_in_heap = 64
  171. v8_enable_gdbjit = ((v8_current_cpu == "x86" || v8_current_cpu == "x64") &&
  172. (is_linux || is_chromeos || is_mac)) ||
  173. (v8_current_cpu == "ppc64" && (is_linux || is_chromeos))
  174. # Check that each header can be included in isolation (requires also
  175. # setting the "check_v8_header_includes" gclient variable to run a
  176. # specific hook).
  177. v8_check_header_includes = false
  178. # Enable sharing read-only space across isolates.
  179. # Sets -DV8_SHARED_RO_HEAP.
  180. v8_enable_shared_ro_heap = ""
  181. # Enable lazy source positions by default.
  182. v8_enable_lazy_source_positions = true
  183. # Enable third party HEAP library
  184. v8_enable_third_party_heap = false
  185. # Libaries used by third party heap
  186. v8_third_party_heap_libs = []
  187. # Source code used by third party heap
  188. v8_third_party_heap_files = []
  189. # Disable write barriers when GCs are non-incremental and
  190. # heap has single generation.
  191. v8_disable_write_barriers = false
  192. # Ensure that write barriers are always used.
  193. # Useful for debugging purposes.
  194. v8_enable_unconditional_write_barriers = false
  195. # Redirect allocation in young generation so that there will be
  196. # only one single generation.
  197. v8_enable_single_generation = ""
  198. # Use token threaded dispatch for the regular expression interpreter.
  199. # Use switch-based dispatch if this is false
  200. v8_enable_regexp_interpreter_threaded_dispatch = true
  201. # Enable additional targets necessary for verification of torque
  202. # file generation
  203. v8_verify_torque_generation_invariance = false
  204. # Generate comments describing the Torque intermediate representation.
  205. v8_annotate_torque_ir = false
  206. # Enable snapshot compression (enabled by default for desktop) devices.
  207. v8_enable_snapshot_compression =
  208. target_os == "android" || target_os == "chromeos" ||
  209. target_os == "fuchsia"
  210. # Enable control-flow integrity features, such as pointer authentication for
  211. # ARM64.
  212. v8_control_flow_integrity = false
  213. # Enable heap reservation of size 4GB. Only possible for 64bit archs.
  214. cppgc_enable_caged_heap =
  215. v8_current_cpu == "x64" || v8_current_cpu == "arm64" ||
  216. v8_current_cpu == "loong64"
  217. # Enables additional heap verification phases and checks.
  218. cppgc_enable_verify_heap = ""
  219. # Enable allocations during prefinalizer invocations.
  220. cppgc_allow_allocations_in_prefinalizers = false
  221. # Enable V8 zone compression experimental feature.
  222. # Sets -DV8_COMPRESS_ZONES.
  223. v8_enable_zone_compression = ""
  224. # Enable the experimental V8 sandbox.
  225. # Sets -DV8_SANDBOX.
  226. v8_enable_sandbox = ""
  227. # Enable external pointer sandboxing. Requires v8_enable_sandbox.
  228. # Sets -DV8_SANDBOXED_EXTERNAL_POINRTERS.
  229. v8_enable_sandboxed_external_pointers = false
  230. # Enable sandboxed pointers. Requires v8_enable_sandbox.
  231. # Sets -DV8_SANDBOXED_POINTERS.
  232. v8_enable_sandboxed_pointers = false
  233. # Enable all available sandbox features. Implies v8_enable_sandbox.
  234. v8_enable_sandbox_future = false
  235. # Experimental feature for collecting per-class zone memory stats.
  236. # Requires use_rtti = true
  237. v8_enable_precise_zone_stats = false
  238. # Experimental feature that uses SwissNameDictionary instead of NameDictionary
  239. # as the backing store for all dictionary mode objects.
  240. v8_enable_swiss_name_dictionary = false
  241. # If enabled then macro definitions that are used in externally visible
  242. # header files are placed in a separate header file v8-gn.h.
  243. v8_generate_external_defines_header = false
  244. # Experimental feature for tracking constness of properties in non-global
  245. # dictionaries. Enabling this also always keeps prototypes in dict mode,
  246. # meaning that they are not switched to fast mode.
  247. # Sets -DV8_DICT_PROPERTY_CONST_TRACKING
  248. v8_dict_property_const_tracking = false
  249. # Enable map packing & unpacking (sets -dV8_MAP_PACKING).
  250. v8_enable_map_packing = false
  251. # Allow for JS promise hooks (instead of just C++).
  252. v8_enable_javascript_promise_hooks = false
  253. # Enable allocation folding globally (sets -dV8_ALLOCATION_FOLDING).
  254. # When it's disabled, the --turbo-allocation-folding runtime flag will be ignored.
  255. v8_enable_allocation_folding = true
  256. # Enable runtime verification of heap snapshots produced for devtools.
  257. v8_enable_heap_snapshot_verify = ""
  258. # Enable global allocation site tracking.
  259. v8_allocation_site_tracking = true
  260. # TODO(cbruni, v8:12302): Remove once API is migrated
  261. # Enable legacy mode for ScriptOrModule's lifetime. By default it's a
  262. # temporary object, if enabled it will be kept alive by the parent Script.
  263. # This is only used by nodejs.
  264. v8_scriptormodule_legacy_lifetime = false
  265. # Change code emission and runtime features to be CET shadow-stack compliant
  266. # (incomplete and experimental).
  267. v8_enable_cet_shadow_stack = false
  268. # Get VMEX priviledge at startup.
  269. # It allows to run V8 without "deprecated-ambient-replace-as-executable".
  270. # Sets -DV8_USE_VMEX_RESOURCE.
  271. # TODO(victorgomes): Remove this flag once Chormium no longer needs
  272. # the deprecated feature.
  273. v8_fuchsia_use_vmex_resource = is_fuchsia && !build_with_chromium
  274. }
  275. # Derived defaults.
  276. if (cppgc_enable_verify_heap == "") {
  277. cppgc_enable_verify_heap = v8_enable_debugging_features || dcheck_always_on
  278. }
  279. if (v8_enable_verify_heap == "") {
  280. v8_enable_verify_heap = v8_enable_debugging_features
  281. }
  282. if (v8_enable_object_print == "") {
  283. v8_enable_object_print = v8_enable_debugging_features
  284. }
  285. if (v8_enable_disassembler == "") {
  286. v8_enable_disassembler = v8_enable_debugging_features
  287. }
  288. if (v8_enable_trace_maps == "") {
  289. v8_enable_trace_maps = v8_enable_debugging_features
  290. }
  291. if (v8_enable_test_features == "") {
  292. v8_enable_test_features = v8_enable_debugging_features || dcheck_always_on
  293. }
  294. if (v8_enable_v8_checks == "") {
  295. v8_enable_v8_checks = v8_enable_debugging_features
  296. }
  297. if (v8_enable_heap_snapshot_verify == "") {
  298. v8_enable_heap_snapshot_verify =
  299. v8_enable_debugging_features || dcheck_always_on
  300. }
  301. if (v8_enable_snapshot_code_comments) {
  302. assert(v8_code_comments == true || v8_code_comments == "",
  303. "v8_enable_snapshot_code_comments conflicts with v8_code_comments.")
  304. v8_code_comments = true
  305. } else if (v8_code_comments == "") {
  306. v8_code_comments = v8_enable_debugging_features
  307. }
  308. if (v8_enable_debug_code == "") {
  309. v8_enable_debug_code = v8_enable_debugging_features
  310. }
  311. if (v8_enable_snapshot_native_code_counters == "") {
  312. v8_enable_snapshot_native_code_counters = v8_enable_debugging_features
  313. }
  314. if (v8_enable_pointer_compression == "") {
  315. v8_enable_pointer_compression =
  316. v8_current_cpu == "arm64" || v8_current_cpu == "x64"
  317. }
  318. if (v8_enable_pointer_compression_shared_cage == "") {
  319. v8_enable_pointer_compression_shared_cage = v8_enable_pointer_compression
  320. }
  321. if (v8_enable_fast_torque == "") {
  322. v8_enable_fast_torque = v8_enable_fast_mksnapshot
  323. }
  324. if (v8_enable_zone_compression == "") {
  325. v8_enable_zone_compression = false
  326. }
  327. if (v8_enable_short_builtin_calls == "") {
  328. v8_enable_short_builtin_calls =
  329. v8_current_cpu == "x64" || (!is_android && v8_current_cpu == "arm64")
  330. }
  331. if (v8_enable_external_code_space == "") {
  332. v8_enable_external_code_space =
  333. v8_enable_pointer_compression &&
  334. (v8_current_cpu == "x64" ||
  335. (target_os != "fuchsia" && v8_current_cpu == "arm64"))
  336. }
  337. if (v8_enable_maglev == "") {
  338. v8_enable_maglev = v8_current_cpu == "x64" && v8_enable_pointer_compression
  339. }
  340. if (v8_enable_single_generation == "") {
  341. v8_enable_single_generation = v8_disable_write_barriers
  342. }
  343. if (v8_enable_atomic_object_field_writes == "") {
  344. v8_enable_atomic_object_field_writes = v8_enable_concurrent_marking
  345. }
  346. if (v8_enable_third_party_heap) {
  347. v8_disable_write_barriers = true
  348. v8_enable_single_generation = true
  349. v8_enable_shared_ro_heap = false
  350. v8_enable_pointer_compression = false
  351. v8_enable_pointer_compression_shared_cage = false
  352. v8_enable_allocation_folding = false
  353. }
  354. if (v8_enable_single_generation) {
  355. v8_allocation_site_tracking = false
  356. }
  357. assert(!v8_enable_concurrent_marking || v8_enable_atomic_object_field_writes,
  358. "Concurrent marking requires atomic object field writes.")
  359. if (v8_enable_trace_unoptimized == "") {
  360. v8_enable_trace_unoptimized =
  361. v8_enable_trace_ignition || v8_enable_trace_baseline_exec
  362. }
  363. assert(!v8_enable_trace_ignition || v8_enable_trace_unoptimized,
  364. "Ignition tracing requires unoptimized tracing to be enabled.")
  365. assert(!v8_enable_trace_baseline_exec || v8_enable_trace_unoptimized,
  366. "Baseline tracing requires unoptimized tracing to be enabled.")
  367. # Toggle pointer compression for correctness fuzzing when building the
  368. # clang_x64_pointer_compression toolchain. We'll correctness-compare the
  369. # default build with the clang_x64_pointer_compression build.
  370. if (v8_multi_arch_build &&
  371. rebase_path(get_label_info(":d8", "root_out_dir"), root_build_dir) ==
  372. "clang_x64_pointer_compression") {
  373. v8_enable_pointer_compression = !v8_enable_pointer_compression
  374. v8_enable_pointer_compression_shared_cage = v8_enable_pointer_compression
  375. v8_enable_external_code_space = v8_enable_pointer_compression
  376. }
  377. # Check if it is a Chromium build and activate PAC/BTI if needed.
  378. # TODO(cavalcantii): have a single point of integration with PAC/BTI flags.
  379. if (build_with_chromium && v8_current_cpu == "arm64" &&
  380. (arm_control_flow_integrity == "standard" ||
  381. arm_control_flow_integrity == "pac")) {
  382. v8_control_flow_integrity = true
  383. }
  384. if (v8_enable_short_builtin_calls &&
  385. ((!v8_enable_pointer_compression && v8_current_cpu != "x64") ||
  386. v8_control_flow_integrity)) {
  387. # Disable short calls when pointer compression is not enabled.
  388. # Or when CFI is enabled (until the CFI-related issues are fixed), except x64,
  389. # where short builtin calls can still be enabled if the code range is
  390. # guaranteed to be close enough to embedded builtins.
  391. v8_enable_short_builtin_calls = false
  392. }
  393. if (v8_enable_shared_ro_heap == "") {
  394. v8_enable_shared_ro_heap = !v8_enable_pointer_compression ||
  395. v8_enable_pointer_compression_shared_cage
  396. }
  397. if (v8_enable_sandbox == "") {
  398. # TODO(saelo, v8:11880) remove dependency on v8_enable_external_code_space
  399. # once that is enabled everywhere by default.
  400. v8_enable_sandbox =
  401. build_with_chromium && v8_enable_pointer_compression_shared_cage &&
  402. v8_enable_external_code_space
  403. }
  404. # Enable all available sandbox features if sandbox future is enabled.
  405. if (v8_enable_sandbox_future) {
  406. v8_enable_sandboxed_pointers = true
  407. v8_enable_sandboxed_external_pointers = true
  408. v8_enable_sandbox = true
  409. }
  410. assert(!v8_disable_write_barriers || v8_enable_single_generation,
  411. "Disabling write barriers works only with single generation")
  412. assert(v8_current_cpu == "arm64" || !v8_control_flow_integrity,
  413. "Control-flow integrity is only supported on arm64")
  414. if (v8_enable_shared_ro_heap && v8_enable_pointer_compression &&
  415. !v8_enable_pointer_compression_shared_cage) {
  416. assert(
  417. is_linux || is_chromeos || is_android,
  418. "Sharing read-only heap with pointer compression is only supported on Linux or Android")
  419. }
  420. assert(!v8_enable_map_packing || !v8_enable_pointer_compression,
  421. "Map packing does not support pointer compression")
  422. assert(!v8_enable_map_packing || v8_current_cpu == "x64",
  423. "Map packing is only supported on x64")
  424. assert(!v8_enable_external_code_space || v8_enable_pointer_compression,
  425. "External code space feature requires pointer compression")
  426. assert(!v8_enable_sandbox || v8_enable_pointer_compression_shared_cage,
  427. "The sandbox requires the shared pointer compression cage")
  428. assert(!v8_enable_sandbox || v8_enable_external_code_space,
  429. "The sandbox requires the external code space")
  430. assert(!v8_enable_sandboxed_pointers || v8_enable_sandbox,
  431. "Sandboxed pointers require the sandbox")
  432. assert(!v8_enable_sandboxed_external_pointers || v8_enable_sandbox,
  433. "Sandboxed external pointers require the sandbox")
  434. assert(
  435. !v8_enable_pointer_compression_shared_cage || v8_enable_pointer_compression,
  436. "Can't share a pointer compression cage if pointers aren't compressed")
  437. assert(
  438. !v8_enable_pointer_compression_shared_cage || v8_current_cpu == "x64" ||
  439. v8_current_cpu == "arm64" || v8_current_cpu == "riscv64",
  440. "Sharing a pointer compression cage is only supported on x64,arm64 and riscv64")
  441. assert(!v8_enable_unconditional_write_barriers || !v8_disable_write_barriers,
  442. "Write barriers can't be both enabled and disabled")
  443. assert(!cppgc_enable_caged_heap || v8_current_cpu == "x64" ||
  444. v8_current_cpu == "arm64" || v8_current_cpu == "loong64",
  445. "CppGC caged heap requires 64bit platforms")
  446. assert(!cppgc_enable_young_generation || cppgc_enable_caged_heap,
  447. "Young generation in CppGC requires caged heap")
  448. if (v8_enable_single_generation == true) {
  449. assert(
  450. v8_enable_unconditional_write_barriers || v8_disable_write_barriers,
  451. "Requires unconditional write barriers or none (which disables incremental marking)")
  452. }
  453. assert(!v8_enable_conservative_stack_scanning || v8_enable_single_generation,
  454. "Conservative stack scanning requires single generation")
  455. if (v8_fuchsia_use_vmex_resource) {
  456. assert(target_os == "fuchsia", "VMEX resource only available on Fuchsia")
  457. }
  458. v8_random_seed = "314159265"
  459. v8_toolset_for_shell = "host"
  460. ###############################################################################
  461. # Configurations
  462. #
  463. config("internal_config_base") {
  464. # Only targets in this file and its subdirs can depend on this.
  465. visibility = [ "./*" ]
  466. configs = [ ":v8_tracing_config" ]
  467. include_dirs = [
  468. ".",
  469. "include",
  470. "$target_gen_dir",
  471. "$target_gen_dir/include",
  472. ]
  473. }
  474. config("internal_config") {
  475. defines = []
  476. # Only targets in this file and its subdirs can depend on this.
  477. visibility = [ "./*" ]
  478. configs = [
  479. "//build/config/compiler:wexit_time_destructors",
  480. ":internal_config_base",
  481. ":v8_header_features",
  482. ":cppgc_header_features",
  483. ]
  484. if (is_component_build) {
  485. defines += [ "BUILDING_V8_SHARED" ]
  486. }
  487. if (v8_current_cpu == "riscv64") {
  488. libs = [ "atomic" ]
  489. }
  490. }
  491. # Should be applied to all targets that write trace events.
  492. config("v8_tracing_config") {
  493. if (v8_use_perfetto) {
  494. include_dirs = [
  495. "third_party/perfetto/include",
  496. "$root_gen_dir/third_party/perfetto",
  497. "$root_gen_dir/third_party/perfetto/build_config",
  498. ]
  499. }
  500. }
  501. # This config should be applied to code using the libplatform.
  502. config("libplatform_config") {
  503. include_dirs = [ "include" ]
  504. if (is_component_build) {
  505. defines = [ "USING_V8_PLATFORM_SHARED" ]
  506. }
  507. }
  508. # This config should be applied to code using the libbase.
  509. config("libbase_config") {
  510. if (is_component_build) {
  511. defines = [ "USING_V8_BASE_SHARED" ]
  512. }
  513. libs = []
  514. if (is_android && current_toolchain != host_toolchain) {
  515. libs += [ "log" ]
  516. }
  517. include_dirs = [ "$target_gen_dir/include" ]
  518. }
  519. # Standalone cppgc cannot be built within chrome or with perfetto.
  520. assert(!cppgc_is_standalone || !build_with_chromium)
  521. assert(!cppgc_is_standalone || !v8_use_perfetto)
  522. # This config should be applied to code using the cppgc_base.
  523. config("cppgc_base_config") {
  524. defines = []
  525. if (cppgc_is_standalone) {
  526. defines += [ "CPPGC_IS_STANDALONE" ]
  527. }
  528. }
  529. # This config is only applied to v8_headers and is the basis for external_config
  530. # but without setting the USING_V8_SHARED define, which means v8_headers can be
  531. # used inside v8 itself.
  532. config("headers_config") {
  533. defines = []
  534. configs = [
  535. ":v8_header_features",
  536. ":cppgc_header_features",
  537. ]
  538. include_dirs = [
  539. "include",
  540. "$target_gen_dir/include",
  541. ]
  542. }
  543. # This config should only be applied to code using V8 and not any V8 code
  544. # itself.
  545. config("external_config") {
  546. configs = [ ":headers_config" ]
  547. defines = []
  548. if (is_component_build) {
  549. defines += [ "USING_V8_SHARED" ]
  550. }
  551. if (current_cpu == "riscv64") {
  552. libs = [ "atomic" ]
  553. }
  554. }
  555. # This config should only be applied to code that needs to be explicitly
  556. # aware of whether we are using startup data or not.
  557. config("external_startup_data") {
  558. if (v8_use_external_startup_data) {
  559. defines = [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
  560. }
  561. }
  562. # List of defines that can appear in externally visible header files and that
  563. # are controlled by args.gn.
  564. external_v8_defines = [
  565. "V8_ENABLE_CHECKS",
  566. "V8_COMPRESS_POINTERS",
  567. "V8_COMPRESS_POINTERS_IN_SHARED_CAGE",
  568. "V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE",
  569. "V8_31BIT_SMIS_ON_64BIT_ARCH",
  570. "V8_COMPRESS_ZONES",
  571. "V8_SANDBOX",
  572. "V8_SANDBOXED_POINTERS",
  573. "V8_SANDBOXED_EXTERNAL_POINTERS",
  574. "V8_DEPRECATION_WARNINGS",
  575. "V8_IMMINENT_DEPRECATION_WARNINGS",
  576. "V8_NO_ARGUMENTS_ADAPTOR",
  577. "V8_USE_PERFETTO",
  578. "V8_MAP_PACKING",
  579. "V8_IS_TSAN",
  580. ]
  581. enabled_external_v8_defines = []
  582. if (v8_enable_v8_checks) {
  583. enabled_external_v8_defines += [ "V8_ENABLE_CHECKS" ]
  584. }
  585. if (v8_enable_pointer_compression) {
  586. enabled_external_v8_defines += [ "V8_COMPRESS_POINTERS" ]
  587. if (v8_enable_pointer_compression_shared_cage) {
  588. enabled_external_v8_defines += [ "V8_COMPRESS_POINTERS_IN_SHARED_CAGE" ]
  589. } else {
  590. enabled_external_v8_defines += [ "V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE" ]
  591. }
  592. }
  593. if (v8_enable_pointer_compression || v8_enable_31bit_smis_on_64bit_arch) {
  594. enabled_external_v8_defines += [ "V8_31BIT_SMIS_ON_64BIT_ARCH" ]
  595. }
  596. if (v8_enable_zone_compression) {
  597. enabled_external_v8_defines += [ "V8_COMPRESS_ZONES" ]
  598. }
  599. if (v8_enable_sandbox) {
  600. enabled_external_v8_defines += [ "V8_SANDBOX" ]
  601. }
  602. if (v8_enable_sandboxed_pointers) {
  603. enabled_external_v8_defines += [ "V8_SANDBOXED_POINTERS" ]
  604. }
  605. if (v8_enable_sandboxed_external_pointers) {
  606. enabled_external_v8_defines += [ "V8_SANDBOXED_EXTERNAL_POINTERS" ]
  607. }
  608. if (v8_deprecation_warnings) {
  609. enabled_external_v8_defines += [ "V8_DEPRECATION_WARNINGS" ]
  610. }
  611. if (v8_imminent_deprecation_warnings) {
  612. enabled_external_v8_defines += [ "V8_IMMINENT_DEPRECATION_WARNINGS" ]
  613. }
  614. if (v8_use_perfetto) {
  615. enabled_external_v8_defines += [ "V8_USE_PERFETTO" ]
  616. }
  617. if (v8_enable_map_packing) {
  618. enabled_external_v8_defines += [ "V8_MAP_PACKING" ]
  619. }
  620. if (is_tsan) {
  621. enabled_external_v8_defines += [ "V8_IS_TSAN" ]
  622. }
  623. disabled_external_v8_defines = external_v8_defines - enabled_external_v8_defines
  624. # Put defines that are used in public headers here; public headers are
  625. # defined in "v8_headers" and are included by embedders of V8.
  626. config("v8_header_features") {
  627. visibility = [ ":*" ]
  628. if (v8_generate_external_defines_header) {
  629. defines = [ "V8_GN_HEADER" ]
  630. } else {
  631. defines = enabled_external_v8_defines
  632. }
  633. }
  634. # List of defines that can appear in externally visible cppgc header files and
  635. # that are controlled by args.gn.
  636. external_cppgc_defines = [
  637. "CPPGC_SUPPORTS_OBJECT_NAMES",
  638. "CPPGC_CAGED_HEAP",
  639. "CPPGC_YOUNG_GENERATION",
  640. ]
  641. enabled_external_cppgc_defines = []
  642. if (cppgc_enable_object_names) {
  643. enabled_external_cppgc_defines += [ "CPPGC_SUPPORTS_OBJECT_NAMES" ]
  644. }
  645. if (cppgc_enable_caged_heap) {
  646. enabled_external_cppgc_defines += [ "CPPGC_CAGED_HEAP" ]
  647. }
  648. if (cppgc_enable_young_generation) {
  649. enabled_external_cppgc_defines += [ "CPPGC_YOUNG_GENERATION" ]
  650. }
  651. disabled_external_cppgc_defines =
  652. external_cppgc_defines - enabled_external_cppgc_defines
  653. config("cppgc_header_features") {
  654. visibility = [ ":*" ]
  655. if (v8_generate_external_defines_header) {
  656. defines = [ "V8_GN_HEADER" ]
  657. } else {
  658. defines = enabled_external_cppgc_defines
  659. }
  660. }
  661. enabled_external_defines =
  662. enabled_external_v8_defines + enabled_external_cppgc_defines
  663. disabled_external_defines =
  664. disabled_external_v8_defines + disabled_external_cppgc_defines
  665. # Put defines here that are only used in our internal files and NEVER in
  666. # external headers that embedders (such as chromium and node) might include.
  667. config("features") {
  668. # Only targets in this file and its subdirs can depend on this.
  669. visibility = [ "./*" ]
  670. defines = []
  671. configs = [
  672. ":v8_header_features",
  673. ":cppgc_header_features",
  674. ]
  675. if (cppgc_enable_verify_heap) {
  676. defines += [ "CPPGC_VERIFY_HEAP" ]
  677. }
  678. if (cppgc_allow_allocations_in_prefinalizers) {
  679. defines += [ "CPPGC_ALLOW_ALLOCATIONS_IN_PREFINALIZERS" ]
  680. }
  681. if (v8_embedder_string != "") {
  682. defines += [ "V8_EMBEDDER_STRING=\"$v8_embedder_string\"" ]
  683. }
  684. if (v8_enable_disassembler) {
  685. defines += [ "ENABLE_DISASSEMBLER" ]
  686. }
  687. if (v8_promise_internal_field_count != 0) {
  688. defines +=
  689. [ "V8_PROMISE_INTERNAL_FIELD_COUNT=${v8_promise_internal_field_count}" ]
  690. }
  691. defines +=
  692. [ "V8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=${v8_typed_array_max_size_in_heap}" ]
  693. if (v8_enable_future) {
  694. defines += [ "V8_ENABLE_FUTURE" ]
  695. }
  696. if (v8_enable_lite_mode) {
  697. defines += [ "V8_LITE_MODE" ]
  698. }
  699. if (v8_enable_gdbjit) {
  700. defines += [ "ENABLE_GDB_JIT_INTERFACE" ]
  701. }
  702. if (v8_enable_vtunejit) {
  703. defines += [ "ENABLE_VTUNE_JIT_INTERFACE" ]
  704. }
  705. if (v8_enable_vtunetracemark) {
  706. defines += [ "ENABLE_VTUNE_TRACEMARK" ]
  707. }
  708. if (v8_enable_hugepage) {
  709. defines += [ "ENABLE_HUGEPAGE" ]
  710. }
  711. if (v8_enable_object_print) {
  712. defines += [ "OBJECT_PRINT" ]
  713. }
  714. if (v8_enable_verify_heap) {
  715. defines += [ "VERIFY_HEAP" ]
  716. }
  717. if (v8_enable_verify_predictable) {
  718. defines += [ "VERIFY_PREDICTABLE" ]
  719. }
  720. if (v8_enable_trace_maps) {
  721. defines += [ "V8_TRACE_MAPS" ]
  722. }
  723. if (v8_enable_trace_unoptimized) {
  724. defines += [ "V8_TRACE_UNOPTIMIZED" ]
  725. }
  726. if (v8_enable_trace_feedback_updates) {
  727. defines += [ "V8_TRACE_FEEDBACK_UPDATES" ]
  728. }
  729. if (v8_enable_test_features) {
  730. defines += [ "V8_ENABLE_ALLOCATION_TIMEOUT" ]
  731. defines += [ "V8_ENABLE_FORCE_SLOW_PATH" ]
  732. defines += [ "V8_ENABLE_DOUBLE_CONST_STORE_CHECK" ]
  733. }
  734. if (v8_enable_i18n_support) {
  735. defines += [ "V8_INTL_SUPPORT" ]
  736. }
  737. if (v8_enable_handle_zapping) {
  738. defines += [ "ENABLE_HANDLE_ZAPPING" ]
  739. }
  740. if (v8_code_comments == true) {
  741. defines += [ "V8_CODE_COMMENTS" ]
  742. }
  743. if (v8_enable_debug_code) {
  744. defines += [ "V8_ENABLE_DEBUG_CODE" ]
  745. }
  746. if (v8_enable_heap_snapshot_verify) {
  747. defines += [ "V8_ENABLE_HEAP_SNAPSHOT_VERIFY" ]
  748. }
  749. if (v8_enable_snapshot_native_code_counters) {
  750. defines += [ "V8_SNAPSHOT_NATIVE_CODE_COUNTERS" ]
  751. }
  752. if (v8_enable_single_generation) {
  753. defines += [ "V8_ENABLE_SINGLE_GENERATION" ]
  754. }
  755. if (v8_enable_conservative_stack_scanning) {
  756. defines += [ "V8_ENABLE_CONSERVATIVE_STACK_SCANNING" ]
  757. }
  758. if (v8_disable_write_barriers) {
  759. defines += [ "V8_DISABLE_WRITE_BARRIERS" ]
  760. }
  761. if (v8_enable_third_party_heap) {
  762. defines += [ "V8_ENABLE_THIRD_PARTY_HEAP" ]
  763. }
  764. if (v8_use_external_startup_data) {
  765. defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
  766. }
  767. if (v8_enable_atomic_object_field_writes) {
  768. defines += [ "V8_ATOMIC_OBJECT_FIELD_WRITES" ]
  769. }
  770. if (v8_enable_ignition_dispatch_counting) {
  771. defines += [ "V8_IGNITION_DISPATCH_COUNTING" ]
  772. }
  773. if (v8_enable_lazy_source_positions) {
  774. defines += [ "V8_ENABLE_LAZY_SOURCE_POSITIONS" ]
  775. }
  776. if (v8_use_siphash) {
  777. defines += [ "V8_USE_SIPHASH" ]
  778. }
  779. if (v8_enable_shared_ro_heap) {
  780. defines += [ "V8_SHARED_RO_HEAP" ]
  781. }
  782. if (v8_win64_unwinding_info) {
  783. defines += [ "V8_WIN64_UNWINDING_INFO" ]
  784. }
  785. if (v8_enable_regexp_interpreter_threaded_dispatch) {
  786. defines += [ "V8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH" ]
  787. }
  788. if (v8_enable_snapshot_compression) {
  789. defines += [ "V8_SNAPSHOT_COMPRESSION" ]
  790. }
  791. if (v8_control_flow_integrity) {
  792. defines += [ "V8_ENABLE_CONTROL_FLOW_INTEGRITY" ]
  793. }
  794. if (v8_enable_cet_shadow_stack) {
  795. defines += [ "V8_ENABLE_CET_SHADOW_STACK" ]
  796. }
  797. if (v8_enable_wasm_gdb_remote_debugging) {
  798. defines += [ "V8_ENABLE_WASM_GDB_REMOTE_DEBUGGING" ]
  799. }
  800. if (v8_enable_precise_zone_stats) {
  801. defines += [ "V8_ENABLE_PRECISE_ZONE_STATS" ]
  802. }
  803. if (v8_fuzzilli) {
  804. defines += [ "V8_FUZZILLI" ]
  805. }
  806. if (v8_enable_short_builtin_calls) {
  807. defines += [ "V8_SHORT_BUILTIN_CALLS" ]
  808. }
  809. if (v8_enable_external_code_space) {
  810. defines += [ "V8_EXTERNAL_CODE_SPACE" ]
  811. }
  812. if (v8_enable_maglev) {
  813. defines += [ "V8_ENABLE_MAGLEV" ]
  814. }
  815. if (v8_enable_swiss_name_dictionary) {
  816. defines += [ "V8_ENABLE_SWISS_NAME_DICTIONARY" ]
  817. }
  818. if (v8_enable_system_instrumentation) {
  819. defines += [ "V8_ENABLE_SYSTEM_INSTRUMENTATION" ]
  820. }
  821. if (v8_etw_guid != "") {
  822. defines += [ "V8_ETW_GUID=\"$v8_etw_guid\"" ]
  823. }
  824. if (v8_enable_webassembly) {
  825. defines += [ "V8_ENABLE_WEBASSEMBLY" ]
  826. }
  827. if (v8_dict_property_const_tracking) {
  828. defines += [ "V8_DICT_PROPERTY_CONST_TRACKING" ]
  829. }
  830. if (v8_enable_javascript_promise_hooks) {
  831. defines += [ "V8_ENABLE_JAVASCRIPT_PROMISE_HOOKS" ]
  832. }
  833. if (v8_enable_allocation_folding) {
  834. defines += [ "V8_ALLOCATION_FOLDING" ]
  835. }
  836. if (v8_allocation_site_tracking) {
  837. defines += [ "V8_ALLOCATION_SITE_TRACKING" ]
  838. }
  839. if (v8_scriptormodule_legacy_lifetime) {
  840. defines += [ "V8_SCRIPTORMODULE_LEGACY_LIFETIME" ]
  841. }
  842. if (v8_advanced_bigint_algorithms) {
  843. defines += [ "V8_ADVANCED_BIGINT_ALGORITHMS" ]
  844. }
  845. if (v8_fuchsia_use_vmex_resource) {
  846. defines += [ "V8_USE_VMEX_RESOURCE" ]
  847. }
  848. }
  849. config("toolchain") {
  850. # Only targets in this file and its subdirs can depend on this.
  851. visibility = [ "./*" ]
  852. defines = []
  853. cflags = []
  854. ldflags = []
  855. if (v8_current_cpu == "arm") {
  856. defines += [ "V8_TARGET_ARCH_ARM" ]
  857. if (arm_version >= 7) {
  858. defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ]
  859. }
  860. if (arm_fpu == "vfpv3-d16") {
  861. defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ]
  862. } else if (arm_fpu == "vfpv3") {
  863. defines += [
  864. "CAN_USE_VFP3_INSTRUCTIONS",
  865. "CAN_USE_VFP32DREGS",
  866. ]
  867. } else if (arm_fpu == "neon") {
  868. defines += [
  869. "CAN_USE_VFP3_INSTRUCTIONS",
  870. "CAN_USE_VFP32DREGS",
  871. "CAN_USE_NEON",
  872. ]
  873. }
  874. # TODO(infra): Add support for arm_test_noprobe.
  875. if (current_cpu != "arm") {
  876. # These defines ares used for the ARM simulator.
  877. if (arm_float_abi == "hard") {
  878. defines += [ "USE_EABI_HARDFLOAT=1" ]
  879. } else if (arm_float_abi == "softfp") {
  880. defines += [ "USE_EABI_HARDFLOAT=0" ]
  881. }
  882. }
  883. }
  884. if (v8_current_cpu == "arm64") {
  885. defines += [ "V8_TARGET_ARCH_ARM64" ]
  886. if (current_cpu == "arm64") {
  887. # This will enable PAC+BTI in code generation and static code.
  888. if (v8_control_flow_integrity &&
  889. (!build_with_chromium || arm_control_flow_integrity == "standard")) {
  890. cflags += [ "-mbranch-protection=standard" ]
  891. asmflags = [ "-mmark-bti-property" ]
  892. } else if (build_with_chromium && arm_control_flow_integrity == "pac") {
  893. # This should enable PAC only in C++ code (and no CFI in runtime
  894. # generated code). For details, see crbug.com/919548.
  895. cflags += [ "-mbranch-protection=pac-ret" ]
  896. asmflags = [ "-mbranch-protection=pac-ret" ]
  897. }
  898. }
  899. }
  900. # Mips64el/mipsel simulators.
  901. if (target_is_simulator &&
  902. (v8_current_cpu == "mipsel" || v8_current_cpu == "mips64el")) {
  903. defines += [ "_MIPS_TARGET_SIMULATOR" ]
  904. }
  905. if (v8_current_cpu == "mipsel" || v8_current_cpu == "mips") {
  906. defines += [ "V8_TARGET_ARCH_MIPS" ]
  907. if (v8_can_use_fpu_instructions) {
  908. defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
  909. }
  910. if (v8_use_mips_abi_hardfloat) {
  911. defines += [
  912. "__mips_hard_float=1",
  913. "CAN_USE_FPU_INSTRUCTIONS",
  914. ]
  915. } else {
  916. defines += [ "__mips_soft_float=1" ]
  917. }
  918. if (mips_arch_variant == "r6") {
  919. defines += [
  920. "_MIPS_ARCH_MIPS32R6",
  921. "FPU_MODE_FP64",
  922. ]
  923. if (mips_use_msa) {
  924. defines += [ "_MIPS_MSA" ]
  925. }
  926. } else if (mips_arch_variant == "r2") {
  927. defines += [ "_MIPS_ARCH_MIPS32R2" ]
  928. if (mips_fpu_mode == "fp64") {
  929. defines += [ "FPU_MODE_FP64" ]
  930. } else if (mips_fpu_mode == "fpxx") {
  931. defines += [ "FPU_MODE_FPXX" ]
  932. } else if (mips_fpu_mode == "fp32") {
  933. defines += [ "FPU_MODE_FP32" ]
  934. }
  935. } else if (mips_arch_variant == "r1") {
  936. defines += [ "FPU_MODE_FP32" ]
  937. }
  938. # TODO(infra): Add support for mips_arch_variant rx and loongson.
  939. }
  940. if (v8_current_cpu == "mips64el" || v8_current_cpu == "mips64") {
  941. defines += [ "V8_TARGET_ARCH_MIPS64" ]
  942. if (v8_can_use_fpu_instructions) {
  943. defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
  944. }
  945. if (mips_use_msa) {
  946. defines += [ "_MIPS_MSA" ]
  947. }
  948. if (host_byteorder == "little") {
  949. defines += [ "V8_TARGET_ARCH_MIPS64_LE" ]
  950. } else if (host_byteorder == "big") {
  951. defines += [ "V8_TARGET_ARCH_MIPS64_BE" ]
  952. }
  953. if (v8_use_mips_abi_hardfloat) {
  954. defines += [
  955. "__mips_hard_float=1",
  956. "CAN_USE_FPU_INSTRUCTIONS",
  957. ]
  958. } else {
  959. defines += [ "__mips_soft_float=1" ]
  960. }
  961. if (mips_arch_variant == "r6") {
  962. defines += [ "_MIPS_ARCH_MIPS64R6" ]
  963. } else if (mips_arch_variant == "r2") {
  964. defines += [ "_MIPS_ARCH_MIPS64R2" ]
  965. }
  966. }
  967. # loong64 simulators.
  968. if (target_is_simulator && v8_current_cpu == "loong64") {
  969. defines += [ "_LOONG64_TARGET_SIMULATOR" ]
  970. }
  971. if (v8_current_cpu == "loong64") {
  972. defines += [ "V8_TARGET_ARCH_LOONG64" ]
  973. }
  974. if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
  975. defines += [ "V8_TARGET_ARCH_S390" ]
  976. cflags += [ "-ffp-contract=off" ]
  977. if (v8_current_cpu == "s390x") {
  978. defines += [ "V8_TARGET_ARCH_S390X" ]
  979. }
  980. if (host_byteorder == "little") {
  981. defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ]
  982. } else {
  983. cflags += [ "-march=z196" ]
  984. }
  985. }
  986. if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") {
  987. if (v8_current_cpu == "ppc") {
  988. defines += [ "V8_TARGET_ARCH_PPC" ]
  989. } else if (v8_current_cpu == "ppc64") {
  990. defines += [ "V8_TARGET_ARCH_PPC64" ]
  991. cflags += [ "-ffp-contract=off" ]
  992. }
  993. if (host_byteorder == "little") {
  994. defines += [ "V8_TARGET_ARCH_PPC_LE" ]
  995. } else if (host_byteorder == "big") {
  996. defines += [ "V8_TARGET_ARCH_PPC_BE" ]
  997. if (current_os == "aix") {
  998. cflags += [
  999. # Work around AIX ceil, trunc and round oddities.
  1000. "-mcpu=power5+",
  1001. "-mfprnd",
  1002. # Work around AIX assembler popcntb bug.
  1003. "-mno-popcntb",
  1004. ]
  1005. }
  1006. }
  1007. }
  1008. # Under simulator build, compiler will not provide __riscv_xlen. Define here
  1009. if (v8_current_cpu == "riscv64") {
  1010. defines += [ "V8_TARGET_ARCH_RISCV64" ]
  1011. defines += [ "__riscv_xlen=64" ]
  1012. #FIXME: Temporarily use MIPS macro for the building.
  1013. defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
  1014. if (target_is_simulator) {
  1015. defines += [ "CAN_USE_RVV_INSTRUCTIONS" ]
  1016. }
  1017. }
  1018. if (v8_current_cpu == "x86") {
  1019. defines += [ "V8_TARGET_ARCH_IA32" ]
  1020. if (is_win) {
  1021. # Ensure no surprising artifacts from 80bit double math with x86.
  1022. cflags += [ "/arch:SSE2" ]
  1023. }
  1024. }
  1025. if (v8_current_cpu == "x64") {
  1026. defines += [ "V8_TARGET_ARCH_X64" ]
  1027. if (is_win) {
  1028. # Increase the initial stack size. The default is 1MB, this is 2MB. This
  1029. # applies only to executables and shared libraries produced by V8 since
  1030. # ldflags are not pushed to dependants.
  1031. ldflags += [ "/STACK:2097152" ]
  1032. }
  1033. }
  1034. if (is_android && v8_android_log_stdout) {
  1035. defines += [ "V8_ANDROID_LOG_STDOUT" ]
  1036. }
  1037. # V8_TARGET_OS_ defines. The target OS may differ from host OS e.g. in
  1038. # mksnapshot. We additionally set V8_HAVE_TARGET_OS to determine that a
  1039. # target OS has in fact been set; otherwise we internally assume that target
  1040. # OS == host OS (see v8config.h).
  1041. if (target_os == "android") {
  1042. defines += [ "V8_HAVE_TARGET_OS" ]
  1043. defines += [ "V8_TARGET_OS_ANDROID" ]
  1044. } else if (target_os == "fuchsia") {
  1045. defines += [ "V8_HAVE_TARGET_OS" ]
  1046. defines += [ "V8_TARGET_OS_FUCHSIA" ]
  1047. } else if (target_os == "ios") {
  1048. defines += [ "V8_HAVE_TARGET_OS" ]
  1049. defines += [ "V8_TARGET_OS_IOS" ]
  1050. } else if (target_os == "linux") {
  1051. defines += [ "V8_HAVE_TARGET_OS" ]
  1052. defines += [ "V8_TARGET_OS_LINUX" ]
  1053. } else if (target_os == "mac") {
  1054. defines += [ "V8_HAVE_TARGET_OS" ]
  1055. defines += [ "V8_TARGET_OS_MACOS" ]
  1056. } else if (target_os == "win") {
  1057. defines += [ "V8_HAVE_TARGET_OS" ]
  1058. defines += [ "V8_TARGET_OS_WIN" ]
  1059. }
  1060. # TODO(infra): Support v8_enable_prof on Windows.
  1061. # TODO(infra): Add support for compiling with simulators.
  1062. if (v8_enable_debugging_features) {
  1063. if ((is_linux || is_chromeos) && v8_enable_backtrace) {
  1064. ldflags += [ "-rdynamic" ]
  1065. }
  1066. defines += [ "DEBUG" ]
  1067. if (v8_enable_slow_dchecks) {
  1068. defines += [ "ENABLE_SLOW_DCHECKS" ]
  1069. }
  1070. } else if (dcheck_always_on) {
  1071. defines += [ "DEBUG" ]
  1072. }
  1073. if (v8_enable_verify_csa) {
  1074. defines += [ "ENABLE_VERIFY_CSA" ]
  1075. }
  1076. if (v8_enable_runtime_call_stats) {
  1077. defines += [ "V8_RUNTIME_CALL_STATS" ]
  1078. }
  1079. if (v8_no_inline) {
  1080. if (is_win) {
  1081. cflags += [ "/Ob0" ]
  1082. } else {
  1083. cflags += [
  1084. "-fno-inline-functions",
  1085. "-fno-inline",
  1086. ]
  1087. }
  1088. }
  1089. if (is_clang) {
  1090. cflags += [
  1091. "-Wmissing-field-initializers",
  1092. # TODO(v8:12245): Fix shadowing instances and remove.
  1093. "-Wno-shadow",
  1094. ]
  1095. if (v8_current_cpu != "mips" && v8_current_cpu != "mipsel") {
  1096. # We exclude MIPS because the IsMipsArchVariant macro causes trouble.
  1097. cflags += [ "-Wunreachable-code" ]
  1098. }
  1099. if (v8_current_cpu == "x64" || v8_current_cpu == "arm64" ||
  1100. v8_current_cpu == "mips64el" || v8_current_cpu == "riscv64") {
  1101. cflags += [ "-Wshorten-64-to-32" ]
  1102. }
  1103. }
  1104. if (is_win) {
  1105. cflags += [
  1106. "/wd4245", # Conversion with signed/unsigned mismatch.
  1107. "/wd4267", # Conversion with possible loss of data.
  1108. "/wd4324", # Padding structure due to alignment.
  1109. "/wd4701", # Potentially uninitialized local variable.
  1110. "/wd4702", # Unreachable code.
  1111. "/wd4703", # Potentially uninitialized local pointer variable.
  1112. "/wd4709", # Comma operator within array index expr (bugged).
  1113. "/wd4714", # Function marked forceinline not inlined.
  1114. # MSVC assumes that control can get past an exhaustive switch and then
  1115. # warns if there's no return there (see https://crbug.com/v8/7658)
  1116. "/wd4715", # Not all control paths return a value.
  1117. "/wd4718", # Recursive call has no side-effect.
  1118. "/wd4723", # https://crbug.com/v8/7771
  1119. "/wd4724", # https://crbug.com/v8/7771
  1120. "/wd4800", # Forcing value to bool.
  1121. ]
  1122. }
  1123. if (!is_clang && is_win) {
  1124. cflags += [
  1125. "/wd4506", # Benign "no definition for inline function"
  1126. # Warnings permanently disabled:
  1127. # C4091: 'typedef ': ignored on left of 'X' when no variable is
  1128. # declared.
  1129. # This happens in a number of Windows headers. Dumb.
  1130. "/wd4091",
  1131. # C4127: conditional expression is constant
  1132. # This warning can in theory catch dead code and other problems, but
  1133. # triggers in far too many desirable cases where the conditional
  1134. # expression is either set by macros or corresponds some legitimate
  1135. # compile-time constant expression (due to constant template args,
  1136. # conditionals comparing the sizes of different types, etc.). Some of
  1137. # these can be worked around, but it's not worth it.
  1138. "/wd4127",
  1139. # C4251: 'identifier' : class 'type' needs to have dll-interface to be
  1140. # used by clients of class 'type2'
  1141. # This is necessary for the shared library build.
  1142. "/wd4251",
  1143. # C4275: non dll-interface class used as base for dll-interface class
  1144. # This points out a potential (but rare) problem with referencing static
  1145. # fields of a non-exported base, through the base's non-exported inline
  1146. # functions, or directly. The warning is subtle enough that people just
  1147. # suppressed it when they saw it, so it's not worth it.
  1148. "/wd4275",
  1149. # C4312 is a VS 2015 64-bit warning for integer to larger pointer.
  1150. # TODO(brucedawson): fix warnings, crbug.com/554200
  1151. "/wd4312",
  1152. # C4324 warns when padding is added to fulfill alignas requirements,
  1153. # but can trigger in benign cases that are difficult to individually
  1154. # suppress.
  1155. "/wd4324",
  1156. # C4351: new behavior: elements of array 'array' will be default
  1157. # initialized
  1158. # This is a silly "warning" that basically just alerts you that the
  1159. # compiler is going to actually follow the language spec like it's
  1160. # supposed to, instead of not following it like old buggy versions did.
  1161. # There's absolutely no reason to turn this on.
  1162. "/wd4351",
  1163. # C4355: 'this': used in base member initializer list
  1164. # It's commonly useful to pass |this| to objects in a class' initializer
  1165. # list. While this warning can catch real bugs, most of the time the
  1166. # constructors in question don't attempt to call methods on the passed-in
  1167. # pointer (until later), and annotating every legit usage of this is
  1168. # simply more hassle than the warning is worth.
  1169. "/wd4355",
  1170. # C4503: 'identifier': decorated name length exceeded, name was
  1171. # truncated
  1172. # This only means that some long error messages might have truncated
  1173. # identifiers in the presence of lots of templates. It has no effect on
  1174. # program correctness and there's no real reason to waste time trying to
  1175. # prevent it.
  1176. "/wd4503",
  1177. # Warning C4589 says: "Constructor of abstract class ignores
  1178. # initializer for virtual base class." Disable this warning because it
  1179. # is flaky in VS 2015 RTM. It triggers on compiler generated
  1180. # copy-constructors in some cases.
  1181. "/wd4589",
  1182. # C4611: interaction between 'function' and C++ object destruction is
  1183. # non-portable
  1184. # This warning is unavoidable when using e.g. setjmp/longjmp. MSDN
  1185. # suggests using exceptions instead of setjmp/longjmp for C++, but
  1186. # Chromium code compiles without exception support. We therefore have to
  1187. # use setjmp/longjmp for e.g. JPEG decode error handling, which means we
  1188. # have to turn off this warning (and be careful about how object
  1189. # destruction happens in such cases).
  1190. "/wd4611",
  1191. # Warnings to evaluate and possibly fix/reenable later:
  1192. "/wd4100", # Unreferenced formal function parameter.
  1193. "/wd4121", # Alignment of a member was sensitive to packing.
  1194. "/wd4244", # Conversion: possible loss of data.
  1195. "/wd4505", # Unreferenced local function has been removed.
  1196. "/wd4510", # Default constructor could not be generated.
  1197. "/wd4512", # Assignment operator could not be generated.
  1198. "/wd4610", # Class can never be instantiated, constructor required.
  1199. "/wd4838", # Narrowing conversion. Doesn't seem to be very useful.
  1200. "/wd4995", # 'X': name was marked as #pragma deprecated
  1201. "/wd4996", # Deprecated function warning.
  1202. # These are variable shadowing warnings that are new in VS2015. We
  1203. # should work through these at some point -- they may be removed from
  1204. # the RTM release in the /W4 set.
  1205. "/wd4456",
  1206. "/wd4457",
  1207. "/wd4458",
  1208. "/wd4459",
  1209. # All of our compilers support the extensions below.
  1210. "/wd4200", # nonstandard extension used: zero-sized array in struct/union
  1211. "/wd4201", # nonstandard extension used: nameless struct/union
  1212. "/wd4204", # nonstandard extension used : non-constant aggregate
  1213. # initializer
  1214. "/wd4221", # nonstandard extension used : 'identifier' : cannot be
  1215. # initialized using address of automatic variable
  1216. # http://crbug.com/588506 - Conversion suppressions waiting on Clang
  1217. # -Wconversion.
  1218. "/wd4245", # 'conversion' : conversion from 'type1' to 'type2',
  1219. # signed/unsigned mismatch
  1220. "/wd4267", # 'var' : conversion from 'size_t' to 'type', possible loss of
  1221. # data
  1222. "/wd4305", # 'identifier' : truncation from 'type1' to 'type2'
  1223. "/wd4389", # 'operator' : signed/unsigned mismatch
  1224. "/wd4702", # unreachable code
  1225. # http://crbug.com/848979 - MSVC is more conservative than Clang with
  1226. # regards to variables initialized and consumed in different branches.
  1227. "/wd4701", # Potentially uninitialized local variable 'name' used
  1228. "/wd4703", # Potentially uninitialized local pointer variable 'name' used
  1229. # http://crbug.com/848979 - Remaining Clang permitted warnings.
  1230. "/wd4661", # 'identifier' : no suitable definition provided for explicit
  1231. # template instantiation request
  1232. "/wd4706", # assignment within conditional expression
  1233. # MSVC is stricter and requires a boolean expression.
  1234. "/wd4715", # 'function' : not all control paths return a value'
  1235. # MSVC does not analyze switch (enum) for completeness.
  1236. ]
  1237. }
  1238. if (!is_clang && !is_win) {
  1239. cflags += [
  1240. # Disable gcc warnings for optimizations based on the assumption that
  1241. # signed overflow does not occur. Generates false positives (see
  1242. # http://crbug.com/v8/6341).
  1243. "-Wno-strict-overflow",
  1244. # GCC assumes that control can get past an exhaustive switch and then
  1245. # warns if there's no return there (see https://crbug.com/v8/7658).
  1246. "-Wno-return-type",
  1247. # Disable gcc warnings for using enum constant in boolean context.
  1248. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97266
  1249. "-Wno-int-in-bool-context",
  1250. ]
  1251. }
  1252. # Chromium uses a hand-picked subset of UBSan coverage. We want everything.
  1253. if (is_ubsan) {
  1254. cflags += [ "-fsanitize=undefined" ]
  1255. }
  1256. }
  1257. # For code that is hot during mksnapshot. In fast-mksnapshot builds, we
  1258. # optimize some files even in debug builds to speed up mksnapshot times.
  1259. config("always_optimize") {
  1260. configs = [ ":internal_config" ]
  1261. # TODO(crbug.com/621335) Rework this so that we don't have the confusion
  1262. # between "optimize_speed" and "optimize_max".
  1263. if (((is_posix && !is_android) || is_fuchsia) && !using_sanitizer) {
  1264. configs += [ "//build/config/compiler:optimize_speed" ]
  1265. } else {
  1266. configs += [ "//build/config/compiler:optimize_max" ]
  1267. }
  1268. }
  1269. # Configs for code coverage with gcov. Separate configs for cflags and ldflags
  1270. # to selectively influde cflags in non-test targets only.
  1271. config("v8_gcov_coverage_cflags") {
  1272. cflags = [
  1273. "-fprofile-arcs",
  1274. "-ftest-coverage",
  1275. ]
  1276. }
  1277. config("v8_gcov_coverage_ldflags") {
  1278. ldflags = [ "-fprofile-arcs" ]
  1279. }
  1280. ###############################################################################
  1281. # Actions
  1282. #
  1283. # Only for Windows clang builds. Converts the embedded.S file produced by
  1284. # mksnapshot into an embedded.cc file with corresponding inline assembly.
  1285. template("asm_to_inline_asm") {
  1286. name = target_name
  1287. if (name == "default") {
  1288. suffix = ""
  1289. } else {
  1290. suffix = "_$name"
  1291. }
  1292. action("asm_to_inline_asm_" + name) {
  1293. visibility = [ ":*" ] # Only targets in this file can depend on this.
  1294. assert(emit_builtins_as_inline_asm)
  1295. script = "tools/snapshot/asm_to_inline_asm.py"
  1296. deps = [ ":run_mksnapshot_" + name ]
  1297. sources = [ "$target_gen_dir/embedded${suffix}.S" ]
  1298. outputs = [ "$target_gen_dir/embedded${suffix}.cc" ]
  1299. args = invoker.args
  1300. args += [
  1301. rebase_path("$target_gen_dir/embedded${suffix}.S", root_build_dir),
  1302. rebase_path("$target_gen_dir/embedded${suffix}.cc", root_build_dir),
  1303. ]
  1304. }
  1305. }
  1306. if (is_android && enable_java_templates) {
  1307. android_assets("v8_external_startup_data_assets") {
  1308. if (v8_use_external_startup_data) {
  1309. deps = [ "//v8" ]
  1310. renaming_sources = [ "$root_out_dir/snapshot_blob.bin" ]
  1311. if (current_cpu == "arm" || current_cpu == "x86" ||
  1312. current_cpu == "mipsel") {
  1313. renaming_destinations = [ "snapshot_blob_32.bin" ]
  1314. } else {
  1315. renaming_destinations = [ "snapshot_blob_64.bin" ]
  1316. }
  1317. disable_compression = true
  1318. }
  1319. }
  1320. }
  1321. action("postmortem-metadata") {
  1322. # Only targets in this file and the top-level visibility target can
  1323. # depend on this.
  1324. visibility = [
  1325. ":*",
  1326. "//:gn_visibility",
  1327. ]
  1328. script = "tools/gen-postmortem-metadata.py"
  1329. # NOSORT
  1330. sources = [
  1331. "$target_gen_dir/torque-generated/instance-types.h",
  1332. "src/objects/allocation-site.h",
  1333. "src/objects/allocation-site-inl.h",
  1334. "src/objects/cell.h",
  1335. "src/objects/cell-inl.h",
  1336. "src/objects/code.h",
  1337. "src/objects/code-inl.h",
  1338. "src/objects/data-handler.h",
  1339. "src/objects/data-handler-inl.h",
  1340. "src/objects/descriptor-array.h",
  1341. "src/objects/descriptor-array-inl.h",
  1342. "src/objects/feedback-cell.h",
  1343. "src/objects/feedback-cell-inl.h",
  1344. "src/objects/fixed-array.h",
  1345. "src/objects/fixed-array-inl.h",
  1346. "src/objects/heap-number.h",
  1347. "src/objects/heap-number-inl.h",
  1348. "src/objects/heap-object.h",
  1349. "src/objects/heap-object-inl.h",
  1350. "src/objects/instance-type.h",
  1351. "src/objects/js-array-buffer.h",
  1352. "src/objects/js-array-buffer-inl.h",
  1353. "src/objects/js-array.h",
  1354. "src/objects/js-array-inl.h",
  1355. "src/objects/js-function-inl.h",
  1356. "src/objects/js-function.cc",
  1357. "src/objects/js-function.h",
  1358. "src/objects/js-objects.cc",
  1359. "src/objects/js-objects.h",
  1360. "src/objects/js-objects-inl.h",
  1361. "src/objects/js-promise.h",
  1362. "src/objects/js-promise-inl.h",
  1363. "src/objects/js-regexp.cc",
  1364. "src/objects/js-regexp.h",
  1365. "src/objects/js-regexp-inl.h",
  1366. "src/objects/js-regexp-string-iterator.h",
  1367. "src/objects/js-regexp-string-iterator-inl.h",
  1368. "src/objects/map.cc",
  1369. "src/objects/map.h",
  1370. "src/objects/map-inl.h",
  1371. "src/objects/megadom-handler.h",
  1372. "src/objects/megadom-handler-inl.h",
  1373. "src/objects/name.h",
  1374. "src/objects/name-inl.h",
  1375. "src/objects/objects.h",
  1376. "src/objects/objects-inl.h",
  1377. "src/objects/oddball.h",
  1378. "src/objects/oddball-inl.h",
  1379. "src/objects/primitive-heap-object.h",
  1380. "src/objects/primitive-heap-object-inl.h",
  1381. "src/objects/scope-info.h",
  1382. "src/objects/scope-info-inl.h",
  1383. "src/objects/script.h",
  1384. "src/objects/script-inl.h",
  1385. "src/objects/shared-function-info.cc",
  1386. "src/objects/shared-function-info.h",
  1387. "src/objects/shared-function-info-inl.h",
  1388. "src/objects/string.cc",
  1389. "src/objects/string-comparator.cc",
  1390. "src/objects/string-comparator.h",
  1391. "src/objects/string.h",
  1392. "src/objects/string-inl.h",
  1393. "src/objects/struct.h",
  1394. "src/objects/struct-inl.h",
  1395. ]
  1396. outputs = [ "$target_gen_dir/debug-support.cc" ]
  1397. args = rebase_path(outputs, root_build_dir) +
  1398. rebase_path(sources, root_build_dir)
  1399. deps = [ ":run_torque" ]
  1400. }
  1401. torque_files = [
  1402. "src/builtins/aggregate-error.tq",
  1403. "src/builtins/array-at.tq",
  1404. "src/builtins/array-concat.tq",
  1405. "src/builtins/array-copywithin.tq",
  1406. "src/builtins/array-every.tq",
  1407. "src/builtins/array-filter.tq",
  1408. "src/builtins/array-find.tq",
  1409. "src/builtins/array-findindex.tq",
  1410. "src/builtins/array-findlast.tq",
  1411. "src/builtins/array-findlastindex.tq",
  1412. "src/builtins/array-foreach.tq",
  1413. "src/builtins/array-from.tq",
  1414. "src/builtins/array-isarray.tq",
  1415. "src/builtins/array-join.tq",
  1416. "src/builtins/array-lastindexof.tq",
  1417. "src/builtins/array-map.tq",
  1418. "src/builtins/array-of.tq",
  1419. "src/builtins/array-reduce-right.tq",
  1420. "src/builtins/array-reduce.tq",
  1421. "src/builtins/array-reverse.tq",
  1422. "src/builtins/array-shift.tq",
  1423. "src/builtins/array-slice.tq",
  1424. "src/builtins/array-some.tq",
  1425. "src/builtins/array-splice.tq",
  1426. "src/builtins/array-unshift.tq",
  1427. "src/builtins/array.tq",
  1428. "src/builtins/arraybuffer.tq",
  1429. "src/builtins/base.tq",
  1430. "src/builtins/boolean.tq",
  1431. "src/builtins/builtins-bigint.tq",
  1432. "src/builtins/builtins-string.tq",
  1433. "src/builtins/cast.tq",
  1434. "src/builtins/collections.tq",
  1435. "src/builtins/constructor.tq",
  1436. "src/builtins/conversion.tq",
  1437. "src/builtins/convert.tq",
  1438. "src/builtins/console.tq",
  1439. "src/builtins/data-view.tq",
  1440. "src/builtins/finalization-registry.tq",
  1441. "src/builtins/frames.tq",
  1442. "src/builtins/frame-arguments.tq",
  1443. "src/builtins/function.tq",
  1444. "src/builtins/growable-fixed-array.tq",
  1445. "src/builtins/ic-callable.tq",
  1446. "src/builtins/ic.tq",
  1447. "src/builtins/internal-coverage.tq",
  1448. "src/builtins/internal.tq",
  1449. "src/builtins/iterator.tq",
  1450. "src/builtins/math.tq",
  1451. "src/builtins/number.tq",
  1452. "src/builtins/object-fromentries.tq",
  1453. "src/builtins/object.tq",
  1454. "src/builtins/promise-abstract-operations.tq",
  1455. "src/builtins/promise-all.tq",
  1456. "src/builtins/promise-all-element-closure.tq",
  1457. "src/builtins/promise-any.tq",
  1458. "src/builtins/promise-constructor.tq",
  1459. "src/builtins/promise-finally.tq",
  1460. "src/builtins/promise-misc.tq",
  1461. "src/builtins/promise-race.tq",
  1462. "src/builtins/promise-reaction-job.tq",
  1463. "src/builtins/promise-resolve.tq",
  1464. "src/builtins/promise-then.tq",
  1465. "src/builtins/promise-jobs.tq",
  1466. "src/builtins/proxy-constructor.tq",
  1467. "src/builtins/proxy-delete-property.tq",
  1468. "src/builtins/proxy-get-property.tq",
  1469. "src/builtins/proxy-get-prototype-of.tq",
  1470. "src/builtins/proxy-has-property.tq",
  1471. "src/builtins/proxy-is-extensible.tq",
  1472. "src/builtins/proxy-prevent-extensions.tq",
  1473. "src/builtins/proxy-revocable.tq",
  1474. "src/builtins/proxy-revoke.tq",
  1475. "src/builtins/proxy-set-property.tq",
  1476. "src/builtins/proxy-set-prototype-of.tq",
  1477. "src/builtins/proxy.tq",
  1478. "src/builtins/reflect.tq",
  1479. "src/builtins/regexp-exec.tq",
  1480. "src/builtins/regexp-match-all.tq",
  1481. "src/builtins/regexp-match.tq",
  1482. "src/builtins/regexp-replace.tq",
  1483. "src/builtins/regexp-search.tq",
  1484. "src/builtins/regexp-source.tq",
  1485. "src/builtins/regexp-split.tq",
  1486. "src/builtins/regexp-test.tq",
  1487. "src/builtins/regexp.tq",
  1488. "src/builtins/string-at.tq",
  1489. "src/builtins/string-endswith.tq",
  1490. "src/builtins/string-html.tq",
  1491. "src/builtins/string-includes.tq",
  1492. "src/builtins/string-indexof.tq",
  1493. "src/builtins/string-iterator.tq",
  1494. "src/builtins/string-match-search.tq",
  1495. "src/builtins/string-pad.tq",
  1496. "src/builtins/string-repeat.tq",
  1497. "src/builtins/string-replaceall.tq",
  1498. "src/builtins/string-slice.tq",
  1499. "src/builtins/string-startswith.tq",
  1500. "src/builtins/string-substr.tq",
  1501. "src/builtins/string-substring.tq",
  1502. "src/builtins/string-trim.tq",
  1503. "src/builtins/symbol.tq",
  1504. "src/builtins/torque-internal.tq",
  1505. "src/builtins/typed-array-at.tq",
  1506. "src/builtins/typed-array-createtypedarray.tq",
  1507. "src/builtins/typed-array-every.tq",
  1508. "src/builtins/typed-array-entries.tq",
  1509. "src/builtins/typed-array-filter.tq",
  1510. "src/builtins/typed-array-find.tq",
  1511. "src/builtins/typed-array-findindex.tq",
  1512. "src/builtins/typed-array-findlast.tq",
  1513. "src/builtins/typed-array-findlastindex.tq",
  1514. "src/builtins/typed-array-foreach.tq",
  1515. "src/builtins/typed-array-from.tq",
  1516. "src/builtins/typed-array-keys.tq",
  1517. "src/builtins/typed-array-of.tq",
  1518. "src/builtins/typed-array-reduce.tq",
  1519. "src/builtins/typed-array-reduceright.tq",
  1520. "src/builtins/typed-array-set.tq",
  1521. "src/builtins/typed-array-slice.tq",
  1522. "src/builtins/typed-array-some.tq",
  1523. "src/builtins/typed-array-sort.tq",
  1524. "src/builtins/typed-array-subarray.tq",
  1525. "src/builtins/typed-array-values.tq",
  1526. "src/builtins/typed-array.tq",
  1527. "src/builtins/weak-ref.tq",
  1528. "src/ic/handler-configuration.tq",
  1529. "src/objects/allocation-site.tq",
  1530. "src/objects/api-callbacks.tq",
  1531. "src/objects/arguments.tq",
  1532. "src/objects/bigint.tq",
  1533. "src/objects/call-site-info.tq",
  1534. "src/objects/cell.tq",
  1535. "src/objects/code.tq",
  1536. "src/objects/contexts.tq",
  1537. "src/objects/data-handler.tq",
  1538. "src/objects/debug-objects.tq",
  1539. "src/objects/descriptor-array.tq",
  1540. "src/objects/embedder-data-array.tq",
  1541. "src/objects/feedback-cell.tq",
  1542. "src/objects/feedback-vector.tq",
  1543. "src/objects/fixed-array.tq",
  1544. "src/objects/foreign.tq",
  1545. "src/objects/free-space.tq",
  1546. "src/objects/heap-number.tq",
  1547. "src/objects/heap-object.tq",
  1548. "src/objects/js-array-buffer.tq",
  1549. "src/objects/js-array.tq",
  1550. "src/objects/js-collection-iterator.tq",
  1551. "src/objects/js-collection.tq",
  1552. "src/objects/js-function.tq",
  1553. "src/objects/js-generator.tq",
  1554. "src/objects/js-objects.tq",
  1555. "src/objects/js-promise.tq",
  1556. "src/objects/js-proxy.tq",
  1557. "src/objects/js-regexp-string-iterator.tq",
  1558. "src/objects/js-regexp.tq",
  1559. "src/objects/js-shadow-realms.tq",
  1560. "src/objects/js-struct.tq",
  1561. "src/objects/js-temporal-objects.tq",
  1562. "src/objects/js-weak-refs.tq",
  1563. "src/objects/literal-objects.tq",
  1564. "src/objects/map.tq",
  1565. "src/objects/megadom-handler.tq",
  1566. "src/objects/microtask.tq",
  1567. "src/objects/module.tq",
  1568. "src/objects/name.tq",
  1569. "src/objects/oddball.tq",
  1570. "src/objects/ordered-hash-table.tq",
  1571. "src/objects/primitive-heap-object.tq",
  1572. "src/objects/promise.tq",
  1573. "src/objects/property-array.tq",
  1574. "src/objects/property-cell.tq",
  1575. "src/objects/property-descriptor-object.tq",
  1576. "src/objects/prototype-info.tq",
  1577. "src/objects/regexp-match-info.tq",
  1578. "src/objects/scope-info.tq",
  1579. "src/objects/script.tq",
  1580. "src/objects/shared-function-info.tq",
  1581. "src/objects/source-text-module.tq",
  1582. "src/objects/string.tq",
  1583. "src/objects/struct.tq",
  1584. "src/objects/swiss-hash-table-helpers.tq",
  1585. "src/objects/swiss-name-dictionary.tq",
  1586. "src/objects/synthetic-module.tq",
  1587. "src/objects/template-objects.tq",
  1588. "src/objects/templates.tq",
  1589. "src/objects/torque-defined-classes.tq",
  1590. "src/objects/turbofan-types.tq",
  1591. "test/torque/test-torque.tq",
  1592. "third_party/v8/builtins/array-sort.tq",
  1593. ]
  1594. if (v8_enable_i18n_support) {
  1595. torque_files += [
  1596. "src/objects/intl-objects.tq",
  1597. "src/objects/js-break-iterator.tq",
  1598. "src/objects/js-collator.tq",
  1599. "src/objects/js-date-time-format.tq",
  1600. "src/objects/js-display-names.tq",
  1601. "src/objects/js-list-format.tq",
  1602. "src/objects/js-locale.tq",
  1603. "src/objects/js-number-format.tq",
  1604. "src/objects/js-plural-rules.tq",
  1605. "src/objects/js-relative-time-format.tq",
  1606. "src/objects/js-segment-iterator.tq",
  1607. "src/objects/js-segmenter.tq",
  1608. "src/objects/js-segments.tq",
  1609. ]
  1610. }
  1611. if (v8_enable_webassembly) {
  1612. torque_files += [
  1613. "src/builtins/wasm.tq",
  1614. "src/debug/debug-wasm-objects.tq",
  1615. "src/wasm/wasm-objects.tq",
  1616. ]
  1617. }
  1618. # Template for running torque
  1619. # When building with v8_verify_torque_generation_invariance=true we need
  1620. # to be able to run torque for both 32 and 64 bits in the same build
  1621. template("run_torque") {
  1622. if (target_name == "") {
  1623. suffix = ""
  1624. } else {
  1625. suffix = "_$target_name"
  1626. }
  1627. toolchain = invoker.toolchain
  1628. action("run_torque" + suffix) {
  1629. visibility = [
  1630. ":*",
  1631. "test/cctest/:*",
  1632. "tools/debug_helper/:*",
  1633. "tools/gcmole/:*",
  1634. ]
  1635. deps = [ ":torque($toolchain)" ]
  1636. script = "tools/run.py"
  1637. sources = torque_files
  1638. destination_folder = "$target_gen_dir/torque-generated$suffix"
  1639. outputs = [
  1640. "$destination_folder/bit-fields.h",
  1641. "$destination_folder/builtin-definitions.h",
  1642. "$destination_folder/class-debug-readers.cc",
  1643. "$destination_folder/class-debug-readers.h",
  1644. "$destination_folder/class-forward-declarations.h",
  1645. "$destination_folder/class-verifiers.cc",
  1646. "$destination_folder/class-verifiers.h",
  1647. "$destination_folder/csa-types.h",
  1648. "$destination_folder/debug-macros.cc",
  1649. "$destination_folder/debug-macros.h",
  1650. "$destination_folder/enum-verifiers.cc",
  1651. "$destination_folder/exported-macros-assembler.cc",
  1652. "$destination_folder/exported-macros-assembler.h",
  1653. "$destination_folder/factory.cc",
  1654. "$destination_folder/factory.inc",
  1655. "$destination_folder/instance-types.h",
  1656. "$destination_folder/interface-descriptors.inc",
  1657. "$destination_folder/objects-body-descriptors-inl.inc",
  1658. "$destination_folder/objects-printer.cc",
  1659. "$destination_folder/visitor-lists.h",
  1660. ]
  1661. foreach(file, torque_files) {
  1662. filetq = string_replace(file, ".tq", "-tq")
  1663. outputs += [
  1664. "$destination_folder/$filetq-csa.cc",
  1665. "$destination_folder/$filetq-csa.h",
  1666. "$destination_folder/$filetq-inl.inc",
  1667. "$destination_folder/$filetq.cc",
  1668. "$destination_folder/$filetq.inc",
  1669. ]
  1670. }
  1671. args = [
  1672. "./" + rebase_path(
  1673. get_label_info(":torque($toolchain)", "root_out_dir") + "/torque",
  1674. root_build_dir),
  1675. "-o",
  1676. rebase_path("$destination_folder", root_build_dir),
  1677. "-v8-root",
  1678. rebase_path(".", root_build_dir),
  1679. ]
  1680. if (v8_annotate_torque_ir) {
  1681. args += [ "-annotate-ir" ]
  1682. }
  1683. if (defined(invoker.args)) {
  1684. args += invoker.args
  1685. }
  1686. args += torque_files
  1687. }
  1688. }
  1689. # Default run_torque action
  1690. run_torque("") {
  1691. toolchain = v8_generator_toolchain
  1692. }
  1693. if (v8_verify_torque_generation_invariance) {
  1694. run_torque("x86") {
  1695. toolchain = "//build/toolchain/linux:clang_x86"
  1696. }
  1697. run_torque("x64") {
  1698. args = [ "-m32" ]
  1699. toolchain = "//build/toolchain/linux:clang_x64"
  1700. }
  1701. action("compare_torque_runs") {
  1702. deps = [
  1703. ":run_torque_x64",
  1704. ":run_torque_x86",
  1705. ]
  1706. report_file = "$target_gen_dir/torque_comparison_results.txt"
  1707. script = "tools/compare_torque_output.py"
  1708. args = [
  1709. rebase_path("$target_gen_dir/torque-generated_x64", root_build_dir),
  1710. rebase_path("$target_gen_dir/torque-generated_x86", root_build_dir),
  1711. rebase_path(report_file, root_build_dir),
  1712. ]
  1713. outputs = [ report_file ]
  1714. }
  1715. }
  1716. group("v8_maybe_icu") {
  1717. if (v8_enable_i18n_support) {
  1718. public_deps = [ "//third_party/icu" ]
  1719. }
  1720. }
  1721. v8_header_set("torque_runtime_support") {
  1722. visibility = [ ":*" ]
  1723. sources = [ "src/torque/runtime-support.h" ]
  1724. configs = [ ":internal_config" ]
  1725. }
  1726. v8_source_set("torque_generated_initializers") {
  1727. visibility = [ ":*" ] # Only targets in this file can depend on this.
  1728. deps = [
  1729. ":generate_bytecode_builtins_list",
  1730. ":run_torque",
  1731. ":v8_base_without_compiler",
  1732. ":v8_tracing",
  1733. ]
  1734. public_deps = [
  1735. ":torque_runtime_support",
  1736. ":v8_maybe_icu",
  1737. ]
  1738. sources = [
  1739. "$target_gen_dir/torque-generated/csa-types.h",
  1740. "$target_gen_dir/torque-generated/enum-verifiers.cc",
  1741. "$target_gen_dir/torque-generated/exported-macros-assembler.cc",
  1742. "$target_gen_dir/torque-generated/exported-macros-assembler.h",
  1743. ]
  1744. foreach(file, torque_files) {
  1745. filetq = string_replace(file, ".tq", "-tq")
  1746. sources += [
  1747. "$target_gen_dir/torque-generated/$filetq-csa.cc",
  1748. "$target_gen_dir/torque-generated/$filetq-csa.h",
  1749. ]
  1750. }
  1751. configs = [ ":internal_config" ]
  1752. }
  1753. v8_source_set("torque_generated_definitions") {
  1754. visibility = [ ":*" ] # Only targets in this file can depend on this.
  1755. deps = [
  1756. ":generate_bytecode_builtins_list",
  1757. ":run_torque",
  1758. ":v8_internal_headers",
  1759. ":v8_libbase",
  1760. ":v8_tracing",
  1761. ]
  1762. public_deps = [ ":v8_maybe_icu" ]
  1763. sources = [
  1764. "$target_gen_dir/torque-generated/class-forward-declarations.h",
  1765. "$target_gen_dir/torque-generated/class-verifiers.cc",
  1766. "$target_gen_dir/torque-generated/class-verifiers.h",
  1767. "$target_gen_dir/torque-generated/factory.cc",
  1768. "$target_gen_dir/torque-generated/objects-printer.cc",
  1769. ]
  1770. foreach(file, torque_files) {
  1771. filetq = string_replace(file, ".tq", "-tq")
  1772. sources += [
  1773. "$target_gen_dir/torque-generated/$filetq-inl.inc",
  1774. "$target_gen_dir/torque-generated/$filetq.cc",
  1775. "$target_gen_dir/torque-generated/$filetq.inc",
  1776. ]
  1777. }
  1778. configs = [ ":internal_config" ]
  1779. }
  1780. action("generate_bytecode_builtins_list") {
  1781. script = "tools/run.py"
  1782. outputs = [ "$target_gen_dir/builtins-generated/bytecodes-builtins-list.h" ]
  1783. deps = [ ":bytecode_builtins_list_generator($v8_generator_toolchain)" ]
  1784. args = [
  1785. "./" + rebase_path(
  1786. get_label_info(
  1787. ":bytecode_builtins_list_generator($v8_generator_toolchain)",
  1788. "root_out_dir") + "/bytecode_builtins_list_generator",
  1789. root_build_dir),
  1790. rebase_path("$target_gen_dir/builtins-generated/bytecodes-builtins-list.h",
  1791. root_build_dir),
  1792. ]
  1793. }
  1794. # Template to generate different V8 snapshots based on different runtime flags.
  1795. # Can be invoked with run_mksnapshot(<name>). The target will resolve to
  1796. # run_mksnapshot_<name>. If <name> is "default", no file suffixes will be used.
  1797. # Otherwise files are suffixed, e.g. embedded_<name>.S and
  1798. # snapshot_blob_<name>.bin.
  1799. #
  1800. # The template exposes the variables:
  1801. # args: additional flags for mksnapshots
  1802. # embedded_suffix: a camel case suffix for method names in the embedded
  1803. # snapshot.
  1804. template("run_mksnapshot") {
  1805. name = target_name
  1806. if (name == "default") {
  1807. suffix = ""
  1808. } else {
  1809. suffix = "_$name"
  1810. }
  1811. action("run_mksnapshot_" + name) {
  1812. # Only targets in this file and running mkgrokdump can depend on this.
  1813. visibility = [
  1814. ":*",
  1815. "tools/debug_helper:run_mkgrokdump",
  1816. ]
  1817. deps = [ ":mksnapshot($v8_snapshot_toolchain)" ]
  1818. script = "tools/run.py"
  1819. sources = []
  1820. outputs = []
  1821. data = []
  1822. args = [
  1823. "./" + rebase_path(get_label_info(":mksnapshot($v8_snapshot_toolchain)",
  1824. "root_out_dir") + "/mksnapshot",
  1825. root_build_dir),
  1826. "--turbo_instruction_scheduling",
  1827. # In cross builds, the snapshot may be generated for both the host and
  1828. # target toolchains. The same host binary is used to generate both, so
  1829. # mksnapshot needs to know which target OS to use at runtime. It's weird,
  1830. # but the target OS is really |current_os|.
  1831. "--target_os=$current_os",
  1832. "--target_arch=$current_cpu",
  1833. "--embedded_src",
  1834. rebase_path("$target_gen_dir/embedded${suffix}.S", root_build_dir),
  1835. ]
  1836. if (v8_enable_builtins_profiling) {
  1837. args += [ "--turbo-profiling" ]
  1838. }
  1839. if (v8_enable_builtins_profiling_verbose) {
  1840. args += [ "--turbo-profiling-verbose" ]
  1841. }
  1842. if (v8_builtins_profiling_log_file != "") {
  1843. sources += [ v8_builtins_profiling_log_file ]
  1844. args += [
  1845. "--turbo-profiling-log-file",
  1846. rebase_path(v8_builtins_profiling_log_file, root_build_dir),
  1847. ]
  1848. }
  1849. # This is needed to distinguish between generating code for the simulator
  1850. # and cross-compiling. The latter may need to run code on the host with the
  1851. # simulator but cannot use simulator-specific instructions.
  1852. if (target_is_simulator) {
  1853. args += [ "--target_is_simulator" ]
  1854. }
  1855. args += invoker.args
  1856. outputs += [ "$target_gen_dir/embedded${suffix}.S" ]
  1857. if (invoker.embedded_variant != "") {
  1858. args += [
  1859. "--embedded_variant",
  1860. invoker.embedded_variant,
  1861. ]
  1862. }
  1863. if (v8_random_seed != "0") {
  1864. args += [
  1865. "--random-seed",
  1866. v8_random_seed,
  1867. ]
  1868. }
  1869. if (v8_os_page_size != "0") {
  1870. args += [
  1871. "--v8_os_page_size",
  1872. v8_os_page_size,
  1873. ]
  1874. }
  1875. if (v8_use_external_startup_data) {
  1876. outputs += [ "$root_out_dir/snapshot_blob${suffix}.bin" ]
  1877. data += [ "$root_out_dir/snapshot_blob${suffix}.bin" ]
  1878. args += [
  1879. "--startup_blob",
  1880. rebase_path("$root_out_dir/snapshot_blob${suffix}.bin", root_build_dir),
  1881. ]
  1882. } else {
  1883. outputs += [ "$target_gen_dir/snapshot${suffix}.cc" ]
  1884. args += [
  1885. "--startup_src",
  1886. rebase_path("$target_gen_dir/snapshot${suffix}.cc", root_build_dir),
  1887. ]
  1888. }
  1889. if (v8_embed_script != "") {
  1890. sources += [ v8_embed_script ]
  1891. args += [ rebase_path(v8_embed_script, root_build_dir) ]
  1892. }
  1893. if (v8_enable_snapshot_code_comments) {
  1894. args += [ "--code-comments" ]
  1895. }
  1896. if (v8_enable_snapshot_native_code_counters) {
  1897. args += [ "--native-code-counters" ]
  1898. } else {
  1899. # --native-code-counters is the default in debug mode so make sure we can
  1900. # unset it.
  1901. args += [ "--no-native-code-counters" ]
  1902. }
  1903. if (v8_enable_fast_mksnapshot) {
  1904. args += [
  1905. "--no-turbo-rewrite-far-jumps",
  1906. "--no-turbo-verify-allocation",
  1907. ]
  1908. if (v8_enable_debugging_features && v8_enable_slow_dchecks) {
  1909. # mksnapshot only accepts this flag if ENABLE_SLOW_DCHECKS is defined.
  1910. args += [ "--no-enable-slow-asserts" ]
  1911. }
  1912. }
  1913. if (v8_enable_verify_heap) {
  1914. args += [ "--verify-heap" ]
  1915. }
  1916. }
  1917. }
  1918. run_mksnapshot("default") {
  1919. args = []
  1920. embedded_variant = "Default"
  1921. }
  1922. if (emit_builtins_as_inline_asm) {
  1923. asm_to_inline_asm("default") {
  1924. args = []
  1925. }
  1926. }
  1927. action("v8_dump_build_config") {
  1928. script = "tools/testrunner/utils/dump_build_config.py"
  1929. outputs = [ "$root_out_dir/v8_build_config.json" ]
  1930. is_gcov_coverage = v8_code_coverage && !is_clang
  1931. is_full_debug = v8_enable_debugging_features && !v8_optimized_debug
  1932. args = [
  1933. rebase_path("$root_out_dir/v8_build_config.json", root_build_dir),
  1934. "current_cpu=\"$current_cpu\"",
  1935. "dcheck_always_on=$dcheck_always_on",
  1936. "is_android=$is_android",
  1937. "is_asan=$is_asan",
  1938. "is_cfi=$is_cfi",
  1939. "is_clang=$is_clang",
  1940. "is_component_build=$is_component_build",
  1941. "is_debug=$v8_enable_debugging_features",
  1942. "is_full_debug=$is_full_debug",
  1943. "is_gcov_coverage=$is_gcov_coverage",
  1944. "is_msan=$is_msan",
  1945. "is_tsan=$is_tsan",
  1946. "is_ubsan_vptr=$is_ubsan_vptr",
  1947. "target_cpu=\"$target_cpu\"",
  1948. "v8_current_cpu=\"$v8_current_cpu\"",
  1949. "v8_enable_atomic_object_field_writes=" +
  1950. "$v8_enable_atomic_object_field_writes",
  1951. "v8_enable_concurrent_marking=$v8_enable_concurrent_marking",
  1952. "v8_enable_single_generation=$v8_enable_single_generation",
  1953. "v8_enable_i18n_support=$v8_enable_i18n_support",
  1954. "v8_enable_verify_predictable=$v8_enable_verify_predictable",
  1955. "v8_enable_verify_csa=$v8_enable_verify_csa",
  1956. "v8_enable_lite_mode=$v8_enable_lite_mode",
  1957. "v8_enable_runtime_call_stats=$v8_enable_runtime_call_stats",
  1958. "v8_enable_pointer_compression=$v8_enable_pointer_compression",
  1959. "v8_enable_pointer_compression_shared_cage=" +
  1960. "$v8_enable_pointer_compression_shared_cage",
  1961. "v8_enable_sandbox=$v8_enable_sandbox",
  1962. "v8_enable_shared_ro_heap=$v8_enable_shared_ro_heap",
  1963. "v8_enable_third_party_heap=$v8_enable_third_party_heap",
  1964. "v8_enable_webassembly=$v8_enable_webassembly",
  1965. "v8_dict_property_const_tracking=$v8_dict_property_const_tracking",
  1966. "v8_control_flow_integrity=$v8_control_flow_integrity",
  1967. "v8_target_cpu=\"$v8_target_cpu\"",
  1968. "v8_enable_cet_shadow_stack=$v8_enable_cet_shadow_stack",
  1969. ]
  1970. if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel" ||
  1971. v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") {
  1972. args += [
  1973. "mips_arch_variant=\"$mips_arch_variant\"",
  1974. "mips_use_msa=$mips_use_msa",
  1975. ]
  1976. }
  1977. }
  1978. ###############################################################################
  1979. # Source Sets (aka static libraries)
  1980. #
  1981. v8_source_set("v8_snapshot") {
  1982. visibility = [ ":*" ] # Targets in this file can depend on this.
  1983. deps = [
  1984. ":v8_internal_headers",
  1985. ":v8_libbase",
  1986. ]
  1987. public_deps = [
  1988. # This should be public so downstream targets can declare the snapshot
  1989. # output file as their inputs.
  1990. ":run_mksnapshot_default",
  1991. ]
  1992. # Do not publicize any header to remove build dependency.
  1993. public = []
  1994. sources = [ "src/init/setup-isolate-deserialize.cc" ]
  1995. if (v8_control_flow_integrity) {
  1996. sources += [ "src/deoptimizer/deoptimizer-cfi-builtins.cc" ]
  1997. }
  1998. if (emit_builtins_as_inline_asm) {
  1999. deps += [ ":asm_to_inline_asm_default" ]
  2000. sources += [ "$target_gen_dir/embedded.cc" ]
  2001. } else {
  2002. sources += [ "$target_gen_dir/embedded.S" ]
  2003. }
  2004. configs = [ ":internal_config" ]
  2005. if (v8_use_external_startup_data) {
  2006. deps += [ ":v8_base" ]
  2007. sources += [ "src/snapshot/snapshot-external.cc" ]
  2008. } else {
  2009. # Also top-level visibility targets can depend on this.
  2010. visibility += [ "//:gn_visibility" ]
  2011. public_deps += [ ":v8_maybe_icu" ]
  2012. sources += [ "$target_gen_dir/snapshot.cc" ]
  2013. }
  2014. }
  2015. v8_source_set("v8_initializers") {
  2016. visibility = [
  2017. ":*",
  2018. "test/cctest:*",
  2019. ]
  2020. allow_circular_includes_from = [ ":torque_generated_initializers" ]
  2021. deps = [
  2022. ":torque_generated_initializers",
  2023. ":v8_base_without_compiler",
  2024. ":v8_shared_internal_headers",
  2025. ":v8_tracing",
  2026. ]
  2027. sources = [
  2028. ### gcmole(all) ###
  2029. "src/builtins/builtins-array-gen.cc",
  2030. "src/builtins/builtins-array-gen.h",
  2031. "src/builtins/builtins-async-function-gen.cc",
  2032. "src/builtins/builtins-async-gen.cc",
  2033. "src/builtins/builtins-async-gen.h",
  2034. "src/builtins/builtins-async-generator-gen.cc",
  2035. "src/builtins/builtins-async-iterator-gen.cc",
  2036. "src/builtins/builtins-bigint-gen.cc",
  2037. "src/builtins/builtins-bigint-gen.h",
  2038. "src/builtins/builtins-call-gen.cc",
  2039. "src/builtins/builtins-call-gen.h",
  2040. "src/builtins/builtins-collections-gen.cc",
  2041. "src/builtins/builtins-collections-gen.h",
  2042. "src/builtins/builtins-constructor-gen.cc",
  2043. "src/builtins/builtins-constructor-gen.h",
  2044. "src/builtins/builtins-constructor.h",
  2045. "src/builtins/builtins-conversion-gen.cc",
  2046. "src/builtins/builtins-data-view-gen.h",
  2047. "src/builtins/builtins-date-gen.cc",
  2048. "src/builtins/builtins-generator-gen.cc",
  2049. "src/builtins/builtins-global-gen.cc",
  2050. "src/builtins/builtins-handler-gen.cc",
  2051. "src/builtins/builtins-ic-gen.cc",
  2052. "src/builtins/builtins-internal-gen.cc",
  2053. "src/builtins/builtins-interpreter-gen.cc",
  2054. "src/builtins/builtins-intl-gen.cc",
  2055. "src/builtins/builtins-iterator-gen.cc",
  2056. "src/builtins/builtins-iterator-gen.h",
  2057. "src/builtins/builtins-lazy-gen.cc",
  2058. "src/builtins/builtins-lazy-gen.h",
  2059. "src/builtins/builtins-microtask-queue-gen.cc",
  2060. "src/builtins/builtins-number-gen.cc",
  2061. "src/builtins/builtins-object-gen.cc",
  2062. "src/builtins/builtins-promise-gen.cc",
  2063. "src/builtins/builtins-promise-gen.h",
  2064. "src/builtins/builtins-proxy-gen.cc",
  2065. "src/builtins/builtins-proxy-gen.h",
  2066. "src/builtins/builtins-regexp-gen.cc",
  2067. "src/builtins/builtins-regexp-gen.h",
  2068. "src/builtins/builtins-shadowrealm-gen.cc",
  2069. "src/builtins/builtins-sharedarraybuffer-gen.cc",
  2070. "src/builtins/builtins-string-gen.cc",
  2071. "src/builtins/builtins-string-gen.h",
  2072. "src/builtins/builtins-temporal-gen.cc",
  2073. "src/builtins/builtins-typed-array-gen.cc",
  2074. "src/builtins/builtins-typed-array-gen.h",
  2075. "src/builtins/builtins-utils-gen.h",
  2076. "src/builtins/growable-fixed-array-gen.cc",
  2077. "src/builtins/growable-fixed-array-gen.h",
  2078. "src/builtins/profile-data-reader.cc",
  2079. "src/builtins/profile-data-reader.h",
  2080. "src/builtins/setup-builtins-internal.cc",
  2081. "src/builtins/torque-csa-header-includes.h",
  2082. "src/codegen/code-stub-assembler.cc",
  2083. "src/codegen/code-stub-assembler.h",
  2084. "src/heap/setup-heap-internal.cc",
  2085. "src/ic/accessor-assembler.cc",
  2086. "src/ic/accessor-assembler.h",
  2087. "src/ic/binary-op-assembler.cc",
  2088. "src/ic/binary-op-assembler.h",
  2089. "src/ic/keyed-store-generic.cc",
  2090. "src/ic/keyed-store-generic.h",
  2091. "src/ic/unary-op-assembler.cc",
  2092. "src/ic/unary-op-assembler.h",
  2093. "src/interpreter/interpreter-assembler.cc",
  2094. "src/interpreter/interpreter-assembler.h",
  2095. "src/interpreter/interpreter-generator.cc",
  2096. "src/interpreter/interpreter-generator.h",
  2097. "src/interpreter/interpreter-intrinsics-generator.cc",
  2098. "src/interpreter/interpreter-intrinsics-generator.h",
  2099. "src/numbers/integer-literal-inl.h",
  2100. "src/numbers/integer-literal.h",
  2101. ]
  2102. if (v8_enable_webassembly) {
  2103. sources += [
  2104. "src/builtins/builtins-wasm-gen.cc",
  2105. "src/builtins/builtins-wasm-gen.h",
  2106. ]
  2107. }
  2108. if (v8_current_cpu == "x86") {
  2109. sources += [
  2110. ### gcmole(arch:ia32) ###
  2111. "src/builtins/ia32/builtins-ia32.cc",
  2112. ]
  2113. } else if (v8_current_cpu == "x64") {
  2114. sources += [
  2115. ### gcmole(arch:x64) ###
  2116. "src/builtins/x64/builtins-x64.cc",
  2117. ]
  2118. } else if (v8_current_cpu == "arm") {
  2119. sources += [
  2120. ### gcmole(arch:arm) ###
  2121. "src/builtins/arm/builtins-arm.cc",
  2122. ]
  2123. } else if (v8_current_cpu == "arm64") {
  2124. sources += [
  2125. ### gcmole(arch:arm64) ###
  2126. "src/builtins/arm64/builtins-arm64.cc",
  2127. ]
  2128. } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") {
  2129. sources += [
  2130. ### gcmole(arch:mipsel) ###
  2131. "src/builtins/mips/builtins-mips.cc",
  2132. ]
  2133. } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") {
  2134. sources += [
  2135. ### gcmole(arch:mips64el) ###
  2136. "src/builtins/mips64/builtins-mips64.cc",
  2137. ]
  2138. } else if (v8_current_cpu == "loong64") {
  2139. sources += [
  2140. ### gcmole(arch:loong64) ###
  2141. "src/builtins/loong64/builtins-loong64.cc",
  2142. ]
  2143. } else if (v8_current_cpu == "ppc") {
  2144. sources += [
  2145. ### gcmole(arch:ppc) ###
  2146. "src/builtins/ppc/builtins-ppc.cc",
  2147. ]
  2148. } else if (v8_current_cpu == "ppc64") {
  2149. sources += [
  2150. ### gcmole(arch:ppc64) ###
  2151. "src/builtins/ppc/builtins-ppc.cc",
  2152. ]
  2153. } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
  2154. sources += [
  2155. ### gcmole(arch:s390) ###
  2156. "src/builtins/s390/builtins-s390.cc",
  2157. ]
  2158. } else if (v8_current_cpu == "riscv64") {
  2159. sources += [
  2160. ### gcmole(arch:riscv64) ###
  2161. "src/builtins/riscv64/builtins-riscv64.cc",
  2162. ]
  2163. }
  2164. if (!v8_enable_i18n_support) {
  2165. sources -= [ "src/builtins/builtins-intl-gen.cc" ]
  2166. }
  2167. configs = [ ":internal_config" ]
  2168. }
  2169. v8_source_set("v8_init") {
  2170. visibility = [ ":*" ] # Only targets in this file can depend on this.
  2171. deps = [
  2172. ":v8_base_without_compiler",
  2173. ":v8_initializers",
  2174. ":v8_tracing",
  2175. ]
  2176. sources = [
  2177. ### gcmole(all) ###
  2178. "src/init/setup-isolate-full.cc",
  2179. ]
  2180. public_deps = [ ":v8_maybe_icu" ]
  2181. configs = [ ":internal_config" ]
  2182. }
  2183. # This is split out to be a non-code containing target that the Chromium browser
  2184. # DLL can depend upon to get only a version string.
  2185. v8_header_set("v8_version") {
  2186. configs = [ ":internal_config" ]
  2187. sources = [
  2188. "include/v8-value-serializer-version.h",
  2189. "include/v8-version-string.h",
  2190. "include/v8-version.h",
  2191. ]
  2192. }
  2193. v8_header_set("v8_config_headers") {
  2194. configs = [ ":internal_config" ]
  2195. sources = [
  2196. "include/v8-platform.h",
  2197. "include/v8config.h",
  2198. ]
  2199. deps = []
  2200. if (v8_generate_external_defines_header) {
  2201. sources += [ "$target_gen_dir/include/v8-gn.h" ]
  2202. deps += [ ":gen_v8_gn" ]
  2203. }
  2204. }
  2205. # This is split out to be a non-code containing target that the Chromium browser
  2206. # can depend upon to get basic v8 types.
  2207. v8_header_set("v8_headers") {
  2208. configs = [ ":internal_config" ]
  2209. public_configs = [ ":headers_config" ]
  2210. sources = [
  2211. "include/v8-array-buffer.h",
  2212. "include/v8-callbacks.h",
  2213. "include/v8-container.h",
  2214. "include/v8-context.h",
  2215. "include/v8-cppgc.h",
  2216. "include/v8-data.h",
  2217. "include/v8-date.h",
  2218. "include/v8-debug.h",
  2219. "include/v8-embedder-heap.h",
  2220. "include/v8-embedder-state-scope.h",
  2221. "include/v8-exception.h",
  2222. "include/v8-extension.h",
  2223. "include/v8-external.h",
  2224. "include/v8-fast-api-calls.h",
  2225. "include/v8-forward.h",
  2226. "include/v8-function-callback.h",
  2227. "include/v8-function.h",
  2228. "include/v8-initialization.h",
  2229. "include/v8-internal.h",
  2230. "include/v8-isolate.h",
  2231. "include/v8-json.h",
  2232. "include/v8-local-handle.h",
  2233. "include/v8-locker.h",
  2234. "include/v8-maybe.h",
  2235. "include/v8-memory-span.h",
  2236. "include/v8-message.h",
  2237. "include/v8-microtask-queue.h",
  2238. "include/v8-microtask.h",
  2239. "include/v8-object.h",
  2240. "include/v8-persistent-handle.h",
  2241. "include/v8-primitive-object.h",
  2242. "include/v8-primitive.h",
  2243. "include/v8-profiler.h",
  2244. "include/v8-promise.h",
  2245. "include/v8-proxy.h",
  2246. "include/v8-regexp.h",
  2247. "include/v8-script.h",
  2248. "include/v8-snapshot.h",
  2249. "include/v8-statistics.h",
  2250. "include/v8-template.h",
  2251. "include/v8-traced-handle.h",
  2252. "include/v8-typed-array.h",
  2253. "include/v8-unwinder.h",
  2254. "include/v8-util.h",
  2255. "include/v8-value-serializer.h",
  2256. "include/v8-value.h",
  2257. "include/v8-wasm.h",
  2258. "include/v8-weak-callback-info.h",
  2259. "include/v8.h",
  2260. ]
  2261. sources += [
  2262. # The following headers cannot be platform-specific. The include validation
  2263. # of `gn gen $dir --check` requires all header files to be available on all
  2264. # platforms.
  2265. "include/v8-wasm-trap-handler-posix.h",
  2266. "include/v8-wasm-trap-handler-win.h",
  2267. ]
  2268. public_deps = [ ":v8_config_headers" ]
  2269. deps = [
  2270. ":cppgc_headers",
  2271. ":v8_version",
  2272. ]
  2273. }
  2274. if (v8_generate_external_defines_header) {
  2275. action("gen_v8_gn") {
  2276. visibility = [ ":*" ]
  2277. script = "tools/gen-v8-gn.py"
  2278. outputs = [ "$target_gen_dir/include/v8-gn.h" ]
  2279. args = [
  2280. "-o",
  2281. rebase_path("$target_gen_dir/include/v8-gn.h", root_build_dir),
  2282. ]
  2283. foreach(define, enabled_external_defines) {
  2284. args += [
  2285. "-p",
  2286. define,
  2287. ]
  2288. }
  2289. foreach(define, disabled_external_defines) {
  2290. args += [
  2291. "-n",
  2292. define,
  2293. ]
  2294. }
  2295. }
  2296. }
  2297. # This is split out to share basic headers with Torque and everything else:(
  2298. v8_header_set("v8_shared_internal_headers") {
  2299. visibility = [
  2300. ":*",
  2301. "test/*",
  2302. "tools/*",
  2303. ]
  2304. configs = [ ":internal_config" ]
  2305. sources = [
  2306. "src/common/globals.h",
  2307. "src/wasm/wasm-constants.h",
  2308. "src/wasm/wasm-limits.h",
  2309. ]
  2310. deps = [
  2311. ":v8_headers",
  2312. ":v8_libbase",
  2313. ]
  2314. }
  2315. v8_header_set("v8_flags") {
  2316. visibility = [
  2317. ":*",
  2318. "tools/*",
  2319. ]
  2320. configs = [ ":internal_config" ]
  2321. sources = [
  2322. "src/flags/flag-definitions.h",
  2323. "src/flags/flags.h",
  2324. ]
  2325. deps = [ ":v8_shared_internal_headers" ]
  2326. }
  2327. v8_header_set("v8_internal_headers") {
  2328. configs = [ ":internal_config" ]
  2329. sources = [
  2330. ### gcmole(all) ###
  2331. "$target_gen_dir/builtins-generated/bytecodes-builtins-list.h",
  2332. "//base/trace_event/common/trace_event_common.h",
  2333. "include/cppgc/common.h",
  2334. "include/v8-inspector-protocol.h",
  2335. "include/v8-inspector.h",
  2336. "include/v8-metrics.h",
  2337. "include/v8-unwinder-state.h",
  2338. "include/v8-wasm-trap-handler-posix.h",
  2339. "src/api/api-arguments-inl.h",
  2340. "src/api/api-arguments.h",
  2341. "src/api/api-inl.h",
  2342. "src/api/api-macros-undef.h",
  2343. "src/api/api-macros.h",
  2344. "src/api/api-natives.h",
  2345. "src/api/api.h",
  2346. "src/ast/ast-function-literal-id-reindexer.h",
  2347. "src/ast/ast-source-ranges.h",
  2348. "src/ast/ast-traversal-visitor.h",
  2349. "src/ast/ast-value-factory.h",
  2350. "src/ast/ast.h",
  2351. "src/ast/modules.h",
  2352. "src/ast/prettyprinter.h",
  2353. "src/ast/scopes.h",
  2354. "src/ast/source-range-ast-visitor.h",
  2355. "src/ast/variables.h",
  2356. "src/baseline/baseline-assembler-inl.h",
  2357. "src/baseline/baseline-assembler.h",
  2358. "src/baseline/baseline-batch-compiler.h",
  2359. "src/baseline/baseline-compiler.h",
  2360. "src/baseline/baseline.h",
  2361. "src/baseline/bytecode-offset-iterator.h",
  2362. "src/builtins/accessors.h",
  2363. "src/builtins/builtins-constructor.h",
  2364. "src/builtins/builtins-definitions.h",
  2365. "src/builtins/builtins-descriptors.h",
  2366. "src/builtins/builtins-promise.h",
  2367. "src/builtins/builtins-utils-inl.h",
  2368. "src/builtins/builtins-utils.h",
  2369. "src/builtins/builtins.h",
  2370. "src/builtins/constants-table-builder.h",
  2371. "src/builtins/profile-data-reader.h",
  2372. "src/codegen/aligned-slot-allocator.h",
  2373. "src/codegen/assembler-arch.h",
  2374. "src/codegen/assembler-inl.h",
  2375. "src/codegen/assembler.h",
  2376. "src/codegen/atomic-memory-order.h",
  2377. "src/codegen/bailout-reason.h",
  2378. "src/codegen/callable.h",
  2379. "src/codegen/code-comments.h",
  2380. "src/codegen/code-desc.h",
  2381. "src/codegen/code-factory.h",
  2382. "src/codegen/code-reference.h",
  2383. "src/codegen/compilation-cache.h",
  2384. "src/codegen/compiler.h",
  2385. "src/codegen/constant-pool.h",
  2386. "src/codegen/constants-arch.h",
  2387. "src/codegen/cpu-features.h",
  2388. "src/codegen/external-reference-encoder.h",
  2389. "src/codegen/external-reference-table.h",
  2390. "src/codegen/external-reference.h",
  2391. "src/codegen/flush-instruction-cache.h",
  2392. "src/codegen/handler-table.h",
  2393. "src/codegen/interface-descriptors-inl.h",
  2394. "src/codegen/interface-descriptors.h",
  2395. "src/codegen/label.h",
  2396. "src/codegen/machine-type.h",
  2397. "src/codegen/macro-assembler-inl.h",
  2398. "src/codegen/macro-assembler.h",
  2399. "src/codegen/optimized-compilation-info.h",
  2400. "src/codegen/pending-optimization-table.h",
  2401. "src/codegen/register-arch.h",
  2402. "src/codegen/register-base.h",
  2403. "src/codegen/register-configuration.h",
  2404. "src/codegen/register.h",
  2405. "src/codegen/reglist-base.h",
  2406. "src/codegen/reglist.h",
  2407. "src/codegen/reloc-info.h",
  2408. "src/codegen/safepoint-table.h",
  2409. "src/codegen/script-details.h",
  2410. "src/codegen/signature.h",
  2411. "src/codegen/source-position-table.h",
  2412. "src/codegen/source-position.h",
  2413. "src/codegen/string-constants.h",
  2414. "src/codegen/tick-counter.h",
  2415. "src/codegen/tnode.h",
  2416. "src/codegen/turbo-assembler.h",
  2417. "src/codegen/unoptimized-compilation-info.h",
  2418. "src/common/allow-deprecated.h",
  2419. "src/common/assert-scope.h",
  2420. "src/common/checks.h",
  2421. "src/common/high-allocation-throughput-scope.h",
  2422. "src/common/message-template.h",
  2423. "src/common/operation.h",
  2424. "src/common/ptr-compr-inl.h",
  2425. "src/common/ptr-compr.h",
  2426. "src/compiler-dispatcher/lazy-compile-dispatcher.h",
  2427. "src/compiler-dispatcher/optimizing-compile-dispatcher.h",
  2428. "src/compiler/access-builder.h",
  2429. "src/compiler/access-info.h",
  2430. "src/compiler/add-type-assertions-reducer.h",
  2431. "src/compiler/all-nodes.h",
  2432. "src/compiler/allocation-builder-inl.h",
  2433. "src/compiler/allocation-builder.h",
  2434. "src/compiler/backend/code-generator-impl.h",
  2435. "src/compiler/backend/code-generator.h",
  2436. "src/compiler/backend/frame-elider.h",
  2437. "src/compiler/backend/gap-resolver.h",
  2438. "src/compiler/backend/instruction-codes.h",
  2439. "src/compiler/backend/instruction-scheduler.h",
  2440. "src/compiler/backend/instruction-selector-impl.h",
  2441. "src/compiler/backend/instruction-selector.h",
  2442. "src/compiler/backend/instruction.h",
  2443. "src/compiler/backend/jump-threading.h",
  2444. "src/compiler/backend/mid-tier-register-allocator.h",
  2445. "src/compiler/backend/move-optimizer.h",
  2446. "src/compiler/backend/register-allocation.h",
  2447. "src/compiler/backend/register-allocator-verifier.h",
  2448. "src/compiler/backend/register-allocator.h",
  2449. "src/compiler/backend/spill-placer.h",
  2450. "src/compiler/backend/unwinding-info-writer.h",
  2451. "src/compiler/basic-block-instrumentor.h",
  2452. "src/compiler/branch-condition-duplicator.h",
  2453. "src/compiler/branch-elimination.h",
  2454. "src/compiler/bytecode-analysis.h",
  2455. "src/compiler/bytecode-graph-builder.h",
  2456. "src/compiler/bytecode-liveness-map.h",
  2457. "src/compiler/checkpoint-elimination.h",
  2458. "src/compiler/code-assembler.h",
  2459. "src/compiler/common-node-cache.h",
  2460. "src/compiler/common-operator-reducer.h",
  2461. "src/compiler/common-operator.h",
  2462. "src/compiler/compilation-dependencies.h",
  2463. "src/compiler/compiler-source-position-table.h",
  2464. "src/compiler/constant-folding-reducer.h",
  2465. "src/compiler/control-equivalence.h",
  2466. "src/compiler/control-flow-optimizer.h",
  2467. "src/compiler/csa-load-elimination.h",
  2468. "src/compiler/dead-code-elimination.h",
  2469. "src/compiler/decompression-optimizer.h",
  2470. "src/compiler/diamond.h",
  2471. "src/compiler/effect-control-linearizer.h",
  2472. "src/compiler/escape-analysis-reducer.h",
  2473. "src/compiler/escape-analysis.h",
  2474. "src/compiler/fast-api-calls.h",
  2475. "src/compiler/feedback-source.h",
  2476. "src/compiler/frame-states.h",
  2477. "src/compiler/frame.h",
  2478. "src/compiler/functional-list.h",
  2479. "src/compiler/globals.h",
  2480. "src/compiler/graph-assembler.h",
  2481. "src/compiler/graph-reducer.h",
  2482. "src/compiler/graph-trimmer.h",
  2483. "src/compiler/graph-visualizer.h",
  2484. "src/compiler/graph-zone-traits.h",
  2485. "src/compiler/graph.h",
  2486. "src/compiler/heap-refs.h",
  2487. "src/compiler/js-call-reducer.h",
  2488. "src/compiler/js-context-specialization.h",
  2489. "src/compiler/js-create-lowering.h",
  2490. "src/compiler/js-generic-lowering.h",
  2491. "src/compiler/js-graph.h",
  2492. "src/compiler/js-heap-broker.h",
  2493. "src/compiler/js-inlining-heuristic.h",
  2494. "src/compiler/js-inlining.h",
  2495. "src/compiler/js-intrinsic-lowering.h",
  2496. "src/compiler/js-native-context-specialization.h",
  2497. "src/compiler/js-operator.h",
  2498. "src/compiler/js-type-hint-lowering.h",
  2499. "src/compiler/js-typed-lowering.h",
  2500. "src/compiler/linkage.h",
  2501. "src/compiler/load-elimination.h",
  2502. "src/compiler/loop-analysis.h",
  2503. "src/compiler/loop-peeling.h",
  2504. "src/compiler/loop-unrolling.h",
  2505. "src/compiler/loop-variable-optimizer.h",
  2506. "src/compiler/machine-graph-verifier.h",
  2507. "src/compiler/machine-graph.h",
  2508. "src/compiler/machine-operator-reducer.h",
  2509. "src/compiler/machine-operator.h",
  2510. "src/compiler/map-inference.h",
  2511. "src/compiler/memory-lowering.h",
  2512. "src/compiler/memory-optimizer.h",
  2513. "src/compiler/node-aux-data.h",
  2514. "src/compiler/node-cache.h",
  2515. "src/compiler/node-marker.h",
  2516. "src/compiler/node-matchers.h",
  2517. "src/compiler/node-observer.h",
  2518. "src/compiler/node-origin-table.h",
  2519. "src/compiler/node-properties.h",
  2520. "src/compiler/node.h",
  2521. "src/compiler/opcodes.h",
  2522. "src/compiler/operation-typer.h",
  2523. "src/compiler/operator-properties.h",
  2524. "src/compiler/operator.h",
  2525. "src/compiler/osr.h",
  2526. "src/compiler/per-isolate-compiler-cache.h",
  2527. "src/compiler/persistent-map.h",
  2528. "src/compiler/pipeline-statistics.h",
  2529. "src/compiler/pipeline.h",
  2530. "src/compiler/processed-feedback.h",
  2531. "src/compiler/property-access-builder.h",
  2532. "src/compiler/raw-machine-assembler.h",
  2533. "src/compiler/redundancy-elimination.h",
  2534. "src/compiler/refs-map.h",
  2535. "src/compiler/representation-change.h",
  2536. "src/compiler/schedule.h",
  2537. "src/compiler/scheduler.h",
  2538. "src/compiler/select-lowering.h",
  2539. "src/compiler/simplified-lowering-verifier.h",
  2540. "src/compiler/simplified-lowering.h",
  2541. "src/compiler/simplified-operator-reducer.h",
  2542. "src/compiler/simplified-operator.h",
  2543. "src/compiler/state-values-utils.h",
  2544. "src/compiler/store-store-elimination.h",
  2545. "src/compiler/type-cache.h",
  2546. "src/compiler/type-narrowing-reducer.h",
  2547. "src/compiler/typed-optimization.h",
  2548. "src/compiler/typer.h",
  2549. "src/compiler/types.h",
  2550. "src/compiler/value-numbering-reducer.h",
  2551. "src/compiler/verifier.h",
  2552. "src/compiler/write-barrier-kind.h",
  2553. "src/compiler/zone-stats.h",
  2554. "src/date/date.h",
  2555. "src/date/dateparser-inl.h",
  2556. "src/date/dateparser.h",
  2557. "src/debug/debug-coverage.h",
  2558. "src/debug/debug-evaluate.h",
  2559. "src/debug/debug-frames.h",
  2560. "src/debug/debug-interface.h",
  2561. "src/debug/debug-property-iterator.h",
  2562. "src/debug/debug-scope-iterator.h",
  2563. "src/debug/debug-scopes.h",
  2564. "src/debug/debug-stack-trace-iterator.h",
  2565. "src/debug/debug-type-profile.h",
  2566. "src/debug/debug.h",
  2567. "src/debug/interface-types.h",
  2568. "src/debug/liveedit.h",
  2569. "src/deoptimizer/deoptimize-reason.h",
  2570. "src/deoptimizer/deoptimized-frame-info.h",
  2571. "src/deoptimizer/deoptimizer.h",
  2572. "src/deoptimizer/frame-description.h",
  2573. "src/deoptimizer/materialized-object-store.h",
  2574. "src/deoptimizer/translated-state.h",
  2575. "src/deoptimizer/translation-array.h",
  2576. "src/deoptimizer/translation-opcode.h",
  2577. "src/diagnostics/basic-block-profiler.h",
  2578. "src/diagnostics/code-tracer.h",
  2579. "src/diagnostics/compilation-statistics.h",
  2580. "src/diagnostics/disasm.h",
  2581. "src/diagnostics/disassembler.h",
  2582. "src/diagnostics/eh-frame.h",
  2583. "src/diagnostics/gdb-jit.h",
  2584. "src/diagnostics/perf-jit.h",
  2585. "src/diagnostics/unwinder.h",
  2586. "src/execution/arguments-inl.h",
  2587. "src/execution/arguments.h",
  2588. "src/execution/clobber-registers.h",
  2589. "src/execution/embedder-state.h",
  2590. "src/execution/encoded-c-signature.h",
  2591. "src/execution/execution.h",
  2592. "src/execution/frame-constants.h",
  2593. "src/execution/frames-inl.h",
  2594. "src/execution/frames.h",
  2595. "src/execution/futex-emulation.h",
  2596. "src/execution/interrupts-scope.h",
  2597. "src/execution/isolate-data.h",
  2598. "src/execution/isolate-inl.h",
  2599. "src/execution/isolate-utils-inl.h",
  2600. "src/execution/isolate-utils.h",
  2601. "src/execution/isolate.h",
  2602. "src/execution/local-isolate-inl.h",
  2603. "src/execution/local-isolate.h",
  2604. "src/execution/messages.h",
  2605. "src/execution/microtask-queue.h",
  2606. "src/execution/pointer-authentication.h",
  2607. "src/execution/protectors-inl.h",
  2608. "src/execution/protectors.h",
  2609. "src/execution/shared-mutex-guard-if-off-thread.h",
  2610. "src/execution/simulator-base.h",
  2611. "src/execution/simulator.h",
  2612. "src/execution/stack-guard.h",
  2613. "src/execution/thread-id.h",
  2614. "src/execution/thread-local-top.h",
  2615. "src/execution/tiering-manager.h",
  2616. "src/execution/v8threads.h",
  2617. "src/execution/vm-state-inl.h",
  2618. "src/execution/vm-state.h",
  2619. "src/extensions/cputracemark-extension.h",
  2620. "src/extensions/externalize-string-extension.h",
  2621. "src/extensions/gc-extension.h",
  2622. "src/extensions/ignition-statistics-extension.h",
  2623. "src/extensions/statistics-extension.h",
  2624. "src/extensions/trigger-failure-extension.h",
  2625. "src/handles/global-handles-inl.h",
  2626. "src/handles/global-handles.h",
  2627. "src/handles/handles-inl.h",
  2628. "src/handles/handles.h",
  2629. "src/handles/local-handles-inl.h",
  2630. "src/handles/local-handles.h",
  2631. "src/handles/maybe-handles-inl.h",
  2632. "src/handles/maybe-handles.h",
  2633. "src/handles/persistent-handles.h",
  2634. "src/heap/allocation-observer.h",
  2635. "src/heap/allocation-result.h",
  2636. "src/heap/allocation-stats.h",
  2637. "src/heap/array-buffer-sweeper.h",
  2638. "src/heap/base-space.h",
  2639. "src/heap/basic-memory-chunk.h",
  2640. "src/heap/code-object-registry.h",
  2641. "src/heap/code-range.h",
  2642. "src/heap/code-stats.h",
  2643. "src/heap/collection-barrier.h",
  2644. "src/heap/combined-heap.h",
  2645. "src/heap/concurrent-allocator-inl.h",
  2646. "src/heap/concurrent-allocator.h",
  2647. "src/heap/concurrent-marking.h",
  2648. "src/heap/cppgc-js/cpp-heap.h",
  2649. "src/heap/cppgc-js/cpp-marking-state-inl.h",
  2650. "src/heap/cppgc-js/cpp-marking-state.h",
  2651. "src/heap/cppgc-js/cpp-snapshot.h",
  2652. "src/heap/cppgc-js/unified-heap-marking-state-inl.h",
  2653. "src/heap/cppgc-js/unified-heap-marking-state.h",
  2654. "src/heap/cppgc-js/unified-heap-marking-verifier.h",
  2655. "src/heap/cppgc-js/unified-heap-marking-visitor.h",
  2656. "src/heap/embedder-tracing-inl.h",
  2657. "src/heap/embedder-tracing.h",
  2658. "src/heap/evacuation-allocator-inl.h",
  2659. "src/heap/evacuation-allocator.h",
  2660. "src/heap/factory-base-inl.h",
  2661. "src/heap/factory-base.h",
  2662. "src/heap/factory-inl.h",
  2663. "src/heap/factory.h",
  2664. "src/heap/finalization-registry-cleanup-task.h",
  2665. "src/heap/free-list-inl.h",
  2666. "src/heap/free-list.h",
  2667. "src/heap/gc-idle-time-handler.h",
  2668. "src/heap/gc-tracer-inl.h",
  2669. "src/heap/gc-tracer.h",
  2670. "src/heap/heap-allocator-inl.h",
  2671. "src/heap/heap-allocator.h",
  2672. "src/heap/heap-controller.h",
  2673. "src/heap/heap-inl.h",
  2674. "src/heap/heap-layout-tracer.h",
  2675. "src/heap/heap-write-barrier-inl.h",
  2676. "src/heap/heap-write-barrier.h",
  2677. "src/heap/heap.h",
  2678. "src/heap/incremental-marking-inl.h",
  2679. "src/heap/incremental-marking-job.h",
  2680. "src/heap/incremental-marking.h",
  2681. "src/heap/index-generator.h",
  2682. "src/heap/invalidated-slots-inl.h",
  2683. "src/heap/invalidated-slots.h",
  2684. "src/heap/large-spaces.h",
  2685. "src/heap/linear-allocation-area.h",
  2686. "src/heap/list.h",
  2687. "src/heap/local-factory-inl.h",
  2688. "src/heap/local-factory.h",
  2689. "src/heap/local-heap-inl.h",
  2690. "src/heap/local-heap.h",
  2691. "src/heap/mark-compact-inl.h",
  2692. "src/heap/mark-compact.h",
  2693. "src/heap/marking-barrier-inl.h",
  2694. "src/heap/marking-barrier.h",
  2695. "src/heap/marking-visitor-inl.h",
  2696. "src/heap/marking-visitor.h",
  2697. "src/heap/marking-worklist-inl.h",
  2698. "src/heap/marking-worklist.h",
  2699. "src/heap/marking.h",
  2700. "src/heap/memory-allocator.h",
  2701. "src/heap/memory-chunk-inl.h",
  2702. "src/heap/memory-chunk-layout.h",
  2703. "src/heap/memory-chunk.h",
  2704. "src/heap/memory-measurement-inl.h",
  2705. "src/heap/memory-measurement.h",
  2706. "src/heap/memory-reducer.h",
  2707. "src/heap/new-spaces-inl.h",
  2708. "src/heap/new-spaces.h",
  2709. "src/heap/object-stats.h",
  2710. "src/heap/objects-visiting-inl.h",
  2711. "src/heap/objects-visiting.h",
  2712. "src/heap/paged-spaces-inl.h",
  2713. "src/heap/paged-spaces.h",
  2714. "src/heap/parallel-work-item.h",
  2715. "src/heap/parked-scope.h",
  2716. "src/heap/progress-bar.h",
  2717. "src/heap/read-only-heap-inl.h",
  2718. "src/heap/read-only-heap.h",
  2719. "src/heap/read-only-spaces.h",
  2720. "src/heap/remembered-set-inl.h",
  2721. "src/heap/remembered-set.h",
  2722. "src/heap/safepoint.h",
  2723. "src/heap/scavenge-job.h",
  2724. "src/heap/scavenger-inl.h",
  2725. "src/heap/scavenger.h",
  2726. "src/heap/slot-set.h",
  2727. "src/heap/spaces-inl.h",
  2728. "src/heap/spaces.h",
  2729. "src/heap/stress-marking-observer.h",
  2730. "src/heap/stress-scavenge-observer.h",
  2731. "src/heap/sweeper.h",
  2732. "src/heap/weak-object-worklists.h",
  2733. "src/ic/call-optimization.h",
  2734. "src/ic/handler-configuration-inl.h",
  2735. "src/ic/handler-configuration.h",
  2736. "src/ic/ic-inl.h",
  2737. "src/ic/ic-stats.h",
  2738. "src/ic/ic.h",
  2739. "src/ic/stub-cache.h",
  2740. "src/init/bootstrapper.h",
  2741. "src/init/heap-symbols.h",
  2742. "src/init/icu_util.h",
  2743. "src/init/isolate-allocator.h",
  2744. "src/init/setup-isolate.h",
  2745. "src/init/startup-data-util.h",
  2746. "src/init/v8.h",
  2747. "src/interpreter/block-coverage-builder.h",
  2748. "src/interpreter/bytecode-array-builder.h",
  2749. "src/interpreter/bytecode-array-iterator.h",
  2750. "src/interpreter/bytecode-array-random-iterator.h",
  2751. "src/interpreter/bytecode-array-writer.h",
  2752. "src/interpreter/bytecode-decoder.h",
  2753. "src/interpreter/bytecode-flags.h",
  2754. "src/interpreter/bytecode-generator.h",
  2755. "src/interpreter/bytecode-jump-table.h",
  2756. "src/interpreter/bytecode-label.h",
  2757. "src/interpreter/bytecode-node.h",
  2758. "src/interpreter/bytecode-operands.h",
  2759. "src/interpreter/bytecode-register-allocator.h",
  2760. "src/interpreter/bytecode-register-optimizer.h",
  2761. "src/interpreter/bytecode-register.h",
  2762. "src/interpreter/bytecode-source-info.h",
  2763. "src/interpreter/bytecode-traits.h",
  2764. "src/interpreter/bytecodes.h",
  2765. "src/interpreter/constant-array-builder.h",
  2766. "src/interpreter/control-flow-builders.h",
  2767. "src/interpreter/handler-table-builder.h",
  2768. "src/interpreter/interpreter-generator.h",
  2769. "src/interpreter/interpreter-intrinsics.h",
  2770. "src/interpreter/interpreter.h",
  2771. "src/json/json-parser.h",
  2772. "src/json/json-stringifier.h",
  2773. "src/libsampler/sampler.h",
  2774. "src/logging/code-events.h",
  2775. "src/logging/counters-definitions.h",
  2776. "src/logging/counters-scopes.h",
  2777. "src/logging/counters.h",
  2778. "src/logging/local-logger.h",
  2779. "src/logging/log-inl.h",
  2780. "src/logging/log-utils.h",
  2781. "src/logging/log.h",
  2782. "src/logging/metrics.h",
  2783. "src/logging/runtime-call-stats-scope.h",
  2784. "src/logging/runtime-call-stats.h",
  2785. "src/logging/tracing-flags.h",
  2786. "src/numbers/conversions-inl.h",
  2787. "src/numbers/conversions.h",
  2788. "src/numbers/hash-seed-inl.h",
  2789. "src/numbers/math-random.h",
  2790. "src/objects/all-objects-inl.h",
  2791. "src/objects/allocation-site-inl.h",
  2792. "src/objects/allocation-site-scopes-inl.h",
  2793. "src/objects/allocation-site-scopes.h",
  2794. "src/objects/allocation-site.h",
  2795. "src/objects/api-callbacks-inl.h",
  2796. "src/objects/api-callbacks.h",
  2797. "src/objects/arguments-inl.h",
  2798. "src/objects/arguments.h",
  2799. "src/objects/backing-store.h",
  2800. "src/objects/bigint-inl.h",
  2801. "src/objects/bigint.h",
  2802. "src/objects/call-site-info-inl.h",
  2803. "src/objects/call-site-info.h",
  2804. "src/objects/cell-inl.h",
  2805. "src/objects/cell.h",
  2806. "src/objects/code-inl.h",
  2807. "src/objects/code-kind.h",
  2808. "src/objects/code.h",
  2809. "src/objects/compilation-cache-table-inl.h",
  2810. "src/objects/compilation-cache-table.h",
  2811. "src/objects/compressed-slots-inl.h",
  2812. "src/objects/compressed-slots.h",
  2813. "src/objects/contexts-inl.h",
  2814. "src/objects/contexts.h",
  2815. "src/objects/data-handler-inl.h",
  2816. "src/objects/data-handler.h",
  2817. "src/objects/debug-objects-inl.h",
  2818. "src/objects/debug-objects.h",
  2819. "src/objects/descriptor-array-inl.h",
  2820. "src/objects/descriptor-array.h",
  2821. "src/objects/dictionary-inl.h",
  2822. "src/objects/dictionary.h",
  2823. "src/objects/elements-inl.h",
  2824. "src/objects/elements-kind.h",
  2825. "src/objects/elements.h",
  2826. "src/objects/embedder-data-array-inl.h",
  2827. "src/objects/embedder-data-array.h",
  2828. "src/objects/embedder-data-slot-inl.h",
  2829. "src/objects/embedder-data-slot.h",
  2830. "src/objects/feedback-cell-inl.h",
  2831. "src/objects/feedback-cell.h",
  2832. "src/objects/feedback-vector-inl.h",
  2833. "src/objects/feedback-vector.h",
  2834. "src/objects/field-index-inl.h",
  2835. "src/objects/field-index.h",
  2836. "src/objects/field-type.h",
  2837. "src/objects/fixed-array-inl.h",
  2838. "src/objects/fixed-array.h",
  2839. "src/objects/foreign-inl.h",
  2840. "src/objects/foreign.h",
  2841. "src/objects/free-space-inl.h",
  2842. "src/objects/free-space.h",
  2843. "src/objects/function-kind.h",
  2844. "src/objects/function-syntax-kind.h",
  2845. "src/objects/hash-table-inl.h",
  2846. "src/objects/hash-table.h",
  2847. "src/objects/heap-number-inl.h",
  2848. "src/objects/heap-number.h",
  2849. "src/objects/heap-object-inl.h",
  2850. "src/objects/heap-object.h",
  2851. "src/objects/instance-type-inl.h",
  2852. "src/objects/instance-type.h",
  2853. "src/objects/internal-index.h",
  2854. "src/objects/js-array-buffer-inl.h",
  2855. "src/objects/js-array-buffer.h",
  2856. "src/objects/js-array-inl.h",
  2857. "src/objects/js-array.h",
  2858. "src/objects/js-collection-inl.h",
  2859. "src/objects/js-collection-iterator-inl.h",
  2860. "src/objects/js-collection-iterator.h",
  2861. "src/objects/js-collection.h",
  2862. "src/objects/js-function-inl.h",
  2863. "src/objects/js-function.h",
  2864. "src/objects/js-generator-inl.h",
  2865. "src/objects/js-generator.h",
  2866. "src/objects/js-objects-inl.h",
  2867. "src/objects/js-objects.h",
  2868. "src/objects/js-promise-inl.h",
  2869. "src/objects/js-promise.h",
  2870. "src/objects/js-proxy-inl.h",
  2871. "src/objects/js-proxy.h",
  2872. "src/objects/js-regexp-inl.h",
  2873. "src/objects/js-regexp-string-iterator-inl.h",
  2874. "src/objects/js-regexp-string-iterator.h",
  2875. "src/objects/js-regexp.h",
  2876. "src/objects/js-segments-inl.h",
  2877. "src/objects/js-segments.h",
  2878. "src/objects/js-shadow-realms-inl.h",
  2879. "src/objects/js-shadow-realms.h",
  2880. "src/objects/js-struct-inl.h",
  2881. "src/objects/js-struct.h",
  2882. "src/objects/js-temporal-objects-inl.h",
  2883. "src/objects/js-temporal-objects.h",
  2884. "src/objects/js-weak-refs-inl.h",
  2885. "src/objects/js-weak-refs.h",
  2886. "src/objects/keys.h",
  2887. "src/objects/literal-objects-inl.h",
  2888. "src/objects/literal-objects.h",
  2889. "src/objects/lookup-cache-inl.h",
  2890. "src/objects/lookup-cache.h",
  2891. "src/objects/lookup-inl.h",
  2892. "src/objects/lookup.h",
  2893. "src/objects/managed-inl.h",
  2894. "src/objects/managed.h",
  2895. "src/objects/map-inl.h",
  2896. "src/objects/map-updater.h",
  2897. "src/objects/map.h",
  2898. "src/objects/maybe-object-inl.h",
  2899. "src/objects/maybe-object.h",
  2900. "src/objects/megadom-handler-inl.h",
  2901. "src/objects/megadom-handler.h",
  2902. "src/objects/microtask-inl.h",
  2903. "src/objects/microtask.h",
  2904. "src/objects/module-inl.h",
  2905. "src/objects/module.h",
  2906. "src/objects/name-inl.h",
  2907. "src/objects/name.h",
  2908. "src/objects/object-list-macros.h",
  2909. "src/objects/object-macros-undef.h",
  2910. "src/objects/object-macros.h",
  2911. "src/objects/object-type.h",
  2912. "src/objects/objects-body-descriptors-inl.h",
  2913. "src/objects/objects-body-descriptors.h",
  2914. "src/objects/objects-definitions.h",
  2915. "src/objects/objects-inl.h",
  2916. "src/objects/objects.h",
  2917. "src/objects/oddball-inl.h",
  2918. "src/objects/oddball.h",
  2919. "src/objects/option-utils.h",
  2920. "src/objects/ordered-hash-table-inl.h",
  2921. "src/objects/ordered-hash-table.h",
  2922. "src/objects/osr-optimized-code-cache-inl.h",
  2923. "src/objects/osr-optimized-code-cache.h",
  2924. "src/objects/primitive-heap-object-inl.h",
  2925. "src/objects/primitive-heap-object.h",
  2926. "src/objects/promise-inl.h",
  2927. "src/objects/promise.h",
  2928. "src/objects/property-array-inl.h",
  2929. "src/objects/property-array.h",
  2930. "src/objects/property-cell-inl.h",
  2931. "src/objects/property-cell.h",
  2932. "src/objects/property-descriptor-object-inl.h",
  2933. "src/objects/property-descriptor-object.h",
  2934. "src/objects/property-descriptor.h",
  2935. "src/objects/property-details.h",
  2936. "src/objects/property.h",
  2937. "src/objects/prototype-info-inl.h",
  2938. "src/objects/prototype-info.h",
  2939. "src/objects/prototype-inl.h",
  2940. "src/objects/prototype.h",
  2941. "src/objects/regexp-match-info.h",
  2942. "src/objects/scope-info-inl.h",
  2943. "src/objects/scope-info.h",
  2944. "src/objects/script-inl.h",
  2945. "src/objects/script.h",
  2946. "src/objects/shared-function-info-inl.h",
  2947. "src/objects/shared-function-info.h",
  2948. "src/objects/slots-atomic-inl.h",
  2949. "src/objects/slots-inl.h",
  2950. "src/objects/slots.h",
  2951. "src/objects/smi-inl.h",
  2952. "src/objects/smi.h",
  2953. "src/objects/source-text-module-inl.h",
  2954. "src/objects/source-text-module.h",
  2955. "src/objects/string-comparator.h",
  2956. "src/objects/string-inl.h",
  2957. "src/objects/string-set-inl.h",
  2958. "src/objects/string-set.h",
  2959. "src/objects/string-table-inl.h",
  2960. "src/objects/string-table.h",
  2961. "src/objects/string.h",
  2962. "src/objects/struct-inl.h",
  2963. "src/objects/struct.h",
  2964. "src/objects/swiss-hash-table-helpers.h",
  2965. "src/objects/swiss-name-dictionary-inl.h",
  2966. "src/objects/swiss-name-dictionary.h",
  2967. "src/objects/synthetic-module-inl.h",
  2968. "src/objects/synthetic-module.h",
  2969. "src/objects/tagged-field-inl.h",
  2970. "src/objects/tagged-field.h",
  2971. "src/objects/tagged-impl-inl.h",
  2972. "src/objects/tagged-impl.h",
  2973. "src/objects/tagged-index.h",
  2974. "src/objects/tagged-value-inl.h",
  2975. "src/objects/tagged-value.h",
  2976. "src/objects/template-objects-inl.h",
  2977. "src/objects/template-objects.h",
  2978. "src/objects/templates-inl.h",
  2979. "src/objects/templates.h",
  2980. "src/objects/torque-defined-classes-inl.h",
  2981. "src/objects/torque-defined-classes.h",
  2982. "src/objects/transitions-inl.h",
  2983. "src/objects/transitions.h",
  2984. "src/objects/turbofan-types-inl.h",
  2985. "src/objects/turbofan-types.h",
  2986. "src/objects/type-hints.h",
  2987. "src/objects/value-serializer.h",
  2988. "src/objects/visitors-inl.h",
  2989. "src/objects/visitors.h",
  2990. "src/parsing/expression-scope.h",
  2991. "src/parsing/func-name-inferrer.h",
  2992. "src/parsing/import-assertions.h",
  2993. "src/parsing/keywords-gen.h",
  2994. "src/parsing/literal-buffer.h",
  2995. "src/parsing/parse-info.h",
  2996. "src/parsing/parser-base.h",
  2997. "src/parsing/parser.h",
  2998. "src/parsing/parsing.h",
  2999. "src/parsing/pending-compilation-error-handler.h",
  3000. "src/parsing/preparse-data-impl.h",
  3001. "src/parsing/preparse-data.h",
  3002. "src/parsing/preparser-logger.h",
  3003. "src/parsing/preparser.h",
  3004. "src/parsing/rewriter.h",
  3005. "src/parsing/scanner-character-streams.h",
  3006. "src/parsing/scanner-inl.h",
  3007. "src/parsing/scanner.h",
  3008. "src/parsing/token.h",
  3009. "src/profiler/allocation-tracker.h",
  3010. "src/profiler/circular-queue-inl.h",
  3011. "src/profiler/circular-queue.h",
  3012. "src/profiler/cpu-profiler-inl.h",
  3013. "src/profiler/cpu-profiler.h",
  3014. "src/profiler/heap-profiler.h",
  3015. "src/profiler/heap-snapshot-generator-inl.h",
  3016. "src/profiler/heap-snapshot-generator.h",
  3017. "src/profiler/profile-generator-inl.h",
  3018. "src/profiler/profile-generator.h",
  3019. "src/profiler/profiler-listener.h",
  3020. "src/profiler/profiler-stats.h",
  3021. "src/profiler/sampling-heap-profiler.h",
  3022. "src/profiler/strings-storage.h",
  3023. "src/profiler/symbolizer.h",
  3024. "src/profiler/tick-sample.h",
  3025. "src/profiler/tracing-cpu-profiler.h",
  3026. "src/profiler/weak-code-registry.h",
  3027. "src/regexp/experimental/experimental-bytecode.h",
  3028. "src/regexp/experimental/experimental-compiler.h",
  3029. "src/regexp/experimental/experimental-interpreter.h",
  3030. "src/regexp/experimental/experimental.h",
  3031. "src/regexp/property-sequences.h",
  3032. "src/regexp/regexp-ast.h",
  3033. "src/regexp/regexp-bytecode-generator-inl.h",
  3034. "src/regexp/regexp-bytecode-generator.h",
  3035. "src/regexp/regexp-bytecode-peephole.h",
  3036. "src/regexp/regexp-bytecodes.h",
  3037. "src/regexp/regexp-compiler.h",
  3038. "src/regexp/regexp-dotprinter.h",
  3039. "src/regexp/regexp-error.h",
  3040. "src/regexp/regexp-flags.h",
  3041. "src/regexp/regexp-interpreter.h",
  3042. "src/regexp/regexp-macro-assembler-arch.h",
  3043. "src/regexp/regexp-macro-assembler-tracer.h",
  3044. "src/regexp/regexp-macro-assembler.h",
  3045. "src/regexp/regexp-nodes.h",
  3046. "src/regexp/regexp-parser.h",
  3047. "src/regexp/regexp-stack.h",
  3048. "src/regexp/regexp-utils.h",
  3049. "src/regexp/regexp.h",
  3050. "src/regexp/special-case.h",
  3051. "src/roots/roots-inl.h",
  3052. "src/roots/roots.h",
  3053. "src/runtime/runtime-utils.h",
  3054. "src/runtime/runtime.h",
  3055. "src/sandbox/external-pointer-inl.h",
  3056. "src/sandbox/external-pointer-table-inl.h",
  3057. "src/sandbox/external-pointer-table.h",
  3058. "src/sandbox/external-pointer.h",
  3059. "src/sandbox/sandbox.h",
  3060. "src/sandbox/sandboxed-pointer-inl.h",
  3061. "src/sandbox/sandboxed-pointer.h",
  3062. "src/snapshot/code-serializer.h",
  3063. "src/snapshot/context-deserializer.h",
  3064. "src/snapshot/context-serializer.h",
  3065. "src/snapshot/deserializer.h",
  3066. "src/snapshot/embedded/embedded-data-inl.h",
  3067. "src/snapshot/embedded/embedded-data.h",
  3068. "src/snapshot/embedded/embedded-file-writer-interface.h",
  3069. "src/snapshot/object-deserializer.h",
  3070. "src/snapshot/read-only-deserializer.h",
  3071. "src/snapshot/read-only-serializer.h",
  3072. "src/snapshot/references.h",
  3073. "src/snapshot/roots-serializer.h",
  3074. "src/snapshot/serializer-deserializer.h",
  3075. "src/snapshot/serializer-inl.h",
  3076. "src/snapshot/serializer.h",
  3077. "src/snapshot/shared-heap-deserializer.h",
  3078. "src/snapshot/shared-heap-serializer.h",
  3079. "src/snapshot/snapshot-compression.h",
  3080. "src/snapshot/snapshot-data.h",
  3081. "src/snapshot/snapshot-source-sink.h",
  3082. "src/snapshot/snapshot-utils.h",
  3083. "src/snapshot/snapshot.h",
  3084. "src/snapshot/startup-deserializer.h",
  3085. "src/snapshot/startup-serializer.h",
  3086. "src/strings/char-predicates-inl.h",
  3087. "src/strings/char-predicates.h",
  3088. "src/strings/string-builder-inl.h",
  3089. "src/strings/string-case.h",
  3090. "src/strings/string-hasher-inl.h",
  3091. "src/strings/string-hasher.h",
  3092. "src/strings/string-search.h",
  3093. "src/strings/string-stream.h",
  3094. "src/strings/unicode-decoder.h",
  3095. "src/strings/unicode-inl.h",
  3096. "src/strings/unicode.h",
  3097. "src/strings/uri.h",
  3098. "src/tasks/cancelable-task.h",
  3099. "src/tasks/operations-barrier.h",
  3100. "src/tasks/task-utils.h",
  3101. "src/temporal/temporal-parser.h",
  3102. "src/third_party/siphash/halfsiphash.h",
  3103. "src/third_party/utf8-decoder/utf8-decoder.h",
  3104. "src/torque/runtime-macro-shims.h",
  3105. "src/tracing/trace-event.h",
  3106. "src/tracing/traced-value.h",
  3107. "src/tracing/tracing-category-observer.h",
  3108. "src/utils/address-map.h",
  3109. "src/utils/allocation.h",
  3110. "src/utils/bit-vector.h",
  3111. "src/utils/boxed-float.h",
  3112. "src/utils/detachable-vector.h",
  3113. "src/utils/identity-map.h",
  3114. "src/utils/locked-queue-inl.h",
  3115. "src/utils/locked-queue.h",
  3116. "src/utils/memcopy.h",
  3117. "src/utils/ostreams.h",
  3118. "src/utils/scoped-list.h",
  3119. "src/utils/utils-inl.h",
  3120. "src/utils/utils.h",
  3121. "src/utils/version.h",
  3122. "src/zone/accounting-allocator.h",
  3123. "src/zone/compressed-zone-ptr.h",
  3124. "src/zone/type-stats.h",
  3125. "src/zone/zone-allocator.h",
  3126. "src/zone/zone-chunk-list.h",
  3127. "src/zone/zone-compression.h",
  3128. "src/zone/zone-containers.h",
  3129. "src/zone/zone-handle-set.h",
  3130. "src/zone/zone-hashmap.h",
  3131. "src/zone/zone-list-inl.h",
  3132. "src/zone/zone-list.h",
  3133. "src/zone/zone-segment.h",
  3134. "src/zone/zone-type-traits.h",
  3135. "src/zone/zone-utils.h",
  3136. "src/zone/zone.h",
  3137. ]
  3138. if (v8_use_perfetto) {
  3139. sources -= [ "//base/trace_event/common/trace_event_common.h" ]
  3140. }
  3141. if (v8_enable_maglev) {
  3142. sources += [
  3143. "src/maglev/maglev-basic-block.h",
  3144. "src/maglev/maglev-code-gen-state.h",
  3145. "src/maglev/maglev-code-generator.h",
  3146. "src/maglev/maglev-compilation-info.h",
  3147. "src/maglev/maglev-compilation-unit.h",
  3148. "src/maglev/maglev-compiler.h",
  3149. "src/maglev/maglev-concurrent-dispatcher.h",
  3150. "src/maglev/maglev-graph-builder.h",
  3151. "src/maglev/maglev-graph-labeller.h",
  3152. "src/maglev/maglev-graph-printer.h",
  3153. "src/maglev/maglev-graph-processor.h",
  3154. "src/maglev/maglev-graph-verifier.h",
  3155. "src/maglev/maglev-graph.h",
  3156. "src/maglev/maglev-interpreter-frame-state.h",
  3157. "src/maglev/maglev-ir.h",
  3158. "src/maglev/maglev-regalloc-data.h",
  3159. "src/maglev/maglev-regalloc.h",
  3160. "src/maglev/maglev-register-frame-array.h",
  3161. "src/maglev/maglev-vreg-allocator.h",
  3162. "src/maglev/maglev.h",
  3163. ]
  3164. }
  3165. if (v8_enable_webassembly) {
  3166. sources += [
  3167. "src/asmjs/asm-js.h",
  3168. "src/asmjs/asm-names.h",
  3169. "src/asmjs/asm-parser.h",
  3170. "src/asmjs/asm-scanner.h",
  3171. "src/asmjs/asm-types.h",
  3172. "src/compiler/int64-lowering.h",
  3173. "src/compiler/wasm-compiler.h",
  3174. "src/compiler/wasm-escape-analysis.h",
  3175. "src/compiler/wasm-inlining.h",
  3176. "src/compiler/wasm-loop-peeling.h",
  3177. "src/debug/debug-wasm-objects-inl.h",
  3178. "src/debug/debug-wasm-objects.h",
  3179. "src/trap-handler/trap-handler-internal.h",
  3180. "src/trap-handler/trap-handler.h",
  3181. "src/wasm/baseline/liftoff-assembler-defs.h",
  3182. "src/wasm/baseline/liftoff-assembler.h",
  3183. "src/wasm/baseline/liftoff-compiler.h",
  3184. "src/wasm/baseline/liftoff-register.h",
  3185. "src/wasm/canonical-types.h",
  3186. "src/wasm/code-space-access.h",
  3187. "src/wasm/compilation-environment.h",
  3188. "src/wasm/decoder.h",
  3189. "src/wasm/function-body-decoder-impl.h",
  3190. "src/wasm/function-body-decoder.h",
  3191. "src/wasm/function-compiler.h",
  3192. "src/wasm/graph-builder-interface.h",
  3193. "src/wasm/init-expr-interface.h",
  3194. "src/wasm/jump-table-assembler.h",
  3195. "src/wasm/leb-helper.h",
  3196. "src/wasm/local-decl-encoder.h",
  3197. "src/wasm/memory-protection-key.h",
  3198. "src/wasm/memory-tracing.h",
  3199. "src/wasm/module-compiler.h",
  3200. "src/wasm/module-decoder.h",
  3201. "src/wasm/module-instantiate.h",
  3202. "src/wasm/object-access.h",
  3203. "src/wasm/signature-map.h",
  3204. "src/wasm/simd-shuffle.h",
  3205. "src/wasm/stacks.h",
  3206. "src/wasm/streaming-decoder.h",
  3207. "src/wasm/struct-types.h",
  3208. "src/wasm/value-type.h",
  3209. "src/wasm/wasm-arguments.h",
  3210. "src/wasm/wasm-code-manager.h",
  3211. "src/wasm/wasm-engine.h",
  3212. "src/wasm/wasm-external-refs.h",
  3213. "src/wasm/wasm-feature-flags.h",
  3214. "src/wasm/wasm-features.h",
  3215. "src/wasm/wasm-import-wrapper-cache.h",
  3216. "src/wasm/wasm-init-expr.h",
  3217. "src/wasm/wasm-js.h",
  3218. "src/wasm/wasm-linkage.h",
  3219. "src/wasm/wasm-module-builder.h",
  3220. "src/wasm/wasm-module-sourcemap.h",
  3221. "src/wasm/wasm-module.h",
  3222. "src/wasm/wasm-objects-inl.h",
  3223. "src/wasm/wasm-objects.h",
  3224. "src/wasm/wasm-opcodes-inl.h",
  3225. "src/wasm/wasm-opcodes.h",
  3226. "src/wasm/wasm-result.h",
  3227. "src/wasm/wasm-serialization.h",
  3228. "src/wasm/wasm-subtyping.h",
  3229. "src/wasm/wasm-tier.h",
  3230. "src/wasm/wasm-value.h",
  3231. ]
  3232. }
  3233. if (!v8_enable_third_party_heap) {
  3234. sources += filter_include(v8_third_party_heap_files, [ "*.h" ])
  3235. } else {
  3236. sources += [ "src/heap/third-party/heap-api.h" ]
  3237. }
  3238. if (v8_enable_i18n_support) {
  3239. sources += [
  3240. "src/objects/intl-objects.h",
  3241. "src/objects/js-break-iterator-inl.h",
  3242. "src/objects/js-break-iterator.h",
  3243. "src/objects/js-collator-inl.h",
  3244. "src/objects/js-collator.h",
  3245. "src/objects/js-date-time-format-inl.h",
  3246. "src/objects/js-date-time-format.h",
  3247. "src/objects/js-display-names-inl.h",
  3248. "src/objects/js-display-names.h",
  3249. "src/objects/js-list-format-inl.h",
  3250. "src/objects/js-list-format.h",
  3251. "src/objects/js-locale-inl.h",
  3252. "src/objects/js-locale.h",
  3253. "src/objects/js-number-format-inl.h",
  3254. "src/objects/js-number-format.h",
  3255. "src/objects/js-plural-rules-inl.h",
  3256. "src/objects/js-plural-rules.h",
  3257. "src/objects/js-relative-time-format-inl.h",
  3258. "src/objects/js-relative-time-format.h",
  3259. "src/objects/js-segment-iterator-inl.h",
  3260. "src/objects/js-segment-iterator.h",
  3261. "src/objects/js-segmenter-inl.h",
  3262. "src/objects/js-segmenter.h",
  3263. "src/objects/js-segments-inl.h",
  3264. "src/objects/js-segments.h",
  3265. ]
  3266. }
  3267. if (!v8_control_flow_integrity) {
  3268. sources += [ "src/execution/pointer-authentication-dummy.h" ]
  3269. }
  3270. if (v8_enable_conservative_stack_scanning) {
  3271. sources += [
  3272. "src/heap/conservative-stack-visitor.h",
  3273. "src/heap/object-start-bitmap.h",
  3274. ]
  3275. }
  3276. if (v8_enable_wasm_gdb_remote_debugging) {
  3277. sources += [
  3278. "src/debug/wasm/gdb-server/gdb-remote-util.h",
  3279. "src/debug/wasm/gdb-server/gdb-server-thread.h",
  3280. "src/debug/wasm/gdb-server/gdb-server.h",
  3281. "src/debug/wasm/gdb-server/packet.h",
  3282. "src/debug/wasm/gdb-server/session.h",
  3283. "src/debug/wasm/gdb-server/target.h",
  3284. "src/debug/wasm/gdb-server/transport.h",
  3285. "src/debug/wasm/gdb-server/wasm-module-debug.h",
  3286. ]
  3287. }
  3288. if (v8_enable_heap_snapshot_verify) {
  3289. sources += [ "src/heap/reference-summarizer.h" ]
  3290. }
  3291. if (v8_current_cpu == "x86") {
  3292. sources += [ ### gcmole(arch:ia32) ###
  3293. "src/baseline/ia32/baseline-assembler-ia32-inl.h",
  3294. "src/baseline/ia32/baseline-compiler-ia32-inl.h",
  3295. "src/codegen/ia32/assembler-ia32-inl.h",
  3296. "src/codegen/ia32/assembler-ia32.h",
  3297. "src/codegen/ia32/constants-ia32.h",
  3298. "src/codegen/ia32/interface-descriptors-ia32-inl.h",
  3299. "src/codegen/ia32/macro-assembler-ia32.h",
  3300. "src/codegen/ia32/register-ia32.h",
  3301. "src/codegen/ia32/reglist-ia32.h",
  3302. "src/codegen/ia32/sse-instr.h",
  3303. "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h",
  3304. "src/compiler/backend/ia32/instruction-codes-ia32.h",
  3305. "src/execution/ia32/frame-constants-ia32.h",
  3306. "src/regexp/ia32/regexp-macro-assembler-ia32.h",
  3307. "src/wasm/baseline/ia32/liftoff-assembler-ia32.h",
  3308. ]
  3309. } else if (v8_current_cpu == "x64") {
  3310. sources += [ ### gcmole(arch:x64) ###
  3311. "src/baseline/x64/baseline-assembler-x64-inl.h",
  3312. "src/baseline/x64/baseline-compiler-x64-inl.h",
  3313. "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h",
  3314. "src/codegen/x64/assembler-x64-inl.h",
  3315. "src/codegen/x64/assembler-x64.h",
  3316. "src/codegen/x64/constants-x64.h",
  3317. "src/codegen/x64/fma-instr.h",
  3318. "src/codegen/x64/interface-descriptors-x64-inl.h",
  3319. "src/codegen/x64/macro-assembler-x64.h",
  3320. "src/codegen/x64/register-x64.h",
  3321. "src/codegen/x64/reglist-x64.h",
  3322. "src/codegen/x64/sse-instr.h",
  3323. "src/compiler/backend/x64/instruction-codes-x64.h",
  3324. "src/compiler/backend/x64/unwinding-info-writer-x64.h",
  3325. "src/execution/x64/frame-constants-x64.h",
  3326. "src/regexp/x64/regexp-macro-assembler-x64.h",
  3327. "src/third_party/valgrind/valgrind.h",
  3328. "src/wasm/baseline/x64/liftoff-assembler-x64.h",
  3329. ]
  3330. if (is_win) {
  3331. sources += [ "src/diagnostics/unwinding-info-win64.h" ]
  3332. }
  3333. if (v8_enable_webassembly) {
  3334. # iOS Xcode simulator builds run on an x64 target. iOS and macOS are both
  3335. # based on Darwin and thus POSIX-compliant to a similar degree.
  3336. if (is_linux || is_chromeos || is_mac || is_ios ||
  3337. target_os == "freebsd") {
  3338. sources += [ "src/trap-handler/handler-inside-posix.h" ]
  3339. } else if (is_win) {
  3340. sources += [ "src/trap-handler/handler-inside-win.h" ]
  3341. }
  3342. }
  3343. } else if (v8_current_cpu == "arm") {
  3344. sources += [ ### gcmole(arch:arm) ###
  3345. "src/baseline/arm/baseline-assembler-arm-inl.h",
  3346. "src/baseline/arm/baseline-compiler-arm-inl.h",
  3347. "src/codegen/arm/assembler-arm-inl.h",
  3348. "src/codegen/arm/assembler-arm.h",
  3349. "src/codegen/arm/constants-arm.h",
  3350. "src/codegen/arm/interface-descriptors-arm-inl.h",
  3351. "src/codegen/arm/macro-assembler-arm.h",
  3352. "src/codegen/arm/register-arm.h",
  3353. "src/codegen/arm/reglist-arm.h",
  3354. "src/compiler/backend/arm/instruction-codes-arm.h",
  3355. "src/compiler/backend/arm/unwinding-info-writer-arm.h",
  3356. "src/execution/arm/frame-constants-arm.h",
  3357. "src/execution/arm/simulator-arm.h",
  3358. "src/regexp/arm/regexp-macro-assembler-arm.h",
  3359. "src/wasm/baseline/arm/liftoff-assembler-arm.h",
  3360. ]
  3361. } else if (v8_current_cpu == "arm64") {
  3362. sources += [ ### gcmole(arch:arm64) ###
  3363. "src/baseline/arm64/baseline-assembler-arm64-inl.h",
  3364. "src/baseline/arm64/baseline-compiler-arm64-inl.h",
  3365. "src/codegen/arm64/assembler-arm64-inl.h",
  3366. "src/codegen/arm64/assembler-arm64.h",
  3367. "src/codegen/arm64/constants-arm64.h",
  3368. "src/codegen/arm64/decoder-arm64-inl.h",
  3369. "src/codegen/arm64/decoder-arm64.h",
  3370. "src/codegen/arm64/instructions-arm64.h",
  3371. "src/codegen/arm64/interface-descriptors-arm64-inl.h",
  3372. "src/codegen/arm64/macro-assembler-arm64-inl.h",
  3373. "src/codegen/arm64/macro-assembler-arm64.h",
  3374. "src/codegen/arm64/register-arm64.h",
  3375. "src/codegen/arm64/reglist-arm64.h",
  3376. "src/codegen/arm64/utils-arm64.h",
  3377. "src/compiler/backend/arm64/instruction-codes-arm64.h",
  3378. "src/compiler/backend/arm64/unwinding-info-writer-arm64.h",
  3379. "src/diagnostics/arm64/disasm-arm64.h",
  3380. "src/execution/arm64/frame-constants-arm64.h",
  3381. "src/execution/arm64/simulator-arm64.h",
  3382. "src/regexp/arm64/regexp-macro-assembler-arm64.h",
  3383. "src/wasm/baseline/arm64/liftoff-assembler-arm64.h",
  3384. ]
  3385. if (v8_control_flow_integrity) {
  3386. sources += [ "src/execution/arm64/pointer-authentication-arm64.h" ]
  3387. }
  3388. if (v8_enable_webassembly) {
  3389. # Trap handling is enabled on arm64 Mac and in simulators on x64 on Linux
  3390. # and Mac.
  3391. if ((current_cpu == "arm64" && is_mac) ||
  3392. (current_cpu == "x64" && (is_linux || is_chromeos || is_mac))) {
  3393. sources += [ "src/trap-handler/handler-inside-posix.h" ]
  3394. }
  3395. if (current_cpu == "x64" &&
  3396. (is_linux || is_chromeos || is_mac || is_win)) {
  3397. sources += [ "src/trap-handler/trap-handler-simulator.h" ]
  3398. }
  3399. }
  3400. if (is_win) {
  3401. sources += [ "src/diagnostics/unwinding-info-win64.h" ]
  3402. }
  3403. } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") {
  3404. sources += [ ### gcmole(arch:mipsel) ###
  3405. "src/baseline/mips/baseline-assembler-mips-inl.h",
  3406. "src/baseline/mips/baseline-compiler-mips-inl.h",
  3407. "src/codegen/mips/assembler-mips-inl.h",
  3408. "src/codegen/mips/assembler-mips.h",
  3409. "src/codegen/mips/constants-mips.h",
  3410. "src/codegen/mips/macro-assembler-mips.h",
  3411. "src/codegen/mips/register-mips.h",
  3412. "src/codegen/mips/reglist-mips.h",
  3413. "src/compiler/backend/mips/instruction-codes-mips.h",
  3414. "src/execution/mips/frame-constants-mips.h",
  3415. "src/execution/mips/simulator-mips.h",
  3416. "src/regexp/mips/regexp-macro-assembler-mips.h",
  3417. "src/wasm/baseline/mips/liftoff-assembler-mips.h",
  3418. ]
  3419. } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") {
  3420. sources += [ ### gcmole(arch:mips64el) ###
  3421. "src/baseline/mips64/baseline-assembler-mips64-inl.h",
  3422. "src/baseline/mips64/baseline-compiler-mips64-inl.h",
  3423. "src/codegen/mips64/assembler-mips64-inl.h",
  3424. "src/codegen/mips64/assembler-mips64.h",
  3425. "src/codegen/mips64/constants-mips64.h",
  3426. "src/codegen/mips64/macro-assembler-mips64.h",
  3427. "src/codegen/mips64/register-mips64.h",
  3428. "src/codegen/mips64/reglist-mips64.h",
  3429. "src/compiler/backend/mips64/instruction-codes-mips64.h",
  3430. "src/execution/mips64/frame-constants-mips64.h",
  3431. "src/execution/mips64/simulator-mips64.h",
  3432. "src/regexp/mips64/regexp-macro-assembler-mips64.h",
  3433. "src/wasm/baseline/mips64/liftoff-assembler-mips64.h",
  3434. ]
  3435. } else if (v8_current_cpu == "loong64") {
  3436. sources += [ ### gcmole(arch:loong64) ###
  3437. "src/baseline/loong64/baseline-assembler-loong64-inl.h",
  3438. "src/baseline/loong64/baseline-compiler-loong64-inl.h",
  3439. "src/codegen/loong64/assembler-loong64-inl.h",
  3440. "src/codegen/loong64/assembler-loong64.h",
  3441. "src/codegen/loong64/constants-loong64.h",
  3442. "src/codegen/loong64/macro-assembler-loong64.h",
  3443. "src/codegen/loong64/register-loong64.h",
  3444. "src/codegen/loong64/reglist-loong64.h",
  3445. "src/compiler/backend/loong64/instruction-codes-loong64.h",
  3446. "src/execution/loong64/frame-constants-loong64.h",
  3447. "src/execution/loong64/simulator-loong64.h",
  3448. "src/regexp/loong64/regexp-macro-assembler-loong64.h",
  3449. "src/wasm/baseline/loong64/liftoff-assembler-loong64.h",
  3450. ]
  3451. } else if (v8_current_cpu == "ppc") {
  3452. sources += [ ### gcmole(arch:ppc) ###
  3453. "src/codegen/ppc/assembler-ppc-inl.h",
  3454. "src/codegen/ppc/assembler-ppc.h",
  3455. "src/codegen/ppc/constants-ppc.h",
  3456. "src/codegen/ppc/interface-descriptors-ppc-inl.h",
  3457. "src/codegen/ppc/macro-assembler-ppc.h",
  3458. "src/codegen/ppc/register-ppc.h",
  3459. "src/codegen/ppc/reglist-ppc.h",
  3460. "src/compiler/backend/ppc/instruction-codes-ppc.h",
  3461. "src/compiler/backend/ppc/unwinding-info-writer-ppc.h",
  3462. "src/execution/ppc/frame-constants-ppc.h",
  3463. "src/execution/ppc/simulator-ppc.h",
  3464. "src/regexp/ppc/regexp-macro-assembler-ppc.h",
  3465. "src/wasm/baseline/ppc/liftoff-assembler-ppc.h",
  3466. ]
  3467. } else if (v8_current_cpu == "ppc64") {
  3468. sources += [ ### gcmole(arch:ppc64) ###
  3469. "src/baseline/ppc/baseline-assembler-ppc-inl.h",
  3470. "src/baseline/ppc/baseline-compiler-ppc-inl.h",
  3471. "src/codegen/ppc/assembler-ppc-inl.h",
  3472. "src/codegen/ppc/assembler-ppc.h",
  3473. "src/codegen/ppc/constants-ppc.h",
  3474. "src/codegen/ppc/interface-descriptors-ppc-inl.h",
  3475. "src/codegen/ppc/macro-assembler-ppc.h",
  3476. "src/codegen/ppc/register-ppc.h",
  3477. "src/codegen/ppc/reglist-ppc.h",
  3478. "src/compiler/backend/ppc/instruction-codes-ppc.h",
  3479. "src/compiler/backend/ppc/unwinding-info-writer-ppc.h",
  3480. "src/execution/ppc/frame-constants-ppc.h",
  3481. "src/execution/ppc/simulator-ppc.h",
  3482. "src/regexp/ppc/regexp-macro-assembler-ppc.h",
  3483. "src/wasm/baseline/ppc/liftoff-assembler-ppc.h",
  3484. ]
  3485. } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
  3486. sources += [ ### gcmole(arch:s390) ###
  3487. "src/baseline/s390/baseline-assembler-s390-inl.h",
  3488. "src/baseline/s390/baseline-compiler-s390-inl.h",
  3489. "src/codegen/s390/assembler-s390-inl.h",
  3490. "src/codegen/s390/assembler-s390.h",
  3491. "src/codegen/s390/constants-s390.h",
  3492. "src/codegen/s390/interface-descriptors-s390-inl.h",
  3493. "src/codegen/s390/macro-assembler-s390.h",
  3494. "src/codegen/s390/register-s390.h",
  3495. "src/codegen/s390/reglist-s390.h",
  3496. "src/compiler/backend/s390/instruction-codes-s390.h",
  3497. "src/compiler/backend/s390/unwinding-info-writer-s390.h",
  3498. "src/execution/s390/frame-constants-s390.h",
  3499. "src/execution/s390/simulator-s390.h",
  3500. "src/regexp/s390/regexp-macro-assembler-s390.h",
  3501. "src/wasm/baseline/s390/liftoff-assembler-s390.h",
  3502. ]
  3503. } else if (v8_current_cpu == "riscv64") {
  3504. sources += [ ### gcmole(arch:riscv64) ###
  3505. "src/baseline/riscv64/baseline-assembler-riscv64-inl.h",
  3506. "src/baseline/riscv64/baseline-compiler-riscv64-inl.h",
  3507. "src/codegen/riscv64/assembler-riscv64-inl.h",
  3508. "src/codegen/riscv64/assembler-riscv64.h",
  3509. "src/codegen/riscv64/constants-riscv64.h",
  3510. "src/codegen/riscv64/macro-assembler-riscv64.h",
  3511. "src/codegen/riscv64/register-riscv64.h",
  3512. "src/codegen/riscv64/reglist-riscv64.h",
  3513. "src/compiler/backend/riscv64/instruction-codes-riscv64.h",
  3514. "src/execution/riscv64/frame-constants-riscv64.h",
  3515. "src/execution/riscv64/simulator-riscv64.h",
  3516. "src/regexp/riscv64/regexp-macro-assembler-riscv64.h",
  3517. "src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h",
  3518. ]
  3519. }
  3520. public_deps = [
  3521. ":torque_runtime_support",
  3522. ":v8_flags",
  3523. ":v8_headers",
  3524. ":v8_maybe_icu",
  3525. ":v8_shared_internal_headers",
  3526. ]
  3527. deps = [
  3528. ":cppgc_headers",
  3529. ":generate_bytecode_builtins_list",
  3530. ":run_torque",
  3531. ":v8_heap_base_headers",
  3532. ":v8_libbase",
  3533. ]
  3534. }
  3535. v8_compiler_sources = [
  3536. ### gcmole(all) ###
  3537. "src/compiler/access-builder.cc",
  3538. "src/compiler/access-info.cc",
  3539. "src/compiler/add-type-assertions-reducer.cc",
  3540. "src/compiler/all-nodes.cc",
  3541. "src/compiler/backend/code-generator.cc",
  3542. "src/compiler/backend/frame-elider.cc",
  3543. "src/compiler/backend/gap-resolver.cc",
  3544. "src/compiler/backend/instruction-scheduler.cc",
  3545. "src/compiler/backend/instruction-selector.cc",
  3546. "src/compiler/backend/instruction.cc",
  3547. "src/compiler/backend/jump-threading.cc",
  3548. "src/compiler/backend/mid-tier-register-allocator.cc",
  3549. "src/compiler/backend/move-optimizer.cc",
  3550. "src/compiler/backend/register-allocator-verifier.cc",
  3551. "src/compiler/backend/register-allocator.cc",
  3552. "src/compiler/backend/spill-placer.cc",
  3553. "src/compiler/basic-block-instrumentor.cc",
  3554. "src/compiler/branch-condition-duplicator.cc",
  3555. "src/compiler/branch-elimination.cc",
  3556. "src/compiler/bytecode-analysis.cc",
  3557. "src/compiler/bytecode-graph-builder.cc",
  3558. "src/compiler/bytecode-liveness-map.cc",
  3559. "src/compiler/c-linkage.cc",
  3560. "src/compiler/checkpoint-elimination.cc",
  3561. "src/compiler/code-assembler.cc",
  3562. "src/compiler/common-node-cache.cc",
  3563. "src/compiler/common-operator-reducer.cc",
  3564. "src/compiler/common-operator.cc",
  3565. "src/compiler/compilation-dependencies.cc",
  3566. "src/compiler/compiler-source-position-table.cc",
  3567. "src/compiler/constant-folding-reducer.cc",
  3568. "src/compiler/control-equivalence.cc",
  3569. "src/compiler/control-flow-optimizer.cc",
  3570. "src/compiler/csa-load-elimination.cc",
  3571. "src/compiler/dead-code-elimination.cc",
  3572. "src/compiler/decompression-optimizer.cc",
  3573. "src/compiler/effect-control-linearizer.cc",
  3574. "src/compiler/escape-analysis-reducer.cc",
  3575. "src/compiler/escape-analysis.cc",
  3576. "src/compiler/fast-api-calls.cc",
  3577. "src/compiler/feedback-source.cc",
  3578. "src/compiler/frame-states.cc",
  3579. "src/compiler/frame.cc",
  3580. "src/compiler/graph-assembler.cc",
  3581. "src/compiler/graph-reducer.cc",
  3582. "src/compiler/graph-trimmer.cc",
  3583. "src/compiler/graph-visualizer.cc",
  3584. "src/compiler/graph.cc",
  3585. "src/compiler/heap-refs.cc",
  3586. "src/compiler/js-call-reducer.cc",
  3587. "src/compiler/js-context-specialization.cc",
  3588. "src/compiler/js-create-lowering.cc",
  3589. "src/compiler/js-generic-lowering.cc",
  3590. "src/compiler/js-graph.cc",
  3591. "src/compiler/js-heap-broker.cc",
  3592. "src/compiler/js-inlining-heuristic.cc",
  3593. "src/compiler/js-inlining.cc",
  3594. "src/compiler/js-intrinsic-lowering.cc",
  3595. "src/compiler/js-native-context-specialization.cc",
  3596. "src/compiler/js-operator.cc",
  3597. "src/compiler/js-type-hint-lowering.cc",
  3598. "src/compiler/js-typed-lowering.cc",
  3599. "src/compiler/linkage.cc",
  3600. "src/compiler/load-elimination.cc",
  3601. "src/compiler/loop-analysis.cc",
  3602. "src/compiler/loop-peeling.cc",
  3603. "src/compiler/loop-unrolling.cc",
  3604. "src/compiler/loop-variable-optimizer.cc",
  3605. "src/compiler/machine-graph-verifier.cc",
  3606. "src/compiler/machine-graph.cc",
  3607. "src/compiler/machine-operator-reducer.cc",
  3608. "src/compiler/machine-operator.cc",
  3609. "src/compiler/map-inference.cc",
  3610. "src/compiler/memory-lowering.cc",
  3611. "src/compiler/memory-optimizer.cc",
  3612. "src/compiler/node-marker.cc",
  3613. "src/compiler/node-matchers.cc",
  3614. "src/compiler/node-observer.cc",
  3615. "src/compiler/node-origin-table.cc",
  3616. "src/compiler/node-properties.cc",
  3617. "src/compiler/node.cc",
  3618. "src/compiler/opcodes.cc",
  3619. "src/compiler/operation-typer.cc",
  3620. "src/compiler/operator-properties.cc",
  3621. "src/compiler/operator.cc",
  3622. "src/compiler/osr.cc",
  3623. "src/compiler/pipeline-statistics.cc",
  3624. "src/compiler/pipeline.cc",
  3625. "src/compiler/property-access-builder.cc",
  3626. "src/compiler/raw-machine-assembler.cc",
  3627. "src/compiler/redundancy-elimination.cc",
  3628. "src/compiler/refs-map.cc",
  3629. "src/compiler/representation-change.cc",
  3630. "src/compiler/schedule.cc",
  3631. "src/compiler/scheduler.cc",
  3632. "src/compiler/select-lowering.cc",
  3633. "src/compiler/simplified-lowering-verifier.cc",
  3634. "src/compiler/simplified-lowering.cc",
  3635. "src/compiler/simplified-operator-reducer.cc",
  3636. "src/compiler/simplified-operator.cc",
  3637. "src/compiler/state-values-utils.cc",
  3638. "src/compiler/store-store-elimination.cc",
  3639. "src/compiler/type-cache.cc",
  3640. "src/compiler/type-narrowing-reducer.cc",
  3641. "src/compiler/typed-optimization.cc",
  3642. "src/compiler/typer.cc",
  3643. "src/compiler/types.cc",
  3644. "src/compiler/value-numbering-reducer.cc",
  3645. "src/compiler/verifier.cc",
  3646. "src/compiler/zone-stats.cc",
  3647. ]
  3648. if (v8_enable_webassembly) {
  3649. v8_compiler_sources += [
  3650. "src/compiler/int64-lowering.cc",
  3651. "src/compiler/wasm-compiler.cc",
  3652. "src/compiler/wasm-escape-analysis.cc",
  3653. "src/compiler/wasm-inlining.cc",
  3654. "src/compiler/wasm-loop-peeling.cc",
  3655. ]
  3656. }
  3657. # The src/compiler files with optimizations.
  3658. v8_source_set("v8_compiler_opt") {
  3659. visibility = [ ":*" ] # Only targets in this file can depend on this.
  3660. sources = v8_compiler_sources
  3661. public_deps = [
  3662. ":generate_bytecode_builtins_list",
  3663. ":run_torque",
  3664. ":v8_maybe_icu",
  3665. ":v8_tracing",
  3666. ]
  3667. deps = [
  3668. ":v8_base_without_compiler",
  3669. ":v8_internal_headers",
  3670. ":v8_libbase",
  3671. ":v8_shared_internal_headers",
  3672. ]
  3673. if (is_debug && !v8_optimized_debug && v8_enable_fast_mksnapshot) {
  3674. # The :no_optimize config is added to v8_add_configs in v8.gni.
  3675. remove_configs = [ "//build/config/compiler:no_optimize" ]
  3676. configs = [ ":always_optimize" ]
  3677. } else {
  3678. # Without this else branch, gn fails to generate build files for non-debug
  3679. # builds (because we try to remove a config that is not present).
  3680. # So we include it, even if this config is not used outside of debug builds.
  3681. configs = [ ":internal_config" ]
  3682. }
  3683. }
  3684. # The src/compiler files with default optimization behavior.
  3685. v8_source_set("v8_compiler") {
  3686. visibility = [ ":*" ] # Only targets in this file can depend on this.
  3687. sources = v8_compiler_sources
  3688. public_deps = [
  3689. ":generate_bytecode_builtins_list",
  3690. ":run_torque",
  3691. ":v8_internal_headers",
  3692. ":v8_maybe_icu",
  3693. ":v8_tracing",
  3694. ]
  3695. deps = [
  3696. ":v8_base_without_compiler",
  3697. ":v8_libbase",
  3698. ":v8_shared_internal_headers",
  3699. ]
  3700. configs = [ ":internal_config" ]
  3701. }
  3702. group("v8_compiler_for_mksnapshot") {
  3703. if (is_debug && !v8_optimized_debug && v8_enable_fast_mksnapshot) {
  3704. deps = [ ":v8_compiler_opt" ]
  3705. } else {
  3706. deps = [ ":v8_compiler" ]
  3707. }
  3708. }
  3709. # Any target using trace events must directly or indirectly depend on
  3710. # v8_tracing.
  3711. group("v8_tracing") {
  3712. if (v8_use_perfetto) {
  3713. if (build_with_chromium) {
  3714. public_deps = [ "//third_party/perfetto:libperfetto" ]
  3715. } else {
  3716. public_deps = [ ":v8_libperfetto" ]
  3717. }
  3718. }
  3719. }
  3720. v8_source_set("v8_base_without_compiler") {
  3721. visibility = [ ":*" ] # Only targets in this file can depend on this.
  3722. # Split static libraries on windows into two.
  3723. split_count = 2
  3724. sources = [
  3725. ### gcmole(all) ###
  3726. "src/api/api-arguments.cc",
  3727. "src/api/api-natives.cc",
  3728. "src/api/api.cc",
  3729. "src/ast/ast-function-literal-id-reindexer.cc",
  3730. "src/ast/ast-value-factory.cc",
  3731. "src/ast/ast.cc",
  3732. "src/ast/modules.cc",
  3733. "src/ast/prettyprinter.cc",
  3734. "src/ast/scopes.cc",
  3735. "src/ast/source-range-ast-visitor.cc",
  3736. "src/ast/variables.cc",
  3737. "src/baseline/baseline-batch-compiler.cc",
  3738. "src/baseline/baseline-compiler.cc",
  3739. "src/baseline/baseline.cc",
  3740. "src/baseline/bytecode-offset-iterator.cc",
  3741. "src/builtins/accessors.cc",
  3742. "src/builtins/builtins-api.cc",
  3743. "src/builtins/builtins-array.cc",
  3744. "src/builtins/builtins-arraybuffer.cc",
  3745. "src/builtins/builtins-async-module.cc",
  3746. "src/builtins/builtins-bigint.cc",
  3747. "src/builtins/builtins-callsite.cc",
  3748. "src/builtins/builtins-collections.cc",
  3749. "src/builtins/builtins-console.cc",
  3750. "src/builtins/builtins-dataview.cc",
  3751. "src/builtins/builtins-date.cc",
  3752. "src/builtins/builtins-error.cc",
  3753. "src/builtins/builtins-function.cc",
  3754. "src/builtins/builtins-global.cc",
  3755. "src/builtins/builtins-internal.cc",
  3756. "src/builtins/builtins-intl.cc",
  3757. "src/builtins/builtins-json.cc",
  3758. "src/builtins/builtins-number.cc",
  3759. "src/builtins/builtins-object.cc",
  3760. "src/builtins/builtins-reflect.cc",
  3761. "src/builtins/builtins-regexp.cc",
  3762. "src/builtins/builtins-shadow-realms.cc",
  3763. "src/builtins/builtins-sharedarraybuffer.cc",
  3764. "src/builtins/builtins-string.cc",
  3765. "src/builtins/builtins-struct.cc",
  3766. "src/builtins/builtins-symbol.cc",
  3767. "src/builtins/builtins-temporal.cc",
  3768. "src/builtins/builtins-trace.cc",
  3769. "src/builtins/builtins-typed-array.cc",
  3770. "src/builtins/builtins-weak-refs.cc",
  3771. "src/builtins/builtins.cc",
  3772. "src/builtins/constants-table-builder.cc",
  3773. "src/codegen/aligned-slot-allocator.cc",
  3774. "src/codegen/assembler.cc",
  3775. "src/codegen/bailout-reason.cc",
  3776. "src/codegen/code-comments.cc",
  3777. "src/codegen/code-desc.cc",
  3778. "src/codegen/code-factory.cc",
  3779. "src/codegen/code-reference.cc",
  3780. "src/codegen/compilation-cache.cc",
  3781. "src/codegen/compiler.cc",
  3782. "src/codegen/constant-pool.cc",
  3783. "src/codegen/external-reference-encoder.cc",
  3784. "src/codegen/external-reference-table.cc",
  3785. "src/codegen/external-reference.cc",
  3786. "src/codegen/flush-instruction-cache.cc",
  3787. "src/codegen/handler-table.cc",
  3788. "src/codegen/interface-descriptors.cc",
  3789. "src/codegen/machine-type.cc",
  3790. "src/codegen/optimized-compilation-info.cc",
  3791. "src/codegen/pending-optimization-table.cc",
  3792. "src/codegen/register-configuration.cc",
  3793. "src/codegen/reloc-info.cc",
  3794. "src/codegen/safepoint-table.cc",
  3795. "src/codegen/source-position-table.cc",
  3796. "src/codegen/source-position.cc",
  3797. "src/codegen/string-constants.cc",
  3798. "src/codegen/tick-counter.cc",
  3799. "src/codegen/tnode.cc",
  3800. "src/codegen/turbo-assembler.cc",
  3801. "src/codegen/unoptimized-compilation-info.cc",
  3802. "src/common/assert-scope.cc",
  3803. "src/compiler-dispatcher/lazy-compile-dispatcher.cc",
  3804. "src/compiler-dispatcher/optimizing-compile-dispatcher.cc",
  3805. "src/date/date.cc",
  3806. "src/date/dateparser.cc",
  3807. "src/debug/debug-coverage.cc",
  3808. "src/debug/debug-evaluate.cc",
  3809. "src/debug/debug-frames.cc",
  3810. "src/debug/debug-interface.cc",
  3811. "src/debug/debug-property-iterator.cc",
  3812. "src/debug/debug-scope-iterator.cc",
  3813. "src/debug/debug-scopes.cc",
  3814. "src/debug/debug-stack-trace-iterator.cc",
  3815. "src/debug/debug-type-profile.cc",
  3816. "src/debug/debug.cc",
  3817. "src/debug/liveedit.cc",
  3818. "src/deoptimizer/deoptimize-reason.cc",
  3819. "src/deoptimizer/deoptimized-frame-info.cc",
  3820. "src/deoptimizer/deoptimizer.cc",
  3821. "src/deoptimizer/materialized-object-store.cc",
  3822. "src/deoptimizer/translated-state.cc",
  3823. "src/deoptimizer/translation-array.cc",
  3824. "src/diagnostics/basic-block-profiler.cc",
  3825. "src/diagnostics/compilation-statistics.cc",
  3826. "src/diagnostics/disassembler.cc",
  3827. "src/diagnostics/eh-frame.cc",
  3828. "src/diagnostics/gdb-jit.cc",
  3829. "src/diagnostics/objects-debug.cc",
  3830. "src/diagnostics/objects-printer.cc",
  3831. "src/diagnostics/perf-jit.cc",
  3832. "src/diagnostics/unwinder.cc",
  3833. "src/execution/arguments.cc",
  3834. "src/execution/clobber-registers.cc",
  3835. "src/execution/embedder-state.cc",
  3836. "src/execution/encoded-c-signature.cc",
  3837. "src/execution/execution.cc",
  3838. "src/execution/frames.cc",
  3839. "src/execution/futex-emulation.cc",
  3840. "src/execution/interrupts-scope.cc",
  3841. "src/execution/isolate.cc",
  3842. "src/execution/local-isolate.cc",
  3843. "src/execution/messages.cc",
  3844. "src/execution/microtask-queue.cc",
  3845. "src/execution/protectors.cc",
  3846. "src/execution/simulator-base.cc",
  3847. "src/execution/stack-guard.cc",
  3848. "src/execution/thread-id.cc",
  3849. "src/execution/thread-local-top.cc",
  3850. "src/execution/tiering-manager.cc",
  3851. "src/execution/v8threads.cc",
  3852. "src/extensions/cputracemark-extension.cc",
  3853. "src/extensions/externalize-string-extension.cc",
  3854. "src/extensions/gc-extension.cc",
  3855. "src/extensions/ignition-statistics-extension.cc",
  3856. "src/extensions/statistics-extension.cc",
  3857. "src/extensions/trigger-failure-extension.cc",
  3858. "src/flags/flags.cc",
  3859. "src/handles/global-handles.cc",
  3860. "src/handles/handles.cc",
  3861. "src/handles/local-handles.cc",
  3862. "src/handles/persistent-handles.cc",
  3863. "src/heap/allocation-observer.cc",
  3864. "src/heap/array-buffer-sweeper.cc",
  3865. "src/heap/base-space.cc",
  3866. "src/heap/basic-memory-chunk.cc",
  3867. "src/heap/code-object-registry.cc",
  3868. "src/heap/code-range.cc",
  3869. "src/heap/code-stats.cc",
  3870. "src/heap/collection-barrier.cc",
  3871. "src/heap/combined-heap.cc",
  3872. "src/heap/concurrent-allocator.cc",
  3873. "src/heap/concurrent-marking.cc",
  3874. "src/heap/cppgc-js/cpp-heap.cc",
  3875. "src/heap/cppgc-js/cpp-snapshot.cc",
  3876. "src/heap/cppgc-js/unified-heap-marking-state.cc",
  3877. "src/heap/cppgc-js/unified-heap-marking-verifier.cc",
  3878. "src/heap/cppgc-js/unified-heap-marking-visitor.cc",
  3879. "src/heap/embedder-tracing.cc",
  3880. "src/heap/factory-base.cc",
  3881. "src/heap/factory.cc",
  3882. "src/heap/finalization-registry-cleanup-task.cc",
  3883. "src/heap/free-list.cc",
  3884. "src/heap/gc-idle-time-handler.cc",
  3885. "src/heap/gc-tracer.cc",
  3886. "src/heap/heap-allocator.cc",
  3887. "src/heap/heap-controller.cc",
  3888. "src/heap/heap-layout-tracer.cc",
  3889. "src/heap/heap-write-barrier.cc",
  3890. "src/heap/heap.cc",
  3891. "src/heap/incremental-marking-job.cc",
  3892. "src/heap/incremental-marking.cc",
  3893. "src/heap/index-generator.cc",
  3894. "src/heap/invalidated-slots.cc",
  3895. "src/heap/large-spaces.cc",
  3896. "src/heap/local-factory.cc",
  3897. "src/heap/local-heap.cc",
  3898. "src/heap/mark-compact.cc",
  3899. "src/heap/marking-barrier.cc",
  3900. "src/heap/marking-worklist.cc",
  3901. "src/heap/marking.cc",
  3902. "src/heap/memory-allocator.cc",
  3903. "src/heap/memory-chunk-layout.cc",
  3904. "src/heap/memory-chunk.cc",
  3905. "src/heap/memory-measurement.cc",
  3906. "src/heap/memory-reducer.cc",
  3907. "src/heap/new-spaces.cc",
  3908. "src/heap/object-stats.cc",
  3909. "src/heap/objects-visiting.cc",
  3910. "src/heap/paged-spaces.cc",
  3911. "src/heap/read-only-heap.cc",
  3912. "src/heap/read-only-spaces.cc",
  3913. "src/heap/safepoint.cc",
  3914. "src/heap/scavenge-job.cc",
  3915. "src/heap/scavenger.cc",
  3916. "src/heap/slot-set.cc",
  3917. "src/heap/spaces.cc",
  3918. "src/heap/stress-marking-observer.cc",
  3919. "src/heap/stress-scavenge-observer.cc",
  3920. "src/heap/sweeper.cc",
  3921. "src/heap/weak-object-worklists.cc",
  3922. "src/ic/call-optimization.cc",
  3923. "src/ic/handler-configuration.cc",
  3924. "src/ic/ic-stats.cc",
  3925. "src/ic/ic.cc",
  3926. "src/ic/stub-cache.cc",
  3927. "src/init/bootstrapper.cc",
  3928. "src/init/icu_util.cc",
  3929. "src/init/isolate-allocator.cc",
  3930. "src/init/startup-data-util.cc",
  3931. "src/init/v8.cc",
  3932. "src/interpreter/bytecode-array-builder.cc",
  3933. "src/interpreter/bytecode-array-iterator.cc",
  3934. "src/interpreter/bytecode-array-random-iterator.cc",
  3935. "src/interpreter/bytecode-array-writer.cc",
  3936. "src/interpreter/bytecode-decoder.cc",
  3937. "src/interpreter/bytecode-flags.cc",
  3938. "src/interpreter/bytecode-generator.cc",
  3939. "src/interpreter/bytecode-label.cc",
  3940. "src/interpreter/bytecode-node.cc",
  3941. "src/interpreter/bytecode-operands.cc",
  3942. "src/interpreter/bytecode-register-optimizer.cc",
  3943. "src/interpreter/bytecode-register.cc",
  3944. "src/interpreter/bytecode-source-info.cc",
  3945. "src/interpreter/bytecodes.cc",
  3946. "src/interpreter/constant-array-builder.cc",
  3947. "src/interpreter/control-flow-builders.cc",
  3948. "src/interpreter/handler-table-builder.cc",
  3949. "src/interpreter/interpreter-intrinsics.cc",
  3950. "src/interpreter/interpreter.cc",
  3951. "src/json/json-parser.cc",
  3952. "src/json/json-stringifier.cc",
  3953. "src/libsampler/sampler.cc",
  3954. "src/logging/counters.cc",
  3955. "src/logging/local-logger.cc",
  3956. "src/logging/log-utils.cc",
  3957. "src/logging/log.cc",
  3958. "src/logging/metrics.cc",
  3959. "src/logging/runtime-call-stats.cc",
  3960. "src/logging/tracing-flags.cc",
  3961. "src/numbers/conversions.cc",
  3962. "src/numbers/math-random.cc",
  3963. "src/objects/backing-store.cc",
  3964. "src/objects/bigint.cc",
  3965. "src/objects/call-site-info.cc",
  3966. "src/objects/code-kind.cc",
  3967. "src/objects/code.cc",
  3968. "src/objects/compilation-cache-table.cc",
  3969. "src/objects/contexts.cc",
  3970. "src/objects/debug-objects.cc",
  3971. "src/objects/elements-kind.cc",
  3972. "src/objects/elements.cc",
  3973. "src/objects/embedder-data-array.cc",
  3974. "src/objects/feedback-vector.cc",
  3975. "src/objects/field-type.cc",
  3976. "src/objects/intl-objects.cc",
  3977. "src/objects/js-array-buffer.cc",
  3978. "src/objects/js-break-iterator.cc",
  3979. "src/objects/js-collator.cc",
  3980. "src/objects/js-date-time-format.cc",
  3981. "src/objects/js-display-names.cc",
  3982. "src/objects/js-function.cc",
  3983. "src/objects/js-list-format.cc",
  3984. "src/objects/js-locale.cc",
  3985. "src/objects/js-number-format.cc",
  3986. "src/objects/js-objects.cc",
  3987. "src/objects/js-plural-rules.cc",
  3988. "src/objects/js-regexp.cc",
  3989. "src/objects/js-relative-time-format.cc",
  3990. "src/objects/js-segment-iterator.cc",
  3991. "src/objects/js-segmenter.cc",
  3992. "src/objects/js-segments.cc",
  3993. "src/objects/js-temporal-objects.cc",
  3994. "src/objects/keys.cc",
  3995. "src/objects/literal-objects.cc",
  3996. "src/objects/lookup-cache.cc",
  3997. "src/objects/lookup.cc",
  3998. "src/objects/managed.cc",
  3999. "src/objects/map-updater.cc",
  4000. "src/objects/map.cc",
  4001. "src/objects/module.cc",
  4002. "src/objects/object-type.cc",
  4003. "src/objects/objects.cc",
  4004. "src/objects/option-utils.cc",
  4005. "src/objects/ordered-hash-table.cc",
  4006. "src/objects/osr-optimized-code-cache.cc",
  4007. "src/objects/property-descriptor.cc",
  4008. "src/objects/property.cc",
  4009. "src/objects/scope-info.cc",
  4010. "src/objects/shared-function-info.cc",
  4011. "src/objects/source-text-module.cc",
  4012. "src/objects/string-comparator.cc",
  4013. "src/objects/string-table.cc",
  4014. "src/objects/string.cc",
  4015. "src/objects/swiss-name-dictionary.cc",
  4016. "src/objects/symbol-table.cc",
  4017. "src/objects/synthetic-module.cc",
  4018. "src/objects/tagged-impl.cc",
  4019. "src/objects/template-objects.cc",
  4020. "src/objects/templates.cc",
  4021. "src/objects/transitions.cc",
  4022. "src/objects/type-hints.cc",
  4023. "src/objects/value-serializer.cc",
  4024. "src/objects/visitors.cc",
  4025. "src/parsing/func-name-inferrer.cc",
  4026. "src/parsing/import-assertions.cc",
  4027. "src/parsing/literal-buffer.cc",
  4028. "src/parsing/parse-info.cc",
  4029. "src/parsing/parser.cc",
  4030. "src/parsing/parsing.cc",
  4031. "src/parsing/pending-compilation-error-handler.cc",
  4032. "src/parsing/preparse-data.cc",
  4033. "src/parsing/preparser.cc",
  4034. "src/parsing/rewriter.cc",
  4035. "src/parsing/scanner-character-streams.cc",
  4036. "src/parsing/scanner.cc",
  4037. "src/parsing/token.cc",
  4038. "src/profiler/allocation-tracker.cc",
  4039. "src/profiler/cpu-profiler.cc",
  4040. "src/profiler/heap-profiler.cc",
  4041. "src/profiler/heap-snapshot-generator.cc",
  4042. "src/profiler/profile-generator.cc",
  4043. "src/profiler/profiler-listener.cc",
  4044. "src/profiler/profiler-stats.cc",
  4045. "src/profiler/sampling-heap-profiler.cc",
  4046. "src/profiler/strings-storage.cc",
  4047. "src/profiler/symbolizer.cc",
  4048. "src/profiler/tick-sample.cc",
  4049. "src/profiler/tracing-cpu-profiler.cc",
  4050. "src/profiler/weak-code-registry.cc",
  4051. "src/regexp/experimental/experimental-bytecode.cc",
  4052. "src/regexp/experimental/experimental-compiler.cc",
  4053. "src/regexp/experimental/experimental-interpreter.cc",
  4054. "src/regexp/experimental/experimental.cc",
  4055. "src/regexp/property-sequences.cc",
  4056. "src/regexp/regexp-ast.cc",
  4057. "src/regexp/regexp-bytecode-generator.cc",
  4058. "src/regexp/regexp-bytecode-peephole.cc",
  4059. "src/regexp/regexp-bytecodes.cc",
  4060. "src/regexp/regexp-compiler-tonode.cc",
  4061. "src/regexp/regexp-compiler.cc",
  4062. "src/regexp/regexp-dotprinter.cc",
  4063. "src/regexp/regexp-error.cc",
  4064. "src/regexp/regexp-interpreter.cc",
  4065. "src/regexp/regexp-macro-assembler-tracer.cc",
  4066. "src/regexp/regexp-macro-assembler.cc",
  4067. "src/regexp/regexp-parser.cc",
  4068. "src/regexp/regexp-stack.cc",
  4069. "src/regexp/regexp-utils.cc",
  4070. "src/regexp/regexp.cc",
  4071. "src/roots/roots.cc",
  4072. "src/runtime/runtime-array.cc",
  4073. "src/runtime/runtime-atomics.cc",
  4074. "src/runtime/runtime-bigint.cc",
  4075. "src/runtime/runtime-classes.cc",
  4076. "src/runtime/runtime-collections.cc",
  4077. "src/runtime/runtime-compiler.cc",
  4078. "src/runtime/runtime-date.cc",
  4079. "src/runtime/runtime-debug.cc",
  4080. "src/runtime/runtime-forin.cc",
  4081. "src/runtime/runtime-function.cc",
  4082. "src/runtime/runtime-futex.cc",
  4083. "src/runtime/runtime-generator.cc",
  4084. "src/runtime/runtime-internal.cc",
  4085. "src/runtime/runtime-intl.cc",
  4086. "src/runtime/runtime-literals.cc",
  4087. "src/runtime/runtime-module.cc",
  4088. "src/runtime/runtime-numbers.cc",
  4089. "src/runtime/runtime-object.cc",
  4090. "src/runtime/runtime-operators.cc",
  4091. "src/runtime/runtime-promise.cc",
  4092. "src/runtime/runtime-proxy.cc",
  4093. "src/runtime/runtime-regexp.cc",
  4094. "src/runtime/runtime-scopes.cc",
  4095. "src/runtime/runtime-shadow-realm.cc",
  4096. "src/runtime/runtime-strings.cc",
  4097. "src/runtime/runtime-symbol.cc",
  4098. "src/runtime/runtime-test.cc",
  4099. "src/runtime/runtime-trace.cc",
  4100. "src/runtime/runtime-typedarray.cc",
  4101. "src/runtime/runtime-weak-refs.cc",
  4102. "src/runtime/runtime.cc",
  4103. "src/sandbox/external-pointer-table.cc",
  4104. "src/sandbox/sandbox.cc",
  4105. "src/snapshot/code-serializer.cc",
  4106. "src/snapshot/context-deserializer.cc",
  4107. "src/snapshot/context-serializer.cc",
  4108. "src/snapshot/deserializer.cc",
  4109. "src/snapshot/embedded/embedded-data.cc",
  4110. "src/snapshot/object-deserializer.cc",
  4111. "src/snapshot/read-only-deserializer.cc",
  4112. "src/snapshot/read-only-serializer.cc",
  4113. "src/snapshot/roots-serializer.cc",
  4114. "src/snapshot/serializer-deserializer.cc",
  4115. "src/snapshot/serializer.cc",
  4116. "src/snapshot/shared-heap-deserializer.cc",
  4117. "src/snapshot/shared-heap-serializer.cc",
  4118. "src/snapshot/snapshot-compression.cc",
  4119. "src/snapshot/snapshot-data.cc",
  4120. "src/snapshot/snapshot-source-sink.cc",
  4121. "src/snapshot/snapshot-utils.cc",
  4122. "src/snapshot/snapshot.cc",
  4123. "src/snapshot/startup-deserializer.cc",
  4124. "src/snapshot/startup-serializer.cc",
  4125. "src/strings/char-predicates.cc",
  4126. "src/strings/string-builder.cc",
  4127. "src/strings/string-case.cc",
  4128. "src/strings/string-stream.cc",
  4129. "src/strings/unicode-decoder.cc",
  4130. "src/strings/unicode.cc",
  4131. "src/strings/uri.cc",
  4132. "src/tasks/cancelable-task.cc",
  4133. "src/tasks/operations-barrier.cc",
  4134. "src/tasks/task-utils.cc",
  4135. "src/temporal/temporal-parser.cc",
  4136. "src/third_party/siphash/halfsiphash.cc",
  4137. "src/tracing/trace-event.cc",
  4138. "src/tracing/traced-value.cc",
  4139. "src/tracing/tracing-category-observer.cc",
  4140. "src/utils/address-map.cc",
  4141. "src/utils/allocation.cc",
  4142. "src/utils/bit-vector.cc",
  4143. "src/utils/detachable-vector.cc",
  4144. "src/utils/identity-map.cc",
  4145. "src/utils/memcopy.cc",
  4146. "src/utils/ostreams.cc",
  4147. "src/utils/utils.cc",
  4148. "src/utils/version.cc",
  4149. "src/web-snapshot/web-snapshot.cc",
  4150. "src/web-snapshot/web-snapshot.h",
  4151. "src/zone/accounting-allocator.cc",
  4152. "src/zone/type-stats.cc",
  4153. "src/zone/zone-segment.cc",
  4154. "src/zone/zone.cc",
  4155. ]
  4156. if (v8_enable_maglev) {
  4157. sources += [
  4158. "src/maglev/maglev-code-generator.cc",
  4159. "src/maglev/maglev-compilation-info.cc",
  4160. "src/maglev/maglev-compilation-unit.cc",
  4161. "src/maglev/maglev-compiler.cc",
  4162. "src/maglev/maglev-concurrent-dispatcher.cc",
  4163. "src/maglev/maglev-graph-builder.cc",
  4164. "src/maglev/maglev-graph-printer.cc",
  4165. "src/maglev/maglev-ir.cc",
  4166. "src/maglev/maglev-regalloc.cc",
  4167. "src/maglev/maglev.cc",
  4168. ]
  4169. }
  4170. if (v8_enable_webassembly) {
  4171. sources += [ ### gcmole(all) ###
  4172. "src/asmjs/asm-js.cc",
  4173. "src/asmjs/asm-parser.cc",
  4174. "src/asmjs/asm-scanner.cc",
  4175. "src/asmjs/asm-types.cc",
  4176. "src/debug/debug-wasm-objects.cc",
  4177. "src/runtime/runtime-test-wasm.cc",
  4178. "src/runtime/runtime-wasm.cc",
  4179. "src/trap-handler/handler-inside.cc",
  4180. "src/trap-handler/handler-outside.cc",
  4181. "src/trap-handler/handler-shared.cc",
  4182. "src/wasm/baseline/liftoff-assembler.cc",
  4183. "src/wasm/baseline/liftoff-compiler.cc",
  4184. "src/wasm/canonical-types.cc",
  4185. "src/wasm/code-space-access.cc",
  4186. "src/wasm/function-body-decoder.cc",
  4187. "src/wasm/function-compiler.cc",
  4188. "src/wasm/graph-builder-interface.cc",
  4189. "src/wasm/init-expr-interface.cc",
  4190. "src/wasm/jump-table-assembler.cc",
  4191. "src/wasm/local-decl-encoder.cc",
  4192. "src/wasm/memory-protection-key.cc",
  4193. "src/wasm/memory-tracing.cc",
  4194. "src/wasm/module-compiler.cc",
  4195. "src/wasm/module-decoder.cc",
  4196. "src/wasm/module-instantiate.cc",
  4197. "src/wasm/signature-map.cc",
  4198. "src/wasm/simd-shuffle.cc",
  4199. "src/wasm/streaming-decoder.cc",
  4200. "src/wasm/sync-streaming-decoder.cc",
  4201. "src/wasm/value-type.cc",
  4202. "src/wasm/wasm-code-manager.cc",
  4203. "src/wasm/wasm-debug.cc",
  4204. "src/wasm/wasm-debug.h",
  4205. "src/wasm/wasm-engine.cc",
  4206. "src/wasm/wasm-external-refs.cc",
  4207. "src/wasm/wasm-features.cc",
  4208. "src/wasm/wasm-import-wrapper-cache.cc",
  4209. "src/wasm/wasm-init-expr.cc",
  4210. "src/wasm/wasm-js.cc",
  4211. "src/wasm/wasm-module-builder.cc",
  4212. "src/wasm/wasm-module-sourcemap.cc",
  4213. "src/wasm/wasm-module.cc",
  4214. "src/wasm/wasm-objects.cc",
  4215. "src/wasm/wasm-opcodes.cc",
  4216. "src/wasm/wasm-result.cc",
  4217. "src/wasm/wasm-serialization.cc",
  4218. "src/wasm/wasm-subtyping.cc",
  4219. ]
  4220. }
  4221. if (v8_enable_third_party_heap) {
  4222. sources += filter_exclude(v8_third_party_heap_files, [ "*.h" ])
  4223. } else {
  4224. sources += [ "src/heap/third-party/heap-api-stub.cc" ]
  4225. }
  4226. if (v8_enable_conservative_stack_scanning) {
  4227. sources += [ "src/heap/conservative-stack-visitor.cc" ]
  4228. }
  4229. if (v8_enable_wasm_gdb_remote_debugging) {
  4230. sources += [
  4231. "src/debug/wasm/gdb-server/gdb-remote-util.cc",
  4232. "src/debug/wasm/gdb-server/gdb-server-thread.cc",
  4233. "src/debug/wasm/gdb-server/gdb-server.cc",
  4234. "src/debug/wasm/gdb-server/packet.cc",
  4235. "src/debug/wasm/gdb-server/session.cc",
  4236. "src/debug/wasm/gdb-server/target.cc",
  4237. "src/debug/wasm/gdb-server/transport.cc",
  4238. "src/debug/wasm/gdb-server/wasm-module-debug.cc",
  4239. ]
  4240. }
  4241. if (v8_enable_heap_snapshot_verify) {
  4242. sources += [ "src/heap/reference-summarizer.cc" ]
  4243. }
  4244. if (v8_current_cpu == "x86") {
  4245. sources += [ ### gcmole(arch:ia32) ###
  4246. "src/codegen/ia32/assembler-ia32.cc",
  4247. "src/codegen/ia32/cpu-ia32.cc",
  4248. "src/codegen/ia32/macro-assembler-ia32.cc",
  4249. "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.cc",
  4250. "src/compiler/backend/ia32/code-generator-ia32.cc",
  4251. "src/compiler/backend/ia32/instruction-scheduler-ia32.cc",
  4252. "src/compiler/backend/ia32/instruction-selector-ia32.cc",
  4253. "src/deoptimizer/ia32/deoptimizer-ia32.cc",
  4254. "src/diagnostics/ia32/disasm-ia32.cc",
  4255. "src/diagnostics/ia32/unwinder-ia32.cc",
  4256. "src/execution/ia32/frame-constants-ia32.cc",
  4257. "src/regexp/ia32/regexp-macro-assembler-ia32.cc",
  4258. ]
  4259. } else if (v8_current_cpu == "x64") {
  4260. sources += [ ### gcmole(arch:x64) ###
  4261. "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.cc",
  4262. "src/codegen/x64/assembler-x64.cc",
  4263. "src/codegen/x64/cpu-x64.cc",
  4264. "src/codegen/x64/macro-assembler-x64.cc",
  4265. "src/compiler/backend/x64/code-generator-x64.cc",
  4266. "src/compiler/backend/x64/instruction-scheduler-x64.cc",
  4267. "src/compiler/backend/x64/instruction-selector-x64.cc",
  4268. "src/compiler/backend/x64/unwinding-info-writer-x64.cc",
  4269. "src/deoptimizer/x64/deoptimizer-x64.cc",
  4270. "src/diagnostics/x64/disasm-x64.cc",
  4271. "src/diagnostics/x64/eh-frame-x64.cc",
  4272. "src/diagnostics/x64/unwinder-x64.cc",
  4273. "src/execution/x64/frame-constants-x64.cc",
  4274. "src/regexp/x64/regexp-macro-assembler-x64.cc",
  4275. ]
  4276. if (is_win) {
  4277. sources += [ "src/diagnostics/unwinding-info-win64.cc" ]
  4278. }
  4279. if (v8_enable_webassembly) {
  4280. # iOS Xcode simulator builds run on an x64 target. iOS and macOS are both
  4281. # based on Darwin and thus POSIX-compliant to a similar degree.
  4282. if (is_linux || is_chromeos || is_mac || is_ios ||
  4283. target_os == "freebsd") {
  4284. sources += [
  4285. "src/trap-handler/handler-inside-posix.cc",
  4286. "src/trap-handler/handler-outside-posix.cc",
  4287. ]
  4288. } else if (is_win) {
  4289. sources += [
  4290. "src/trap-handler/handler-inside-win.cc",
  4291. "src/trap-handler/handler-outside-win.cc",
  4292. ]
  4293. }
  4294. }
  4295. } else if (v8_current_cpu == "arm") {
  4296. sources += [ ### gcmole(arch:arm) ###
  4297. "src/codegen/arm/assembler-arm.cc",
  4298. "src/codegen/arm/constants-arm.cc",
  4299. "src/codegen/arm/cpu-arm.cc",
  4300. "src/codegen/arm/macro-assembler-arm.cc",
  4301. "src/compiler/backend/arm/code-generator-arm.cc",
  4302. "src/compiler/backend/arm/instruction-scheduler-arm.cc",
  4303. "src/compiler/backend/arm/instruction-selector-arm.cc",
  4304. "src/compiler/backend/arm/unwinding-info-writer-arm.cc",
  4305. "src/deoptimizer/arm/deoptimizer-arm.cc",
  4306. "src/diagnostics/arm/disasm-arm.cc",
  4307. "src/diagnostics/arm/eh-frame-arm.cc",
  4308. "src/diagnostics/arm/unwinder-arm.cc",
  4309. "src/execution/arm/frame-constants-arm.cc",
  4310. "src/execution/arm/simulator-arm.cc",
  4311. "src/regexp/arm/regexp-macro-assembler-arm.cc",
  4312. ]
  4313. } else if (v8_current_cpu == "arm64") {
  4314. sources += [ ### gcmole(arch:arm64) ###
  4315. "src/codegen/arm64/assembler-arm64.cc",
  4316. "src/codegen/arm64/cpu-arm64.cc",
  4317. "src/codegen/arm64/decoder-arm64.cc",
  4318. "src/codegen/arm64/instructions-arm64-constants.cc",
  4319. "src/codegen/arm64/instructions-arm64.cc",
  4320. "src/codegen/arm64/macro-assembler-arm64.cc",
  4321. "src/codegen/arm64/register-arm64.cc",
  4322. "src/codegen/arm64/utils-arm64.cc",
  4323. "src/compiler/backend/arm64/code-generator-arm64.cc",
  4324. "src/compiler/backend/arm64/instruction-scheduler-arm64.cc",
  4325. "src/compiler/backend/arm64/instruction-selector-arm64.cc",
  4326. "src/compiler/backend/arm64/unwinding-info-writer-arm64.cc",
  4327. "src/deoptimizer/arm64/deoptimizer-arm64.cc",
  4328. "src/diagnostics/arm64/disasm-arm64.cc",
  4329. "src/diagnostics/arm64/eh-frame-arm64.cc",
  4330. "src/diagnostics/arm64/unwinder-arm64.cc",
  4331. "src/execution/arm64/frame-constants-arm64.cc",
  4332. "src/execution/arm64/pointer-auth-arm64.cc",
  4333. "src/execution/arm64/simulator-arm64.cc",
  4334. "src/execution/arm64/simulator-logic-arm64.cc",
  4335. "src/regexp/arm64/regexp-macro-assembler-arm64.cc",
  4336. ]
  4337. if (v8_enable_webassembly) {
  4338. # Trap handling is enabled on arm64 Mac and in simulators on x64 on Linux,
  4339. # Mac, and Windows.
  4340. if ((current_cpu == "arm64" && is_mac) ||
  4341. (current_cpu == "x64" && (is_linux || is_chromeos || is_mac))) {
  4342. sources += [
  4343. "src/trap-handler/handler-inside-posix.cc",
  4344. "src/trap-handler/handler-outside-posix.cc",
  4345. ]
  4346. } else if (current_cpu == "x64" && is_win) {
  4347. sources += [
  4348. "src/trap-handler/handler-inside-win.cc",
  4349. "src/trap-handler/handler-outside-win.cc",
  4350. ]
  4351. }
  4352. if (current_cpu == "x64" &&
  4353. (is_linux || is_chromeos || is_mac || is_win)) {
  4354. sources += [ "src/trap-handler/handler-outside-simulator.cc" ]
  4355. }
  4356. }
  4357. if (is_win) {
  4358. sources += [ "src/diagnostics/unwinding-info-win64.cc" ]
  4359. }
  4360. } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") {
  4361. sources += [ ### gcmole(arch:mipsel) ###
  4362. "src/codegen/mips/assembler-mips.cc",
  4363. "src/codegen/mips/constants-mips.cc",
  4364. "src/codegen/mips/cpu-mips.cc",
  4365. "src/codegen/mips/interface-descriptors-mips-inl.h",
  4366. "src/codegen/mips/macro-assembler-mips.cc",
  4367. "src/compiler/backend/mips/code-generator-mips.cc",
  4368. "src/compiler/backend/mips/instruction-scheduler-mips.cc",
  4369. "src/compiler/backend/mips/instruction-selector-mips.cc",
  4370. "src/deoptimizer/mips/deoptimizer-mips.cc",
  4371. "src/diagnostics/mips/disasm-mips.cc",
  4372. "src/diagnostics/mips/unwinder-mips.cc",
  4373. "src/execution/mips/frame-constants-mips.cc",
  4374. "src/execution/mips/simulator-mips.cc",
  4375. "src/regexp/mips/regexp-macro-assembler-mips.cc",
  4376. ]
  4377. } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") {
  4378. sources += [ ### gcmole(arch:mips64el) ###
  4379. "src/codegen/mips64/assembler-mips64.cc",
  4380. "src/codegen/mips64/constants-mips64.cc",
  4381. "src/codegen/mips64/cpu-mips64.cc",
  4382. "src/codegen/mips64/interface-descriptors-mips64-inl.h",
  4383. "src/codegen/mips64/macro-assembler-mips64.cc",
  4384. "src/compiler/backend/mips64/code-generator-mips64.cc",
  4385. "src/compiler/backend/mips64/instruction-scheduler-mips64.cc",
  4386. "src/compiler/backend/mips64/instruction-selector-mips64.cc",
  4387. "src/deoptimizer/mips64/deoptimizer-mips64.cc",
  4388. "src/diagnostics/mips64/disasm-mips64.cc",
  4389. "src/diagnostics/mips64/unwinder-mips64.cc",
  4390. "src/execution/mips64/frame-constants-mips64.cc",
  4391. "src/execution/mips64/simulator-mips64.cc",
  4392. "src/regexp/mips64/regexp-macro-assembler-mips64.cc",
  4393. ]
  4394. } else if (v8_current_cpu == "loong64") {
  4395. sources += [ ### gcmole(arch:loong64) ###
  4396. "src/codegen/loong64/assembler-loong64.cc",
  4397. "src/codegen/loong64/constants-loong64.cc",
  4398. "src/codegen/loong64/cpu-loong64.cc",
  4399. "src/codegen/loong64/interface-descriptors-loong64-inl.h",
  4400. "src/codegen/loong64/macro-assembler-loong64.cc",
  4401. "src/compiler/backend/loong64/code-generator-loong64.cc",
  4402. "src/compiler/backend/loong64/instruction-scheduler-loong64.cc",
  4403. "src/compiler/backend/loong64/instruction-selector-loong64.cc",
  4404. "src/deoptimizer/loong64/deoptimizer-loong64.cc",
  4405. "src/diagnostics/loong64/disasm-loong64.cc",
  4406. "src/diagnostics/loong64/unwinder-loong64.cc",
  4407. "src/execution/loong64/frame-constants-loong64.cc",
  4408. "src/execution/loong64/simulator-loong64.cc",
  4409. "src/regexp/loong64/regexp-macro-assembler-loong64.cc",
  4410. ]
  4411. } else if (v8_current_cpu == "ppc") {
  4412. sources += [ ### gcmole(arch:ppc) ###
  4413. "src/codegen/ppc/assembler-ppc.cc",
  4414. "src/codegen/ppc/constants-ppc.cc",
  4415. "src/codegen/ppc/cpu-ppc.cc",
  4416. "src/codegen/ppc/macro-assembler-ppc.cc",
  4417. "src/compiler/backend/ppc/code-generator-ppc.cc",
  4418. "src/compiler/backend/ppc/instruction-scheduler-ppc.cc",
  4419. "src/compiler/backend/ppc/instruction-selector-ppc.cc",
  4420. "src/compiler/backend/ppc/unwinding-info-writer-ppc.cc",
  4421. "src/deoptimizer/ppc/deoptimizer-ppc.cc",
  4422. "src/diagnostics/ppc/disasm-ppc.cc",
  4423. "src/diagnostics/ppc/eh-frame-ppc.cc",
  4424. "src/diagnostics/ppc/unwinder-ppc.cc",
  4425. "src/execution/ppc/frame-constants-ppc.cc",
  4426. "src/execution/ppc/simulator-ppc.cc",
  4427. "src/regexp/ppc/regexp-macro-assembler-ppc.cc",
  4428. ]
  4429. } else if (v8_current_cpu == "ppc64") {
  4430. sources += [ ### gcmole(arch:ppc64) ###
  4431. "src/codegen/ppc/assembler-ppc.cc",
  4432. "src/codegen/ppc/constants-ppc.cc",
  4433. "src/codegen/ppc/cpu-ppc.cc",
  4434. "src/codegen/ppc/macro-assembler-ppc.cc",
  4435. "src/compiler/backend/ppc/code-generator-ppc.cc",
  4436. "src/compiler/backend/ppc/instruction-scheduler-ppc.cc",
  4437. "src/compiler/backend/ppc/instruction-selector-ppc.cc",
  4438. "src/compiler/backend/ppc/unwinding-info-writer-ppc.cc",
  4439. "src/deoptimizer/ppc/deoptimizer-ppc.cc",
  4440. "src/diagnostics/ppc/disasm-ppc.cc",
  4441. "src/diagnostics/ppc/eh-frame-ppc.cc",
  4442. "src/diagnostics/ppc/unwinder-ppc.cc",
  4443. "src/execution/ppc/frame-constants-ppc.cc",
  4444. "src/execution/ppc/simulator-ppc.cc",
  4445. "src/regexp/ppc/regexp-macro-assembler-ppc.cc",
  4446. ]
  4447. } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
  4448. sources += [ ### gcmole(arch:s390) ###
  4449. "src/codegen/s390/assembler-s390.cc",
  4450. "src/codegen/s390/constants-s390.cc",
  4451. "src/codegen/s390/cpu-s390.cc",
  4452. "src/codegen/s390/macro-assembler-s390.cc",
  4453. "src/compiler/backend/s390/code-generator-s390.cc",
  4454. "src/compiler/backend/s390/instruction-scheduler-s390.cc",
  4455. "src/compiler/backend/s390/instruction-selector-s390.cc",
  4456. "src/compiler/backend/s390/unwinding-info-writer-s390.cc",
  4457. "src/deoptimizer/s390/deoptimizer-s390.cc",
  4458. "src/diagnostics/s390/disasm-s390.cc",
  4459. "src/diagnostics/s390/eh-frame-s390.cc",
  4460. "src/diagnostics/s390/unwinder-s390.cc",
  4461. "src/execution/s390/frame-constants-s390.cc",
  4462. "src/execution/s390/simulator-s390.cc",
  4463. "src/regexp/s390/regexp-macro-assembler-s390.cc",
  4464. ]
  4465. } else if (v8_current_cpu == "riscv64") {
  4466. sources += [ ### gcmole(arch:riscv64) ###
  4467. "src/baseline/riscv64/baseline-assembler-riscv64-inl.h",
  4468. "src/baseline/riscv64/baseline-compiler-riscv64-inl.h",
  4469. "src/codegen/riscv64/assembler-riscv64-inl.h",
  4470. "src/codegen/riscv64/assembler-riscv64.cc",
  4471. "src/codegen/riscv64/constants-riscv64.cc",
  4472. "src/codegen/riscv64/cpu-riscv64.cc",
  4473. "src/codegen/riscv64/interface-descriptors-riscv64-inl.h",
  4474. "src/codegen/riscv64/macro-assembler-riscv64.cc",
  4475. "src/compiler/backend/riscv64/code-generator-riscv64.cc",
  4476. "src/compiler/backend/riscv64/instruction-scheduler-riscv64.cc",
  4477. "src/compiler/backend/riscv64/instruction-selector-riscv64.cc",
  4478. "src/deoptimizer/riscv64/deoptimizer-riscv64.cc",
  4479. "src/diagnostics/riscv64/disasm-riscv64.cc",
  4480. "src/diagnostics/riscv64/unwinder-riscv64.cc",
  4481. "src/execution/riscv64/frame-constants-riscv64.cc",
  4482. "src/execution/riscv64/simulator-riscv64.cc",
  4483. "src/regexp/riscv64/regexp-macro-assembler-riscv64.cc",
  4484. ]
  4485. }
  4486. # Architecture independent but platform-specific sources
  4487. if (is_win) {
  4488. if (v8_enable_system_instrumentation) {
  4489. sources += [
  4490. "src/diagnostics/system-jit-metadata-win.h",
  4491. "src/diagnostics/system-jit-win.cc",
  4492. "src/diagnostics/system-jit-win.h",
  4493. ]
  4494. }
  4495. }
  4496. configs = [
  4497. ":internal_config",
  4498. ":cppgc_base_config",
  4499. ]
  4500. deps = [
  4501. ":torque_generated_definitions",
  4502. ":v8_bigint",
  4503. ":v8_headers",
  4504. ":v8_heap_base",
  4505. ":v8_libbase",
  4506. ":v8_shared_internal_headers",
  4507. ":v8_tracing",
  4508. ":v8_version",
  4509. "src/inspector:inspector",
  4510. ]
  4511. public_deps = [
  4512. ":cppgc_base",
  4513. ":generate_bytecode_builtins_list",
  4514. ":run_torque",
  4515. ":v8_headers",
  4516. ":v8_internal_headers",
  4517. ":v8_maybe_icu",
  4518. ]
  4519. if (v8_enable_i18n_support) {
  4520. deps += [ ":run_gen-regexp-special-case" ]
  4521. sources += [ "$target_gen_dir/src/regexp/special-case.cc" ]
  4522. if (is_win) {
  4523. deps += [ "//third_party/icu:icudata" ]
  4524. }
  4525. } else {
  4526. sources -= [
  4527. "src/builtins/builtins-intl.cc",
  4528. "src/objects/intl-objects.cc",
  4529. "src/objects/js-break-iterator.cc",
  4530. "src/objects/js-collator.cc",
  4531. "src/objects/js-date-time-format.cc",
  4532. "src/objects/js-display-names.cc",
  4533. "src/objects/js-list-format.cc",
  4534. "src/objects/js-locale.cc",
  4535. "src/objects/js-number-format.cc",
  4536. "src/objects/js-plural-rules.cc",
  4537. "src/objects/js-relative-time-format.cc",
  4538. "src/objects/js-segment-iterator.cc",
  4539. "src/objects/js-segmenter.cc",
  4540. "src/objects/js-segments.cc",
  4541. "src/runtime/runtime-intl.cc",
  4542. "src/strings/char-predicates.cc",
  4543. ]
  4544. }
  4545. deps += [
  4546. "//third_party/zlib",
  4547. "//third_party/zlib/google:compression_utils_portable",
  4548. ]
  4549. if (v8_postmortem_support) {
  4550. sources += [ "$target_gen_dir/debug-support.cc" ]
  4551. deps += [ ":postmortem-metadata" ]
  4552. }
  4553. libs = []
  4554. if (v8_enable_third_party_heap) {
  4555. libs += v8_third_party_heap_libs
  4556. }
  4557. # Platforms that don't have CAS support need to link atomic library
  4558. # to implement atomic memory access
  4559. if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel" ||
  4560. v8_current_cpu == "mips64" || v8_current_cpu == "mips64el" ||
  4561. v8_current_cpu == "ppc" || v8_current_cpu == "ppc64" ||
  4562. v8_current_cpu == "s390" || v8_current_cpu == "s390x" ||
  4563. v8_current_cpu == "riscv64") {
  4564. libs += [ "atomic" ]
  4565. }
  4566. if (v8_enable_vtunetracemark && (is_linux || is_chromeos || is_win)) {
  4567. sources += [
  4568. "src/extensions/vtunedomain-support-extension.cc",
  4569. "src/extensions/vtunedomain-support-extension.h",
  4570. ]
  4571. deps += [ "src/third_party/vtune:v8_vtune_trace_mark" ]
  4572. }
  4573. if (v8_use_perfetto) {
  4574. sources += [
  4575. "src/tracing/trace-categories.cc",
  4576. "src/tracing/trace-categories.h",
  4577. ]
  4578. }
  4579. }
  4580. group("v8_base") {
  4581. public_deps = [
  4582. ":v8_base_without_compiler",
  4583. ":v8_compiler",
  4584. ]
  4585. }
  4586. v8_source_set("torque_base") {
  4587. visibility = [ ":*" ] # Only targets in this file can depend on this.
  4588. sources = [
  4589. "src/numbers/integer-literal-inl.h",
  4590. "src/numbers/integer-literal.h",
  4591. "src/torque/ast.h",
  4592. "src/torque/cc-generator.cc",
  4593. "src/torque/cc-generator.h",
  4594. "src/torque/cfg.cc",
  4595. "src/torque/cfg.h",
  4596. "src/torque/class-debug-reader-generator.cc",
  4597. "src/torque/constants.h",
  4598. "src/torque/contextual.h",
  4599. "src/torque/cpp-builder.cc",
  4600. "src/torque/cpp-builder.h",
  4601. "src/torque/csa-generator.cc",
  4602. "src/torque/csa-generator.h",
  4603. "src/torque/declarable.cc",
  4604. "src/torque/declarable.h",
  4605. "src/torque/declaration-visitor.cc",
  4606. "src/torque/declaration-visitor.h",
  4607. "src/torque/declarations.cc",
  4608. "src/torque/declarations.h",
  4609. "src/torque/earley-parser.cc",
  4610. "src/torque/earley-parser.h",
  4611. "src/torque/global-context.cc",
  4612. "src/torque/global-context.h",
  4613. "src/torque/implementation-visitor.cc",
  4614. "src/torque/implementation-visitor.h",
  4615. "src/torque/instance-type-generator.cc",
  4616. "src/torque/instructions.cc",
  4617. "src/torque/instructions.h",
  4618. "src/torque/kythe-data.cc",
  4619. "src/torque/kythe-data.h",
  4620. "src/torque/parameter-difference.h",
  4621. "src/torque/server-data.cc",
  4622. "src/torque/server-data.h",
  4623. "src/torque/source-positions.cc",
  4624. "src/torque/source-positions.h",
  4625. "src/torque/torque-code-generator.cc",
  4626. "src/torque/torque-code-generator.h",
  4627. "src/torque/torque-compiler.cc",
  4628. "src/torque/torque-compiler.h",
  4629. "src/torque/torque-parser.cc",
  4630. "src/torque/torque-parser.h",
  4631. "src/torque/type-inference.cc",
  4632. "src/torque/type-inference.h",
  4633. "src/torque/type-oracle.cc",
  4634. "src/torque/type-oracle.h",
  4635. "src/torque/type-visitor.cc",
  4636. "src/torque/type-visitor.h",
  4637. "src/torque/types.cc",
  4638. "src/torque/types.h",
  4639. "src/torque/utils.cc",
  4640. "src/torque/utils.h",
  4641. ]
  4642. deps = [
  4643. ":v8_flags",
  4644. ":v8_shared_internal_headers",
  4645. ]
  4646. public_deps = [ ":v8_libbase" ]
  4647. # The use of exceptions for Torque in violation of the Chromium style-guide
  4648. # is justified by the fact that it is only used from the non-essential
  4649. # language server and can be removed anytime if it causes problems.
  4650. configs = [
  4651. ":internal_config",
  4652. "//build/config/compiler:exceptions",
  4653. "//build/config/compiler:rtti",
  4654. ]
  4655. remove_configs = [
  4656. "//build/config/compiler:no_exceptions",
  4657. "//build/config/compiler:no_rtti",
  4658. ]
  4659. if (is_win && is_asan) {
  4660. # Due to a bug in ASAN on Windows (chromium:893437), we disable ASAN for
  4661. # Torque on Windows.
  4662. remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ]
  4663. }
  4664. if (is_debug && !v8_optimized_debug && v8_enable_fast_torque) {
  4665. # The :no_optimize config is added to v8_add_configs in v8.gni.
  4666. remove_configs += [ "//build/config/compiler:no_optimize" ]
  4667. configs += [ ":always_optimize" ]
  4668. }
  4669. }
  4670. v8_source_set("torque_ls_base") {
  4671. sources = [
  4672. "src/torque/ls/globals.h",
  4673. "src/torque/ls/json-parser.cc",
  4674. "src/torque/ls/json-parser.h",
  4675. "src/torque/ls/json.cc",
  4676. "src/torque/ls/json.h",
  4677. "src/torque/ls/message-handler.cc",
  4678. "src/torque/ls/message-handler.h",
  4679. "src/torque/ls/message-macros.h",
  4680. "src/torque/ls/message-pipe.h",
  4681. "src/torque/ls/message.h",
  4682. ]
  4683. public_deps = [ ":torque_base" ]
  4684. # The use of exceptions for Torque in violation of the Chromium style-guide
  4685. # is justified by the fact that it is only used from the non-essential
  4686. # language server and can be removed anytime if it causes problems.
  4687. configs = [
  4688. ":internal_config",
  4689. "//build/config/compiler:exceptions",
  4690. "//build/config/compiler:rtti",
  4691. ]
  4692. remove_configs = [
  4693. "//build/config/compiler:no_exceptions",
  4694. "//build/config/compiler:no_rtti",
  4695. ]
  4696. if (is_win && is_asan) {
  4697. remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ]
  4698. }
  4699. }
  4700. v8_component("v8_libbase") {
  4701. sources = [
  4702. "src/base/address-region.h",
  4703. "src/base/atomic-utils.h",
  4704. "src/base/atomicops.h",
  4705. "src/base/atomicops_internals_atomicword_compat.h",
  4706. "src/base/base-export.h",
  4707. "src/base/bit-field.h",
  4708. "src/base/bits-iterator.h",
  4709. "src/base/bits.cc",
  4710. "src/base/bits.h",
  4711. "src/base/bounded-page-allocator.cc",
  4712. "src/base/bounded-page-allocator.h",
  4713. "src/base/bounds.h",
  4714. "src/base/build_config.h",
  4715. "src/base/compiler-specific.h",
  4716. "src/base/cpu.cc",
  4717. "src/base/cpu.h",
  4718. "src/base/debug/stack_trace.cc",
  4719. "src/base/debug/stack_trace.h",
  4720. "src/base/division-by-constant.cc",
  4721. "src/base/division-by-constant.h",
  4722. "src/base/emulated-virtual-address-subspace.cc",
  4723. "src/base/emulated-virtual-address-subspace.h",
  4724. "src/base/enum-set.h",
  4725. "src/base/export-template.h",
  4726. "src/base/file-utils.cc",
  4727. "src/base/file-utils.h",
  4728. "src/base/flags.h",
  4729. "src/base/free_deleter.h",
  4730. "src/base/functional.cc",
  4731. "src/base/functional.h",
  4732. "src/base/hashmap-entry.h",
  4733. "src/base/hashmap.h",
  4734. "src/base/ieee754.cc",
  4735. "src/base/ieee754.h",
  4736. "src/base/immediate-crash.h",
  4737. "src/base/iterator.h",
  4738. "src/base/lazy-instance.h",
  4739. "src/base/logging.cc",
  4740. "src/base/logging.h",
  4741. "src/base/macros.h",
  4742. "src/base/memory.h",
  4743. "src/base/numbers/bignum-dtoa.cc",
  4744. "src/base/numbers/bignum-dtoa.h",
  4745. "src/base/numbers/bignum.cc",
  4746. "src/base/numbers/bignum.h",
  4747. "src/base/numbers/cached-powers.cc",
  4748. "src/base/numbers/cached-powers.h",
  4749. "src/base/numbers/diy-fp.cc",
  4750. "src/base/numbers/diy-fp.h",
  4751. "src/base/numbers/double.h",
  4752. "src/base/numbers/dtoa.cc",
  4753. "src/base/numbers/dtoa.h",
  4754. "src/base/numbers/fast-dtoa.cc",
  4755. "src/base/numbers/fast-dtoa.h",
  4756. "src/base/numbers/fixed-dtoa.cc",
  4757. "src/base/numbers/fixed-dtoa.h",
  4758. "src/base/numbers/strtod.cc",
  4759. "src/base/numbers/strtod.h",
  4760. "src/base/once.cc",
  4761. "src/base/once.h",
  4762. "src/base/optional.h",
  4763. "src/base/overflowing-math.h",
  4764. "src/base/page-allocator.cc",
  4765. "src/base/page-allocator.h",
  4766. "src/base/platform/condition-variable.cc",
  4767. "src/base/platform/condition-variable.h",
  4768. "src/base/platform/elapsed-timer.h",
  4769. "src/base/platform/mutex.cc",
  4770. "src/base/platform/mutex.h",
  4771. "src/base/platform/platform.h",
  4772. "src/base/platform/semaphore.cc",
  4773. "src/base/platform/semaphore.h",
  4774. "src/base/platform/time.cc",
  4775. "src/base/platform/time.h",
  4776. "src/base/platform/wrappers.h",
  4777. "src/base/platform/yield-processor.h",
  4778. "src/base/pointer-with-payload.h",
  4779. "src/base/region-allocator.cc",
  4780. "src/base/region-allocator.h",
  4781. "src/base/ring-buffer.h",
  4782. "src/base/safe_conversions.h",
  4783. "src/base/safe_conversions_arm_impl.h",
  4784. "src/base/safe_conversions_impl.h",
  4785. "src/base/sanitizer/asan.h",
  4786. "src/base/sanitizer/lsan-page-allocator.cc",
  4787. "src/base/sanitizer/lsan-page-allocator.h",
  4788. "src/base/sanitizer/lsan-virtual-address-space.cc",
  4789. "src/base/sanitizer/lsan-virtual-address-space.h",
  4790. "src/base/sanitizer/lsan.h",
  4791. "src/base/sanitizer/msan.h",
  4792. "src/base/sanitizer/tsan.h",
  4793. "src/base/small-vector.h",
  4794. "src/base/strings.cc",
  4795. "src/base/strings.h",
  4796. "src/base/sys-info.cc",
  4797. "src/base/sys-info.h",
  4798. "src/base/template-utils.h",
  4799. "src/base/threaded-list.h",
  4800. "src/base/timezone-cache.h",
  4801. "src/base/utils/random-number-generator.cc",
  4802. "src/base/utils/random-number-generator.h",
  4803. "src/base/v8-fallthrough.h",
  4804. "src/base/vector.h",
  4805. "src/base/virtual-address-space-page-allocator.cc",
  4806. "src/base/virtual-address-space-page-allocator.h",
  4807. "src/base/virtual-address-space.cc",
  4808. "src/base/virtual-address-space.h",
  4809. "src/base/vlq-base64.cc",
  4810. "src/base/vlq-base64.h",
  4811. "src/base/vlq.h",
  4812. ]
  4813. configs = [ ":internal_config_base" ]
  4814. public_configs = [ ":libbase_config" ]
  4815. deps = [ ":v8_config_headers" ]
  4816. data = []
  4817. data_deps = []
  4818. defines = []
  4819. if (is_component_build) {
  4820. defines = [ "BUILDING_V8_BASE_SHARED" ]
  4821. }
  4822. if (is_posix || is_fuchsia) {
  4823. sources += [
  4824. "src/base/platform/platform-posix.cc",
  4825. "src/base/platform/platform-posix.h",
  4826. ]
  4827. if (current_os != "aix") {
  4828. sources += [
  4829. "src/base/platform/platform-posix-time.cc",
  4830. "src/base/platform/platform-posix-time.h",
  4831. ]
  4832. }
  4833. }
  4834. if (is_linux || is_chromeos) {
  4835. sources += [
  4836. "src/base/debug/stack_trace_posix.cc",
  4837. "src/base/platform/platform-linux.cc",
  4838. ]
  4839. libs = [
  4840. "dl",
  4841. "rt",
  4842. ]
  4843. } else if (current_os == "aix") {
  4844. sources += [
  4845. "src/base/debug/stack_trace_posix.cc",
  4846. "src/base/platform/platform-aix.cc",
  4847. ]
  4848. libs = [ "dl" ]
  4849. } else if (is_android) {
  4850. if (current_toolchain == host_toolchain) {
  4851. libs = [
  4852. "dl",
  4853. "rt",
  4854. ]
  4855. if (host_os == "mac") {
  4856. sources += [
  4857. "src/base/debug/stack_trace_posix.cc",
  4858. "src/base/platform/platform-darwin.cc",
  4859. "src/base/platform/platform-macos.cc",
  4860. ]
  4861. } else {
  4862. sources += [
  4863. "src/base/debug/stack_trace_posix.cc",
  4864. "src/base/platform/platform-linux.cc",
  4865. ]
  4866. }
  4867. } else {
  4868. sources += [
  4869. "src/base/debug/stack_trace_android.cc",
  4870. "src/base/platform/platform-linux.cc",
  4871. ]
  4872. }
  4873. } else if (is_fuchsia) {
  4874. sources += [
  4875. "src/base/debug/stack_trace_fuchsia.cc",
  4876. "src/base/platform/platform-fuchsia.cc",
  4877. ]
  4878. deps += [
  4879. "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.kernel",
  4880. "//third_party/fuchsia-sdk/sdk/pkg/fdio",
  4881. "//third_party/fuchsia-sdk/sdk/pkg/zx",
  4882. ]
  4883. } else if (is_mac) {
  4884. sources += [
  4885. "src/base/debug/stack_trace_posix.cc",
  4886. "src/base/platform/platform-darwin.cc",
  4887. "src/base/platform/platform-macos.cc",
  4888. ]
  4889. } else if (is_ios) {
  4890. sources += [
  4891. "src/base/debug/stack_trace_posix.cc",
  4892. "src/base/platform/platform-darwin.cc",
  4893. ]
  4894. } else if (is_win) {
  4895. # TODO(infra): Add support for cygwin.
  4896. sources += [
  4897. "src/base/debug/stack_trace_win.cc",
  4898. "src/base/platform/platform-win32.cc",
  4899. "src/base/win32-headers.h",
  4900. ]
  4901. defines += [ "_CRT_RAND_S" ] # for rand_s()
  4902. libs = [
  4903. "dbghelp.lib",
  4904. "winmm.lib",
  4905. "ws2_32.lib",
  4906. ]
  4907. if (v8_enable_system_instrumentation) {
  4908. libs += [ "advapi32.lib" ] # Needed for TraceLoggingProvider.h
  4909. }
  4910. data_deps += [ "//build/win:runtime_libs" ]
  4911. }
  4912. if (v8_current_cpu == "mips" || v8_current_cpu == "mips64") {
  4913. # Add runtime libs for mips.
  4914. data += [
  4915. "tools/mips_toolchain/sysroot/usr/lib/",
  4916. "tools/mips_toolchain/mips-mti-linux-gnu/lib",
  4917. ]
  4918. }
  4919. if (is_ubsan && (v8_current_cpu == "x86" || v8_current_cpu == "arm" ||
  4920. v8_current_cpu == "mips")) {
  4921. # Special UBSan 32-bit requirement.
  4922. sources += [ "src/base/ubsan.cc" ]
  4923. }
  4924. if (v8_current_cpu == "riscv64") {
  4925. libs += [ "atomic" ]
  4926. }
  4927. if (is_tsan && !build_with_chromium) {
  4928. data += [ "tools/sanitizers/tsan_suppressions.txt" ]
  4929. }
  4930. if (using_sanitizer && !build_with_chromium) {
  4931. data_deps +=
  4932. [ "//build/config/clang:llvm-symbolizer_data($host_toolchain)" ]
  4933. }
  4934. # TODO(infra): Add support for qnx, freebsd, openbsd, netbsd, and solaris.
  4935. }
  4936. v8_component("v8_libplatform") {
  4937. sources = [
  4938. "//base/trace_event/common/trace_event_common.h",
  4939. "include/libplatform/libplatform-export.h",
  4940. "include/libplatform/libplatform.h",
  4941. "include/libplatform/v8-tracing.h",
  4942. "src/libplatform/default-foreground-task-runner.cc",
  4943. "src/libplatform/default-foreground-task-runner.h",
  4944. "src/libplatform/default-job.cc",
  4945. "src/libplatform/default-job.h",
  4946. "src/libplatform/default-platform.cc",
  4947. "src/libplatform/default-platform.h",
  4948. "src/libplatform/default-worker-threads-task-runner.cc",
  4949. "src/libplatform/default-worker-threads-task-runner.h",
  4950. "src/libplatform/delayed-task-queue.cc",
  4951. "src/libplatform/delayed-task-queue.h",
  4952. "src/libplatform/task-queue.cc",
  4953. "src/libplatform/task-queue.h",
  4954. "src/libplatform/tracing/trace-buffer.cc",
  4955. "src/libplatform/tracing/trace-buffer.h",
  4956. "src/libplatform/tracing/trace-config.cc",
  4957. "src/libplatform/tracing/trace-object.cc",
  4958. "src/libplatform/tracing/trace-writer.cc",
  4959. "src/libplatform/tracing/trace-writer.h",
  4960. "src/libplatform/tracing/tracing-controller.cc",
  4961. "src/libplatform/worker-thread.cc",
  4962. "src/libplatform/worker-thread.h",
  4963. ]
  4964. configs = [ ":internal_config_base" ]
  4965. if (is_component_build) {
  4966. defines = [ "BUILDING_V8_PLATFORM_SHARED" ]
  4967. }
  4968. public_configs = [ ":libplatform_config" ]
  4969. public_deps = []
  4970. deps = [
  4971. ":v8_config_headers",
  4972. ":v8_libbase",
  4973. ":v8_tracing",
  4974. ]
  4975. if (v8_use_perfetto) {
  4976. sources -= [
  4977. "//base/trace_event/common/trace_event_common.h",
  4978. "src/libplatform/tracing/trace-buffer.cc",
  4979. "src/libplatform/tracing/trace-buffer.h",
  4980. "src/libplatform/tracing/trace-object.cc",
  4981. "src/libplatform/tracing/trace-writer.cc",
  4982. "src/libplatform/tracing/trace-writer.h",
  4983. ]
  4984. sources += [
  4985. "src/libplatform/tracing/trace-event-listener.cc",
  4986. "src/libplatform/tracing/trace-event-listener.h",
  4987. ]
  4988. deps += [
  4989. # TODO(skyostil): Switch TraceEventListener to protozero.
  4990. "//third_party/perfetto/protos/perfetto/trace:lite",
  4991. ]
  4992. }
  4993. if (v8_enable_system_instrumentation) {
  4994. sources += [ "src/libplatform/tracing/recorder.h" ]
  4995. if (is_mac) {
  4996. sources += [ "src/libplatform/tracing/recorder-mac.cc" ]
  4997. } else if (is_win) {
  4998. sources += [ "src/libplatform/tracing/recorder-win.cc" ]
  4999. }
  5000. }
  5001. if (v8_current_cpu == "riscv64") {
  5002. libs = [ "atomic" ]
  5003. }
  5004. }
  5005. v8_source_set("fuzzer_support") {
  5006. visibility = [ ":*" ] # Only targets in this file can depend on this.
  5007. sources = [
  5008. "test/fuzzer/fuzzer-support.cc",
  5009. "test/fuzzer/fuzzer-support.h",
  5010. ]
  5011. configs = [ ":internal_config_base" ]
  5012. public_deps = [
  5013. ":v8",
  5014. ":v8_libbase",
  5015. ":v8_libplatform",
  5016. ":v8_maybe_icu",
  5017. ]
  5018. }
  5019. v8_source_set("v8_bigint") {
  5020. sources = [
  5021. "src/bigint/bigint-internal.cc",
  5022. "src/bigint/bigint-internal.h",
  5023. "src/bigint/bigint.h",
  5024. "src/bigint/bitwise.cc",
  5025. "src/bigint/digit-arithmetic.h",
  5026. "src/bigint/div-burnikel.cc",
  5027. "src/bigint/div-helpers.cc",
  5028. "src/bigint/div-helpers.h",
  5029. "src/bigint/div-schoolbook.cc",
  5030. "src/bigint/fromstring.cc",
  5031. "src/bigint/mul-karatsuba.cc",
  5032. "src/bigint/mul-schoolbook.cc",
  5033. "src/bigint/tostring.cc",
  5034. "src/bigint/util.h",
  5035. "src/bigint/vector-arithmetic.cc",
  5036. "src/bigint/vector-arithmetic.h",
  5037. ]
  5038. if (v8_advanced_bigint_algorithms) {
  5039. sources += [
  5040. "src/bigint/div-barrett.cc",
  5041. "src/bigint/mul-fft.cc",
  5042. "src/bigint/mul-toom.cc",
  5043. ]
  5044. }
  5045. configs = [ ":internal_config" ]
  5046. }
  5047. v8_source_set("v8_heap_base_headers") {
  5048. sources = [
  5049. "src/heap/base/active-system-pages.h",
  5050. "src/heap/base/stack.h",
  5051. "src/heap/base/worklist.h",
  5052. ]
  5053. configs = [ ":internal_config" ]
  5054. public_deps = [ ":v8_libbase" ]
  5055. }
  5056. v8_source_set("v8_heap_base") {
  5057. sources = [
  5058. "src/heap/base/active-system-pages.cc",
  5059. "src/heap/base/stack.cc",
  5060. "src/heap/base/worklist.cc",
  5061. ]
  5062. if (is_clang || !is_win) {
  5063. if (current_cpu == "x64") {
  5064. sources += [ "src/heap/base/asm/x64/push_registers_asm.cc" ]
  5065. } else if (current_cpu == "x86") {
  5066. sources += [ "src/heap/base/asm/ia32/push_registers_asm.cc" ]
  5067. } else if (current_cpu == "arm") {
  5068. sources += [ "src/heap/base/asm/arm/push_registers_asm.cc" ]
  5069. } else if (current_cpu == "arm64") {
  5070. sources += [ "src/heap/base/asm/arm64/push_registers_asm.cc" ]
  5071. } else if (current_cpu == "ppc64") {
  5072. sources += [ "src/heap/base/asm/ppc/push_registers_asm.cc" ]
  5073. } else if (current_cpu == "s390x") {
  5074. sources += [ "src/heap/base/asm/s390/push_registers_asm.cc" ]
  5075. } else if (current_cpu == "mipsel") {
  5076. sources += [ "src/heap/base/asm/mips/push_registers_asm.cc" ]
  5077. } else if (current_cpu == "mips64el") {
  5078. sources += [ "src/heap/base/asm/mips64/push_registers_asm.cc" ]
  5079. } else if (current_cpu == "loong64") {
  5080. sources += [ "src/heap/base/asm/loong64/push_registers_asm.cc" ]
  5081. } else if (current_cpu == "riscv64") {
  5082. sources += [ "src/heap/base/asm/riscv64/push_registers_asm.cc" ]
  5083. }
  5084. } else if (is_win) {
  5085. if (current_cpu == "x64") {
  5086. sources += [ "src/heap/base/asm/x64/push_registers_masm.S" ]
  5087. } else if (current_cpu == "x86") {
  5088. sources += [ "src/heap/base/asm/ia32/push_registers_masm.S" ]
  5089. } else if (current_cpu == "arm64") {
  5090. sources += [ "src/heap/base/asm/arm64/push_registers_masm.S" ]
  5091. }
  5092. }
  5093. configs = [ ":internal_config" ]
  5094. public_deps = [
  5095. ":v8_heap_base_headers",
  5096. ":v8_libbase",
  5097. ]
  5098. }
  5099. # This is split out to be a non-code containing target that the Chromium browser
  5100. # can depend upon to get basic cppgc types.
  5101. v8_header_set("cppgc_headers") {
  5102. configs = [ ":internal_config" ]
  5103. public_configs = [
  5104. ":v8_header_features",
  5105. ":cppgc_header_features",
  5106. ]
  5107. sources = [
  5108. "include/cppgc/allocation.h",
  5109. "include/cppgc/common.h",
  5110. "include/cppgc/cross-thread-persistent.h",
  5111. "include/cppgc/custom-space.h",
  5112. "include/cppgc/default-platform.h",
  5113. "include/cppgc/ephemeron-pair.h",
  5114. "include/cppgc/explicit-management.h",
  5115. "include/cppgc/garbage-collected.h",
  5116. "include/cppgc/heap-consistency.h",
  5117. "include/cppgc/heap-state.h",
  5118. "include/cppgc/heap-statistics.h",
  5119. "include/cppgc/heap.h",
  5120. "include/cppgc/internal/api-constants.h",
  5121. "include/cppgc/internal/atomic-entry-flag.h",
  5122. "include/cppgc/internal/compiler-specific.h",
  5123. "include/cppgc/internal/finalizer-trait.h",
  5124. "include/cppgc/internal/gc-info.h",
  5125. "include/cppgc/internal/name-trait.h",
  5126. "include/cppgc/internal/persistent-node.h",
  5127. "include/cppgc/internal/pointer-policies.h",
  5128. "include/cppgc/internal/write-barrier.h",
  5129. "include/cppgc/liveness-broker.h",
  5130. "include/cppgc/macros.h",
  5131. "include/cppgc/member.h",
  5132. "include/cppgc/name-provider.h",
  5133. "include/cppgc/object-size-trait.h",
  5134. "include/cppgc/persistent.h",
  5135. "include/cppgc/platform.h",
  5136. "include/cppgc/prefinalizer.h",
  5137. "include/cppgc/process-heap-statistics.h",
  5138. "include/cppgc/sentinel-pointer.h",
  5139. "include/cppgc/source-location.h",
  5140. # TODO(v8:11952): Remove the testing header here once depending on both,
  5141. # //v8:v8 and //v8:v8_for_testing does not result in ODR violations.
  5142. "include/cppgc/testing.h",
  5143. "include/cppgc/trace-trait.h",
  5144. "include/cppgc/type-traits.h",
  5145. "include/cppgc/visitor.h",
  5146. ]
  5147. if (cppgc_enable_caged_heap) {
  5148. sources += [ "include/cppgc/internal/caged-heap-local-data.h" ]
  5149. }
  5150. deps = [
  5151. ":v8_libbase",
  5152. ":v8_libplatform",
  5153. ]
  5154. public_deps = [ ":v8_config_headers" ]
  5155. }
  5156. v8_source_set("cppgc_base") {
  5157. visibility = [ ":*" ]
  5158. sources = [
  5159. "src/heap/cppgc/allocation.cc",
  5160. "src/heap/cppgc/compaction-worklists.cc",
  5161. "src/heap/cppgc/compaction-worklists.h",
  5162. "src/heap/cppgc/compactor.cc",
  5163. "src/heap/cppgc/compactor.h",
  5164. "src/heap/cppgc/concurrent-marker.cc",
  5165. "src/heap/cppgc/concurrent-marker.h",
  5166. "src/heap/cppgc/explicit-management.cc",
  5167. "src/heap/cppgc/free-list.cc",
  5168. "src/heap/cppgc/free-list.h",
  5169. "src/heap/cppgc/garbage-collector.h",
  5170. "src/heap/cppgc/gc-info-table.cc",
  5171. "src/heap/cppgc/gc-info-table.h",
  5172. "src/heap/cppgc/gc-info.cc",
  5173. "src/heap/cppgc/gc-invoker.cc",
  5174. "src/heap/cppgc/gc-invoker.h",
  5175. "src/heap/cppgc/globals.h",
  5176. "src/heap/cppgc/heap-base.cc",
  5177. "src/heap/cppgc/heap-base.h",
  5178. "src/heap/cppgc/heap-consistency.cc",
  5179. "src/heap/cppgc/heap-growing.cc",
  5180. "src/heap/cppgc/heap-growing.h",
  5181. "src/heap/cppgc/heap-object-header.cc",
  5182. "src/heap/cppgc/heap-object-header.h",
  5183. "src/heap/cppgc/heap-page.cc",
  5184. "src/heap/cppgc/heap-page.h",
  5185. "src/heap/cppgc/heap-space.cc",
  5186. "src/heap/cppgc/heap-space.h",
  5187. "src/heap/cppgc/heap-state.cc",
  5188. "src/heap/cppgc/heap-statistics-collector.cc",
  5189. "src/heap/cppgc/heap-statistics-collector.h",
  5190. "src/heap/cppgc/heap-visitor.h",
  5191. "src/heap/cppgc/heap.cc",
  5192. "src/heap/cppgc/heap.h",
  5193. "src/heap/cppgc/incremental-marking-schedule.cc",
  5194. "src/heap/cppgc/incremental-marking-schedule.h",
  5195. "src/heap/cppgc/liveness-broker.cc",
  5196. "src/heap/cppgc/liveness-broker.h",
  5197. "src/heap/cppgc/logging.cc",
  5198. "src/heap/cppgc/marker.cc",
  5199. "src/heap/cppgc/marker.h",
  5200. "src/heap/cppgc/marking-state.cc",
  5201. "src/heap/cppgc/marking-state.h",
  5202. "src/heap/cppgc/marking-verifier.cc",
  5203. "src/heap/cppgc/marking-verifier.h",
  5204. "src/heap/cppgc/marking-visitor.cc",
  5205. "src/heap/cppgc/marking-visitor.h",
  5206. "src/heap/cppgc/marking-worklists.cc",
  5207. "src/heap/cppgc/marking-worklists.h",
  5208. "src/heap/cppgc/memory.cc",
  5209. "src/heap/cppgc/memory.h",
  5210. "src/heap/cppgc/metric-recorder.h",
  5211. "src/heap/cppgc/name-trait.cc",
  5212. "src/heap/cppgc/object-allocator.cc",
  5213. "src/heap/cppgc/object-allocator.h",
  5214. "src/heap/cppgc/object-poisoner.h",
  5215. "src/heap/cppgc/object-size-trait.cc",
  5216. "src/heap/cppgc/object-start-bitmap.h",
  5217. "src/heap/cppgc/object-view.h",
  5218. "src/heap/cppgc/page-memory.cc",
  5219. "src/heap/cppgc/page-memory.h",
  5220. "src/heap/cppgc/persistent-node.cc",
  5221. "src/heap/cppgc/platform.cc",
  5222. "src/heap/cppgc/platform.h",
  5223. "src/heap/cppgc/pointer-policies.cc",
  5224. "src/heap/cppgc/prefinalizer-handler.cc",
  5225. "src/heap/cppgc/prefinalizer-handler.h",
  5226. "src/heap/cppgc/process-heap-statistics.cc",
  5227. "src/heap/cppgc/process-heap-statistics.h",
  5228. "src/heap/cppgc/process-heap.cc",
  5229. "src/heap/cppgc/process-heap.h",
  5230. "src/heap/cppgc/raw-heap.cc",
  5231. "src/heap/cppgc/raw-heap.h",
  5232. "src/heap/cppgc/remembered-set.cc",
  5233. "src/heap/cppgc/remembered-set.h",
  5234. "src/heap/cppgc/source-location.cc",
  5235. "src/heap/cppgc/stats-collector.cc",
  5236. "src/heap/cppgc/stats-collector.h",
  5237. "src/heap/cppgc/sweeper.cc",
  5238. "src/heap/cppgc/sweeper.h",
  5239. "src/heap/cppgc/task-handle.h",
  5240. "src/heap/cppgc/unmarker.h",
  5241. # TODO(v8:11952): Remove the testing header here once depending on both,
  5242. # //v8:v8 and //v8:v8_for_testing does not result in ODR violations.
  5243. "src/heap/cppgc/testing.cc",
  5244. "src/heap/cppgc/trace-event.h",
  5245. "src/heap/cppgc/trace-trait.cc",
  5246. "src/heap/cppgc/virtual-memory.cc",
  5247. "src/heap/cppgc/virtual-memory.h",
  5248. "src/heap/cppgc/visitor.cc",
  5249. "src/heap/cppgc/visitor.h",
  5250. "src/heap/cppgc/write-barrier.cc",
  5251. "src/heap/cppgc/write-barrier.h",
  5252. ]
  5253. if (cppgc_enable_caged_heap) {
  5254. sources += [
  5255. "src/heap/cppgc/caged-heap-local-data.cc",
  5256. "src/heap/cppgc/caged-heap.cc",
  5257. "src/heap/cppgc/caged-heap.h",
  5258. ]
  5259. }
  5260. configs = [
  5261. ":internal_config",
  5262. ":cppgc_base_config",
  5263. ]
  5264. public_deps = [
  5265. ":cppgc_headers",
  5266. ":v8_heap_base",
  5267. ":v8_libbase",
  5268. ":v8_libplatform",
  5269. ]
  5270. if (cppgc_is_standalone && !v8_use_perfetto) {
  5271. sources += [ "//base/trace_event/common/trace_event_common.h" ]
  5272. } else {
  5273. public_deps += [ ":v8_tracing" ]
  5274. }
  5275. }
  5276. if (v8_check_header_includes) {
  5277. # This file will be generated by tools/generate-header-include-checks.py
  5278. # if the "check_v8_header_includes" gclient variable is set.
  5279. import("check-header-includes/sources.gni")
  5280. v8_source_set("check_headers") {
  5281. configs = [ ":internal_config" ]
  5282. sources = check_header_includes_sources
  5283. # Any rules that contain headers files should be added here either directly
  5284. # or indirectly by including something that has it transitively in its
  5285. # public_deps.
  5286. deps = [
  5287. ":d8",
  5288. ":mksnapshot",
  5289. ":torque_base",
  5290. ":torque_ls_base",
  5291. ":v8_base_without_compiler",
  5292. ":v8_bigint",
  5293. ":v8_headers",
  5294. ":v8_initializers",
  5295. ":v8_internal_headers",
  5296. ":v8_libbase",
  5297. ":v8_maybe_icu",
  5298. ":v8_version",
  5299. ":wee8",
  5300. "src/inspector:inspector",
  5301. "src/inspector:inspector_string_conversions",
  5302. ]
  5303. }
  5304. }
  5305. ###############################################################################
  5306. # Produce a single static library for embedders
  5307. #
  5308. if (v8_monolithic) {
  5309. # A component build is not monolithic.
  5310. assert(!is_component_build)
  5311. # Using external startup data would produce separate files.
  5312. assert(!v8_use_external_startup_data)
  5313. v8_static_library("v8_monolith") {
  5314. deps = [
  5315. ":v8",
  5316. ":v8_libbase",
  5317. ":v8_libplatform",
  5318. "//build/win:default_exe_manifest",
  5319. ]
  5320. configs = [ ":internal_config" ]
  5321. }
  5322. }
  5323. if (v8_enable_webassembly) {
  5324. v8_static_library("wee8") {
  5325. deps = [
  5326. ":v8_base",
  5327. ":v8_libbase",
  5328. ":v8_libplatform",
  5329. ":v8_shared_internal_headers",
  5330. ":v8_snapshot",
  5331. "//build/win:default_exe_manifest",
  5332. ]
  5333. # TODO: v8dll-main.cc equivalent for shared library builds
  5334. configs = [ ":internal_config" ]
  5335. sources = [
  5336. ### gcmole(all) ###
  5337. "src/wasm/c-api.cc",
  5338. "src/wasm/c-api.h",
  5339. "third_party/wasm-api/wasm.h",
  5340. "third_party/wasm-api/wasm.hh",
  5341. ]
  5342. }
  5343. }
  5344. ###############################################################################
  5345. # Executables
  5346. #
  5347. if (current_toolchain == v8_generator_toolchain) {
  5348. v8_executable("bytecode_builtins_list_generator") {
  5349. visibility = [ ":*" ] # Only targets in this file can depend on this.
  5350. include_dirs = [ "." ]
  5351. sources = [
  5352. "src/builtins/generate-bytecodes-builtins-list.cc",
  5353. "src/interpreter/bytecode-operands.cc",
  5354. "src/interpreter/bytecode-operands.h",
  5355. "src/interpreter/bytecode-traits.h",
  5356. "src/interpreter/bytecodes.cc",
  5357. "src/interpreter/bytecodes.h",
  5358. ]
  5359. configs = [ ":internal_config" ]
  5360. deps = [
  5361. ":v8_libbase",
  5362. ":v8_shared_internal_headers",
  5363. "//build/win:default_exe_manifest",
  5364. ]
  5365. }
  5366. }
  5367. if (current_toolchain == v8_snapshot_toolchain) {
  5368. v8_executable("mksnapshot") {
  5369. visibility = [ ":*" ] # Only targets in this file can depend on this.
  5370. sources = [
  5371. "src/snapshot/embedded/embedded-empty.cc",
  5372. "src/snapshot/embedded/embedded-file-writer.cc",
  5373. "src/snapshot/embedded/embedded-file-writer.h",
  5374. "src/snapshot/embedded/platform-embedded-file-writer-aix.cc",
  5375. "src/snapshot/embedded/platform-embedded-file-writer-aix.h",
  5376. "src/snapshot/embedded/platform-embedded-file-writer-base.cc",
  5377. "src/snapshot/embedded/platform-embedded-file-writer-base.h",
  5378. "src/snapshot/embedded/platform-embedded-file-writer-generic.cc",
  5379. "src/snapshot/embedded/platform-embedded-file-writer-generic.h",
  5380. "src/snapshot/embedded/platform-embedded-file-writer-mac.cc",
  5381. "src/snapshot/embedded/platform-embedded-file-writer-mac.h",
  5382. "src/snapshot/embedded/platform-embedded-file-writer-win.cc",
  5383. "src/snapshot/embedded/platform-embedded-file-writer-win.h",
  5384. "src/snapshot/mksnapshot.cc",
  5385. "src/snapshot/snapshot-empty.cc",
  5386. ]
  5387. if (v8_control_flow_integrity) {
  5388. sources += [ "src/deoptimizer/deoptimizer-cfi-empty.cc" ]
  5389. }
  5390. configs = [ ":internal_config" ]
  5391. deps = [
  5392. ":v8_base_without_compiler",
  5393. ":v8_compiler_for_mksnapshot",
  5394. ":v8_init",
  5395. ":v8_libbase",
  5396. ":v8_libplatform",
  5397. ":v8_maybe_icu",
  5398. ":v8_shared_internal_headers",
  5399. ":v8_tracing",
  5400. "//build/win:default_exe_manifest",
  5401. ]
  5402. }
  5403. }
  5404. if (current_toolchain == v8_snapshot_toolchain) {
  5405. v8_executable("torque") {
  5406. visibility = [ ":*" ] # Only targets in this file can depend on this.
  5407. sources = [ "src/torque/torque.cc" ]
  5408. deps = [
  5409. ":torque_base",
  5410. "//build/win:default_exe_manifest",
  5411. ]
  5412. # The use of exceptions for Torque in violation of the Chromium style-guide
  5413. # is justified by the fact that it is only used from the non-essential
  5414. # language server and can be removed anytime if it causes problems.
  5415. configs = [
  5416. ":internal_config",
  5417. "//build/config/compiler:exceptions",
  5418. "//build/config/compiler:rtti",
  5419. ]
  5420. remove_configs = [
  5421. "//build/config/compiler:no_exceptions",
  5422. "//build/config/compiler:no_rtti",
  5423. ]
  5424. if (is_win && is_asan) {
  5425. remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ]
  5426. }
  5427. }
  5428. }
  5429. v8_executable("torque-language-server") {
  5430. visibility = [ ":*" ] # Only targets in this file can depend on this.
  5431. sources = [ "src/torque/ls/torque-language-server.cc" ]
  5432. deps = [
  5433. ":torque_base",
  5434. ":torque_ls_base",
  5435. "//build/win:default_exe_manifest",
  5436. ]
  5437. # The use of exceptions for Torque in violation of the Chromium style-guide
  5438. # is justified by the fact that it is only used from the non-essential
  5439. # language server and can be removed anytime if it causes problems.
  5440. configs = [
  5441. ":internal_config",
  5442. "//build/config/compiler:exceptions",
  5443. "//build/config/compiler:rtti",
  5444. ]
  5445. remove_configs = [
  5446. "//build/config/compiler:no_exceptions",
  5447. "//build/config/compiler:no_rtti",
  5448. ]
  5449. if (is_win && is_asan) {
  5450. remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ]
  5451. }
  5452. }
  5453. if (v8_enable_i18n_support) {
  5454. if (current_toolchain == v8_generator_toolchain) {
  5455. v8_executable("gen-regexp-special-case") {
  5456. visibility = [ ":*" ] # Only targets in this file can depend on this.
  5457. sources = [
  5458. "src/regexp/gen-regexp-special-case.cc",
  5459. "src/regexp/special-case.h",
  5460. ]
  5461. deps = [
  5462. ":v8_libbase",
  5463. ":v8_shared_internal_headers",
  5464. "//build/win:default_exe_manifest",
  5465. "//third_party/icu",
  5466. ]
  5467. configs = [ ":internal_config" ]
  5468. }
  5469. }
  5470. action("run_gen-regexp-special-case") {
  5471. visibility = [ ":*" ] # Only targets in this file can depend on this.
  5472. script = "tools/run.py"
  5473. deps = [ ":gen-regexp-special-case($v8_generator_toolchain)" ]
  5474. output_file = "$target_gen_dir/src/regexp/special-case.cc"
  5475. outputs = [ output_file ]
  5476. args = [
  5477. "./" + rebase_path(
  5478. get_label_info(
  5479. ":gen-regexp-special-case($v8_generator_toolchain)",
  5480. "root_out_dir") + "/gen-regexp-special-case",
  5481. root_build_dir),
  5482. rebase_path(output_file, root_build_dir),
  5483. ]
  5484. }
  5485. }
  5486. ###############################################################################
  5487. # Public targets
  5488. #
  5489. want_v8_shell =
  5490. (current_toolchain == host_toolchain && v8_toolset_for_shell == "host") ||
  5491. (current_toolchain == v8_snapshot_toolchain &&
  5492. v8_toolset_for_shell == "host") ||
  5493. (current_toolchain != host_toolchain && v8_toolset_for_shell == "target")
  5494. group("gn_all") {
  5495. testonly = true
  5496. deps = [
  5497. ":d8",
  5498. ":v8_fuzzers",
  5499. ":v8_hello_world",
  5500. ":v8_sample_process",
  5501. "test:gn_all",
  5502. "tools:gn_all",
  5503. ]
  5504. if (v8_custom_deps != "") {
  5505. # Custom dependency from directory under v8/custom_deps.
  5506. deps += [ v8_custom_deps ]
  5507. }
  5508. if (want_v8_shell) {
  5509. deps += [ ":v8_shell" ]
  5510. }
  5511. if (v8_check_header_includes) {
  5512. deps += [ ":check_headers" ]
  5513. }
  5514. }
  5515. group("v8_python_base") {
  5516. data = [ ".vpython" ]
  5517. }
  5518. group("v8_clusterfuzz") {
  5519. testonly = true
  5520. deps = [
  5521. ":d8",
  5522. ":v8_simple_inspector_fuzzer",
  5523. "tools/clusterfuzz/trials:v8_clusterfuzz_resources",
  5524. ]
  5525. if (v8_multi_arch_build) {
  5526. deps += [
  5527. ":d8(//build/toolchain/linux:clang_x64)",
  5528. ":d8(//build/toolchain/linux:clang_x64_v8_arm64)",
  5529. ":d8(//build/toolchain/linux:clang_x86)",
  5530. ":d8(//build/toolchain/linux:clang_x86_v8_arm)",
  5531. ":d8(tools/clusterfuzz/foozzie/toolchain:clang_x64_pointer_compression)",
  5532. ]
  5533. }
  5534. }
  5535. group("v8_archive") {
  5536. testonly = true
  5537. deps = [ ":d8" ]
  5538. if (!is_win) {
  5539. # On windows, cctest doesn't link with v8_static_library.
  5540. deps += [ "test/cctest:cctest" ]
  5541. }
  5542. }
  5543. # TODO(dglazkov): Remove the "!build_with_chromium" condition once this clause
  5544. # is removed from Chromium.
  5545. if (is_fuchsia && !build_with_chromium) {
  5546. import("//build/config/fuchsia/rules.gni")
  5547. cr_fuchsia_package("d8_fuchsia_pkg") {
  5548. testonly = true
  5549. binary = ":d8"
  5550. manifest = "gni/v8.cmx"
  5551. package_name_override = "d8"
  5552. }
  5553. fuchsia_package_runner("d8_fuchsia") {
  5554. testonly = true
  5555. package = ":d8_fuchsia_pkg"
  5556. package_name_override = "d8"
  5557. }
  5558. }
  5559. group("v8_fuzzers") {
  5560. testonly = true
  5561. data_deps = [
  5562. ":v8_simple_inspector_fuzzer",
  5563. ":v8_simple_json_fuzzer",
  5564. ":v8_simple_parser_fuzzer",
  5565. ":v8_simple_regexp_builtins_fuzzer",
  5566. ":v8_simple_regexp_fuzzer",
  5567. ]
  5568. if (v8_enable_webassembly) {
  5569. data_deps += [
  5570. ":v8_simple_multi_return_fuzzer",
  5571. ":v8_simple_wasm_async_fuzzer",
  5572. ":v8_simple_wasm_code_fuzzer",
  5573. ":v8_simple_wasm_compile_fuzzer",
  5574. ":v8_simple_wasm_fuzzer",
  5575. ]
  5576. }
  5577. }
  5578. if (is_component_build) {
  5579. v8_component("v8") {
  5580. sources = [ "src/utils/v8dll-main.cc" ]
  5581. public_deps = [
  5582. ":v8_base",
  5583. ":v8_snapshot",
  5584. ]
  5585. configs = [ ":internal_config" ]
  5586. public_configs = [ ":external_config" ]
  5587. }
  5588. v8_component("v8_for_testing") {
  5589. testonly = true
  5590. sources = [ "src/utils/v8dll-main.cc" ]
  5591. public_deps = [
  5592. ":torque_base",
  5593. ":torque_ls_base",
  5594. ":v8_base",
  5595. ":v8_headers",
  5596. ":v8_initializers",
  5597. ":v8_snapshot",
  5598. ]
  5599. configs = [ ":internal_config" ]
  5600. public_configs = [ ":external_config" ]
  5601. }
  5602. v8_component("cppgc") {
  5603. public_deps = [ ":cppgc_base" ]
  5604. if (!cppgc_is_standalone) {
  5605. deps = [ ":v8" ]
  5606. }
  5607. configs = []
  5608. public_configs = [ ":external_config" ]
  5609. }
  5610. if (cppgc_is_standalone) {
  5611. v8_component("cppgc_for_testing") {
  5612. testonly = true
  5613. public_deps = [ ":cppgc_base" ]
  5614. configs = []
  5615. public_configs = [ ":external_config" ]
  5616. }
  5617. }
  5618. v8_component("v8_heap_base_for_testing") {
  5619. testonly = true
  5620. public_deps = [ ":v8_heap_base" ]
  5621. configs = []
  5622. public_configs = [ ":external_config" ]
  5623. }
  5624. } else {
  5625. group("v8") {
  5626. public_deps = [
  5627. ":v8_base",
  5628. ":v8_snapshot",
  5629. ]
  5630. public_configs = [ ":external_config" ]
  5631. }
  5632. group("v8_for_testing") {
  5633. testonly = true
  5634. public_deps = [
  5635. ":torque_base",
  5636. ":torque_ls_base",
  5637. ":v8_base",
  5638. ":v8_initializers",
  5639. ":v8_snapshot",
  5640. ]
  5641. public_configs = [ ":external_config" ]
  5642. }
  5643. group("cppgc") {
  5644. public_deps = [ ":cppgc_base" ]
  5645. if (!cppgc_is_standalone) {
  5646. deps = [ ":v8" ]
  5647. }
  5648. public_configs = [ ":external_config" ]
  5649. }
  5650. if (cppgc_is_standalone) {
  5651. group("cppgc_for_testing") {
  5652. testonly = true
  5653. public_deps = [ ":cppgc_base" ]
  5654. public_configs = [ ":external_config" ]
  5655. }
  5656. }
  5657. group("v8_heap_base_for_testing") {
  5658. testonly = true
  5659. public_deps = [ ":v8_heap_base" ]
  5660. public_configs = [ ":external_config" ]
  5661. }
  5662. }
  5663. v8_executable("d8") {
  5664. sources = [
  5665. "src/d8/async-hooks-wrapper.cc",
  5666. "src/d8/async-hooks-wrapper.h",
  5667. "src/d8/d8-console.cc",
  5668. "src/d8/d8-console.h",
  5669. "src/d8/d8-js.cc",
  5670. "src/d8/d8-platforms.cc",
  5671. "src/d8/d8-platforms.h",
  5672. "src/d8/d8-test.cc",
  5673. "src/d8/d8.cc",
  5674. "src/d8/d8.h",
  5675. ]
  5676. if (v8_fuzzilli) {
  5677. sources += [
  5678. "src/d8/cov.cc",
  5679. "src/d8/cov.h",
  5680. ]
  5681. }
  5682. configs = [
  5683. # Note: don't use :internal_config here because this target will get
  5684. # the :external_config applied to it by virtue of depending on :v8, and
  5685. # you can't have both applied to the same target.
  5686. ":internal_config_base",
  5687. ":v8_tracing_config",
  5688. ]
  5689. deps = [
  5690. ":v8",
  5691. ":v8_libbase",
  5692. ":v8_libplatform",
  5693. ":v8_tracing",
  5694. "//build/win:default_exe_manifest",
  5695. ]
  5696. if (is_posix || is_fuchsia) {
  5697. sources += [ "src/d8/d8-posix.cc" ]
  5698. } else if (is_win) {
  5699. sources += [ "src/d8/d8-windows.cc" ]
  5700. }
  5701. if (v8_correctness_fuzzer) {
  5702. deps += [ "tools/clusterfuzz/foozzie:v8_correctness_fuzzer_resources" ]
  5703. }
  5704. defines = []
  5705. if (v8_enable_vtunejit) {
  5706. deps += [ "src/third_party/vtune:v8_vtune" ]
  5707. }
  5708. }
  5709. v8_executable("v8_hello_world") {
  5710. sources = [ "samples/hello-world.cc" ]
  5711. configs = [
  5712. # Note: don't use :internal_config here because this target will get
  5713. # the :external_config applied to it by virtue of depending on :v8, and
  5714. # you can't have both applied to the same target.
  5715. ":internal_config_base",
  5716. ]
  5717. deps = [
  5718. ":v8",
  5719. ":v8_libbase",
  5720. ":v8_libplatform",
  5721. "//build/win:default_exe_manifest",
  5722. ]
  5723. }
  5724. v8_executable("v8_sample_process") {
  5725. sources = [ "samples/process.cc" ]
  5726. configs = [
  5727. # Note: don't use :internal_config here because this target will get
  5728. # the :external_config applied to it by virtue of depending on :v8, and
  5729. # you can't have both applied to the same target.
  5730. ":internal_config_base",
  5731. ]
  5732. deps = [
  5733. ":v8",
  5734. ":v8_libbase",
  5735. ":v8_libplatform",
  5736. "//build/win:default_exe_manifest",
  5737. ]
  5738. }
  5739. if (want_v8_shell) {
  5740. v8_executable("v8_shell") {
  5741. sources = [ "samples/shell.cc" ]
  5742. configs = [
  5743. # Note: don't use :internal_config here because this target will get
  5744. # the :external_config applied to it by virtue of depending on :v8, and
  5745. # you can't have both applied to the same target.
  5746. ":internal_config_base",
  5747. ]
  5748. deps = [
  5749. ":v8",
  5750. ":v8_libbase",
  5751. ":v8_libplatform",
  5752. "//build/win:default_exe_manifest",
  5753. ]
  5754. }
  5755. }
  5756. v8_executable("cppgc_hello_world") {
  5757. sources = [ "samples/cppgc/hello-world.cc" ]
  5758. if (v8_current_cpu == "riscv64") {
  5759. libs = [ "atomic" ]
  5760. }
  5761. configs = [
  5762. # Note: don't use :internal_config here because this target will get
  5763. # the :external_config applied to it by virtue of depending on :cppgc, and
  5764. # you can't have both applied to the same target.
  5765. ":internal_config_base",
  5766. ":cppgc_base_config",
  5767. ]
  5768. deps = [ ":cppgc" ]
  5769. if (!cppgc_is_standalone) {
  5770. deps += [
  5771. ":v8",
  5772. "//build/win:default_exe_manifest",
  5773. ]
  5774. }
  5775. }
  5776. template("v8_fuzzer") {
  5777. name = target_name
  5778. forward_variables_from(invoker, "*")
  5779. v8_executable("v8_simple_" + name) {
  5780. deps = [
  5781. ":" + name,
  5782. "//build/win:default_exe_manifest",
  5783. ]
  5784. sources = [ "test/fuzzer/fuzzer.cc" ]
  5785. configs = [ ":external_config" ]
  5786. }
  5787. }
  5788. v8_source_set("json_fuzzer") {
  5789. sources = [ "test/fuzzer/json.cc" ]
  5790. deps = [ ":fuzzer_support" ]
  5791. configs = [
  5792. ":external_config",
  5793. ":internal_config_base",
  5794. ]
  5795. }
  5796. v8_fuzzer("json_fuzzer") {
  5797. }
  5798. v8_source_set("parser_fuzzer") {
  5799. sources = [ "test/fuzzer/parser.cc" ]
  5800. deps = [ ":fuzzer_support" ]
  5801. configs = [
  5802. ":external_config",
  5803. ":internal_config_base",
  5804. ]
  5805. }
  5806. v8_fuzzer("parser_fuzzer") {
  5807. }
  5808. v8_source_set("regexp_builtins_fuzzer") {
  5809. sources = [
  5810. "test/fuzzer/regexp-builtins.cc",
  5811. "test/fuzzer/regexp_builtins/mjsunit.js.h",
  5812. ]
  5813. deps = [ ":fuzzer_support" ]
  5814. configs = [
  5815. ":external_config",
  5816. ":internal_config_base",
  5817. ]
  5818. }
  5819. v8_fuzzer("regexp_builtins_fuzzer") {
  5820. }
  5821. v8_source_set("regexp_fuzzer") {
  5822. sources = [ "test/fuzzer/regexp.cc" ]
  5823. deps = [ ":fuzzer_support" ]
  5824. configs = [
  5825. ":external_config",
  5826. ":internal_config_base",
  5827. ]
  5828. }
  5829. v8_fuzzer("regexp_fuzzer") {
  5830. }
  5831. if (v8_enable_webassembly) {
  5832. v8_source_set("multi_return_fuzzer") {
  5833. sources = [ "test/fuzzer/multi-return.cc" ]
  5834. deps = [ ":fuzzer_support" ]
  5835. configs = [
  5836. ":external_config",
  5837. ":internal_config_base",
  5838. ]
  5839. }
  5840. v8_fuzzer("multi_return_fuzzer") {
  5841. }
  5842. v8_source_set("wasm_test_common") {
  5843. sources = [
  5844. "test/common/flag-utils.h",
  5845. "test/common/wasm/flag-utils.h",
  5846. "test/common/wasm/wasm-interpreter.cc",
  5847. "test/common/wasm/wasm-interpreter.h",
  5848. "test/common/wasm/wasm-module-runner.cc",
  5849. "test/common/wasm/wasm-module-runner.h",
  5850. ]
  5851. deps = [
  5852. ":generate_bytecode_builtins_list",
  5853. ":run_torque",
  5854. ":v8_internal_headers",
  5855. ":v8_libbase",
  5856. ":v8_shared_internal_headers",
  5857. ":v8_tracing",
  5858. ]
  5859. public_deps = [ ":v8_maybe_icu" ]
  5860. configs = [
  5861. ":external_config",
  5862. ":internal_config_base",
  5863. ]
  5864. }
  5865. v8_source_set("wasm_fuzzer") {
  5866. sources = [ "test/fuzzer/wasm.cc" ]
  5867. deps = [
  5868. ":fuzzer_support",
  5869. ":lib_wasm_fuzzer_common",
  5870. ":wasm_test_common",
  5871. ]
  5872. configs = [
  5873. ":external_config",
  5874. ":internal_config_base",
  5875. ]
  5876. }
  5877. v8_fuzzer("wasm_fuzzer") {
  5878. }
  5879. v8_source_set("wasm_async_fuzzer") {
  5880. sources = [ "test/fuzzer/wasm-async.cc" ]
  5881. deps = [
  5882. ":fuzzer_support",
  5883. ":lib_wasm_fuzzer_common",
  5884. ":wasm_test_common",
  5885. ]
  5886. configs = [
  5887. ":external_config",
  5888. ":internal_config_base",
  5889. ]
  5890. }
  5891. v8_fuzzer("wasm_async_fuzzer") {
  5892. }
  5893. v8_source_set("wasm_code_fuzzer") {
  5894. sources = [
  5895. "test/common/wasm/test-signatures.h",
  5896. "test/fuzzer/wasm-code.cc",
  5897. ]
  5898. deps = [
  5899. ":fuzzer_support",
  5900. ":lib_wasm_fuzzer_common",
  5901. ":wasm_test_common",
  5902. ]
  5903. configs = [
  5904. ":external_config",
  5905. ":internal_config_base",
  5906. ]
  5907. }
  5908. v8_fuzzer("wasm_code_fuzzer") {
  5909. }
  5910. v8_source_set("lib_wasm_fuzzer_common") {
  5911. sources = [
  5912. "test/fuzzer/wasm-fuzzer-common.cc",
  5913. "test/fuzzer/wasm-fuzzer-common.h",
  5914. ]
  5915. deps = [
  5916. ":fuzzer_support",
  5917. ":generate_bytecode_builtins_list",
  5918. ":run_torque",
  5919. ":v8_internal_headers",
  5920. ":v8_tracing",
  5921. ":wasm_test_common",
  5922. ]
  5923. public_deps = [ ":v8_maybe_icu" ]
  5924. configs = [
  5925. ":external_config",
  5926. ":internal_config_base",
  5927. ]
  5928. }
  5929. v8_source_set("wasm_compile_fuzzer") {
  5930. sources = [
  5931. "test/common/wasm/test-signatures.h",
  5932. "test/fuzzer/wasm-compile.cc",
  5933. ]
  5934. deps = [
  5935. ":fuzzer_support",
  5936. ":lib_wasm_fuzzer_common",
  5937. ":wasm_test_common",
  5938. ]
  5939. configs = [
  5940. ":external_config",
  5941. ":internal_config_base",
  5942. ]
  5943. }
  5944. v8_fuzzer("wasm_compile_fuzzer") {
  5945. }
  5946. }
  5947. v8_source_set("inspector_fuzzer") {
  5948. sources = [ "test/fuzzer/inspector-fuzzer.cc" ]
  5949. deps = [
  5950. ":fuzzer_support",
  5951. "test/inspector:inspector_test",
  5952. ]
  5953. configs = [
  5954. ":external_config",
  5955. ":internal_config_base",
  5956. ]
  5957. }
  5958. v8_fuzzer("inspector_fuzzer") {
  5959. }
  5960. # Target to build all generated .cc files.
  5961. group("v8_generated_cc_files") {
  5962. testonly = true
  5963. deps = [
  5964. ":generate_bytecode_builtins_list",
  5965. ":run_torque",
  5966. "src/inspector:v8_generated_cc_files",
  5967. ]
  5968. }
  5969. # Protobuf targets, used only when building outside of chromium.
  5970. if (!build_with_chromium && v8_use_perfetto) {
  5971. # This config is applied to the autogenerated .pb.{cc,h} files in
  5972. # proto_library.gni. This config is propagated up to the source sets
  5973. # that depend on generated proto headers.
  5974. config("protobuf_gen_config") {
  5975. defines = [
  5976. "GOOGLE_PROTOBUF_NO_RTTI",
  5977. "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
  5978. ]
  5979. cflags = [
  5980. "-Wno-unknown-warning-option",
  5981. "-Wno-deprecated",
  5982. "-Wno-undef",
  5983. "-Wno-zero-as-null-pointer-constant",
  5984. "-Wno-thread-safety-attributes",
  5985. ]
  5986. include_dirs = [ "third_party/protobuf/src" ]
  5987. }
  5988. # Configuration used to build libprotobuf_* and the protoc compiler.
  5989. config("protobuf_config") {
  5990. # Apply the lighter supressions and macro definitions from above.
  5991. configs = [ ":protobuf_gen_config" ]
  5992. if (!is_win) {
  5993. defines = [ "HAVE_PTHREAD=1" ]
  5994. }
  5995. if (is_clang) {
  5996. cflags = [
  5997. "-Wno-unused-private-field",
  5998. "-Wno-unused-function",
  5999. "-Wno-inconsistent-missing-override",
  6000. "-Wno-unknown-warning-option",
  6001. "-Wno-enum-compare-switch",
  6002. "-Wno-user-defined-warnings",
  6003. "-Wno-tautological-constant-compare",
  6004. ]
  6005. }
  6006. if (is_win && is_clang) {
  6007. cflags += [ "-Wno-microsoft-unqualified-friend" ]
  6008. }
  6009. }
  6010. source_set("protobuf_lite") {
  6011. sources = [
  6012. "third_party/protobuf/src/google/protobuf/any_lite.cc",
  6013. "third_party/protobuf/src/google/protobuf/arena.cc",
  6014. "third_party/protobuf/src/google/protobuf/arena.h",
  6015. "third_party/protobuf/src/google/protobuf/arena_impl.h",
  6016. "third_party/protobuf/src/google/protobuf/arenastring.h",
  6017. "third_party/protobuf/src/google/protobuf/extension_set.cc",
  6018. "third_party/protobuf/src/google/protobuf/extension_set.h",
  6019. "third_party/protobuf/src/google/protobuf/generated_enum_util.cc",
  6020. "third_party/protobuf/src/google/protobuf/generated_enum_util.h",
  6021. "third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.cc",
  6022. "third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.h",
  6023. "third_party/protobuf/src/google/protobuf/generated_message_util.cc",
  6024. "third_party/protobuf/src/google/protobuf/generated_message_util.h",
  6025. "third_party/protobuf/src/google/protobuf/has_bits.h",
  6026. "third_party/protobuf/src/google/protobuf/implicit_weak_message.cc",
  6027. "third_party/protobuf/src/google/protobuf/implicit_weak_message.h",
  6028. "third_party/protobuf/src/google/protobuf/inlined_string_field.h",
  6029. "third_party/protobuf/src/google/protobuf/io/coded_stream.cc",
  6030. "third_party/protobuf/src/google/protobuf/io/coded_stream.h",
  6031. "third_party/protobuf/src/google/protobuf/io/coded_stream_inl.h",
  6032. "third_party/protobuf/src/google/protobuf/io/io_win32.cc",
  6033. "third_party/protobuf/src/google/protobuf/io/io_win32.h",
  6034. "third_party/protobuf/src/google/protobuf/io/strtod.cc",
  6035. "third_party/protobuf/src/google/protobuf/io/strtod.h",
  6036. "third_party/protobuf/src/google/protobuf/io/zero_copy_stream.cc",
  6037. "third_party/protobuf/src/google/protobuf/io/zero_copy_stream.h",
  6038. "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc",
  6039. "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h",
  6040. "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc",
  6041. "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h",
  6042. "third_party/protobuf/src/google/protobuf/map.h",
  6043. "third_party/protobuf/src/google/protobuf/map_entry_lite.h",
  6044. "third_party/protobuf/src/google/protobuf/map_field_lite.h",
  6045. "third_party/protobuf/src/google/protobuf/map_type_handler.h",
  6046. "third_party/protobuf/src/google/protobuf/message_lite.cc",
  6047. "third_party/protobuf/src/google/protobuf/message_lite.h",
  6048. "third_party/protobuf/src/google/protobuf/repeated_field.cc",
  6049. "third_party/protobuf/src/google/protobuf/repeated_field.h",
  6050. "third_party/protobuf/src/google/protobuf/stubs/bytestream.cc",
  6051. "third_party/protobuf/src/google/protobuf/stubs/bytestream.h",
  6052. "third_party/protobuf/src/google/protobuf/stubs/callback.h",
  6053. "third_party/protobuf/src/google/protobuf/stubs/casts.h",
  6054. "third_party/protobuf/src/google/protobuf/stubs/common.cc",
  6055. "third_party/protobuf/src/google/protobuf/stubs/common.h",
  6056. "third_party/protobuf/src/google/protobuf/stubs/fastmem.h",
  6057. "third_party/protobuf/src/google/protobuf/stubs/hash.h",
  6058. "third_party/protobuf/src/google/protobuf/stubs/int128.cc",
  6059. "third_party/protobuf/src/google/protobuf/stubs/int128.h",
  6060. "third_party/protobuf/src/google/protobuf/stubs/logging.h",
  6061. "third_party/protobuf/src/google/protobuf/stubs/macros.h",
  6062. "third_party/protobuf/src/google/protobuf/stubs/map_util.h",
  6063. "third_party/protobuf/src/google/protobuf/stubs/mutex.h",
  6064. "third_party/protobuf/src/google/protobuf/stubs/once.h",
  6065. "third_party/protobuf/src/google/protobuf/stubs/platform_macros.h",
  6066. "third_party/protobuf/src/google/protobuf/stubs/port.h",
  6067. "third_party/protobuf/src/google/protobuf/stubs/status.cc",
  6068. "third_party/protobuf/src/google/protobuf/stubs/status.h",
  6069. "third_party/protobuf/src/google/protobuf/stubs/status_macros.h",
  6070. "third_party/protobuf/src/google/protobuf/stubs/statusor.cc",
  6071. "third_party/protobuf/src/google/protobuf/stubs/statusor.h",
  6072. "third_party/protobuf/src/google/protobuf/stubs/stl_util.h",
  6073. "third_party/protobuf/src/google/protobuf/stubs/stringpiece.cc",
  6074. "third_party/protobuf/src/google/protobuf/stubs/stringpiece.h",
  6075. "third_party/protobuf/src/google/protobuf/stubs/stringprintf.cc",
  6076. "third_party/protobuf/src/google/protobuf/stubs/stringprintf.h",
  6077. "third_party/protobuf/src/google/protobuf/stubs/structurally_valid.cc",
  6078. "third_party/protobuf/src/google/protobuf/stubs/strutil.cc",
  6079. "third_party/protobuf/src/google/protobuf/stubs/strutil.h",
  6080. "third_party/protobuf/src/google/protobuf/stubs/template_util.h",
  6081. "third_party/protobuf/src/google/protobuf/stubs/time.cc",
  6082. "third_party/protobuf/src/google/protobuf/stubs/time.h",
  6083. "third_party/protobuf/src/google/protobuf/wire_format_lite.cc",
  6084. "third_party/protobuf/src/google/protobuf/wire_format_lite.h",
  6085. ]
  6086. configs -= [ "//build/config/compiler:chromium_code" ]
  6087. configs += [
  6088. "//build/config/compiler:no_chromium_code",
  6089. ":protobuf_config",
  6090. ]
  6091. if (is_win) {
  6092. configs -= [ "//build/config/win:lean_and_mean" ]
  6093. }
  6094. public_configs = [ ":protobuf_gen_config" ]
  6095. }
  6096. # This target should be used only by the protoc compiler and by test targets.
  6097. source_set("protobuf_full") {
  6098. deps = [ ":protobuf_lite" ]
  6099. sources = [
  6100. "third_party/protobuf/src/google/protobuf/any.cc",
  6101. "third_party/protobuf/src/google/protobuf/any.h",
  6102. "third_party/protobuf/src/google/protobuf/any.pb.cc",
  6103. "third_party/protobuf/src/google/protobuf/any.pb.h",
  6104. "third_party/protobuf/src/google/protobuf/api.pb.cc",
  6105. "third_party/protobuf/src/google/protobuf/api.pb.h",
  6106. "third_party/protobuf/src/google/protobuf/compiler/importer.cc",
  6107. "third_party/protobuf/src/google/protobuf/compiler/importer.h",
  6108. "third_party/protobuf/src/google/protobuf/compiler/parser.cc",
  6109. "third_party/protobuf/src/google/protobuf/compiler/parser.h",
  6110. "third_party/protobuf/src/google/protobuf/descriptor.cc",
  6111. "third_party/protobuf/src/google/protobuf/descriptor.h",
  6112. "third_party/protobuf/src/google/protobuf/descriptor.pb.cc",
  6113. "third_party/protobuf/src/google/protobuf/descriptor.pb.h",
  6114. "third_party/protobuf/src/google/protobuf/descriptor_database.cc",
  6115. "third_party/protobuf/src/google/protobuf/descriptor_database.h",
  6116. "third_party/protobuf/src/google/protobuf/duration.pb.cc",
  6117. "third_party/protobuf/src/google/protobuf/duration.pb.h",
  6118. "third_party/protobuf/src/google/protobuf/dynamic_message.cc",
  6119. "third_party/protobuf/src/google/protobuf/dynamic_message.h",
  6120. "third_party/protobuf/src/google/protobuf/empty.pb.cc",
  6121. "third_party/protobuf/src/google/protobuf/empty.pb.h",
  6122. "third_party/protobuf/src/google/protobuf/extension_set_heavy.cc",
  6123. "third_party/protobuf/src/google/protobuf/field_mask.pb.cc",
  6124. "third_party/protobuf/src/google/protobuf/field_mask.pb.h",
  6125. "third_party/protobuf/src/google/protobuf/generated_enum_reflection.h",
  6126. "third_party/protobuf/src/google/protobuf/generated_message_reflection.cc",
  6127. "third_party/protobuf/src/google/protobuf/generated_message_reflection.h",
  6128. "third_party/protobuf/src/google/protobuf/io/gzip_stream.cc",
  6129. "third_party/protobuf/src/google/protobuf/io/gzip_stream.h",
  6130. "third_party/protobuf/src/google/protobuf/io/printer.cc",
  6131. "third_party/protobuf/src/google/protobuf/io/printer.h",
  6132. "third_party/protobuf/src/google/protobuf/io/tokenizer.cc",
  6133. "third_party/protobuf/src/google/protobuf/io/tokenizer.h",
  6134. "third_party/protobuf/src/google/protobuf/map_entry.h",
  6135. "third_party/protobuf/src/google/protobuf/map_field.cc",
  6136. "third_party/protobuf/src/google/protobuf/map_field.h",
  6137. "third_party/protobuf/src/google/protobuf/map_field_inl.h",
  6138. "third_party/protobuf/src/google/protobuf/message.cc",
  6139. "third_party/protobuf/src/google/protobuf/message.h",
  6140. "third_party/protobuf/src/google/protobuf/metadata.h",
  6141. "third_party/protobuf/src/google/protobuf/reflection.h",
  6142. "third_party/protobuf/src/google/protobuf/reflection_internal.h",
  6143. "third_party/protobuf/src/google/protobuf/reflection_ops.cc",
  6144. "third_party/protobuf/src/google/protobuf/reflection_ops.h",
  6145. "third_party/protobuf/src/google/protobuf/service.cc",
  6146. "third_party/protobuf/src/google/protobuf/service.h",
  6147. "third_party/protobuf/src/google/protobuf/source_context.pb.cc",
  6148. "third_party/protobuf/src/google/protobuf/source_context.pb.h",
  6149. "third_party/protobuf/src/google/protobuf/struct.pb.cc",
  6150. "third_party/protobuf/src/google/protobuf/struct.pb.h",
  6151. "third_party/protobuf/src/google/protobuf/stubs/mathlimits.cc",
  6152. "third_party/protobuf/src/google/protobuf/stubs/mathlimits.h",
  6153. "third_party/protobuf/src/google/protobuf/stubs/mathutil.h",
  6154. "third_party/protobuf/src/google/protobuf/stubs/substitute.cc",
  6155. "third_party/protobuf/src/google/protobuf/stubs/substitute.h",
  6156. "third_party/protobuf/src/google/protobuf/text_format.cc",
  6157. "third_party/protobuf/src/google/protobuf/text_format.h",
  6158. "third_party/protobuf/src/google/protobuf/timestamp.pb.cc",
  6159. "third_party/protobuf/src/google/protobuf/timestamp.pb.h",
  6160. "third_party/protobuf/src/google/protobuf/type.pb.cc",
  6161. "third_party/protobuf/src/google/protobuf/type.pb.h",
  6162. "third_party/protobuf/src/google/protobuf/unknown_field_set.cc",
  6163. "third_party/protobuf/src/google/protobuf/unknown_field_set.h",
  6164. "third_party/protobuf/src/google/protobuf/util/field_comparator.cc",
  6165. "third_party/protobuf/src/google/protobuf/util/field_comparator.h",
  6166. "third_party/protobuf/src/google/protobuf/util/field_mask_util.cc",
  6167. "third_party/protobuf/src/google/protobuf/util/field_mask_util.h",
  6168. "third_party/protobuf/src/google/protobuf/util/internal/constants.h",
  6169. "third_party/protobuf/src/google/protobuf/util/internal/datapiece.cc",
  6170. "third_party/protobuf/src/google/protobuf/util/internal/datapiece.h",
  6171. "third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc",
  6172. "third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.h",
  6173. "third_party/protobuf/src/google/protobuf/util/internal/error_listener.cc",
  6174. "third_party/protobuf/src/google/protobuf/util/internal/error_listener.h",
  6175. "third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.cc",
  6176. "third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.h",
  6177. "third_party/protobuf/src/google/protobuf/util/internal/json_escaping.cc",
  6178. "third_party/protobuf/src/google/protobuf/util/internal/json_escaping.h",
  6179. "third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.cc",
  6180. "third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.h",
  6181. "third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc",
  6182. "third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.h",
  6183. "third_party/protobuf/src/google/protobuf/util/internal/location_tracker.h",
  6184. "third_party/protobuf/src/google/protobuf/util/internal/object_location_tracker.h",
  6185. "third_party/protobuf/src/google/protobuf/util/internal/object_source.h",
  6186. "third_party/protobuf/src/google/protobuf/util/internal/object_writer.cc",
  6187. "third_party/protobuf/src/google/protobuf/util/internal/object_writer.h",
  6188. "third_party/protobuf/src/google/protobuf/util/internal/proto_writer.cc",
  6189. "third_party/protobuf/src/google/protobuf/util/internal/proto_writer.h",
  6190. "third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc",
  6191. "third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.h",
  6192. "third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc",
  6193. "third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.h",
  6194. "third_party/protobuf/src/google/protobuf/util/internal/structured_objectwriter.h",
  6195. "third_party/protobuf/src/google/protobuf/util/internal/type_info.cc",
  6196. "third_party/protobuf/src/google/protobuf/util/internal/type_info.h",
  6197. "third_party/protobuf/src/google/protobuf/util/internal/type_info_test_helper.cc",
  6198. "third_party/protobuf/src/google/protobuf/util/internal/type_info_test_helper.h",
  6199. "third_party/protobuf/src/google/protobuf/util/internal/utility.cc",
  6200. "third_party/protobuf/src/google/protobuf/util/internal/utility.h",
  6201. "third_party/protobuf/src/google/protobuf/util/json_util.cc",
  6202. "third_party/protobuf/src/google/protobuf/util/json_util.h",
  6203. "third_party/protobuf/src/google/protobuf/util/message_differencer.cc",
  6204. "third_party/protobuf/src/google/protobuf/util/message_differencer.h",
  6205. "third_party/protobuf/src/google/protobuf/util/time_util.cc",
  6206. "third_party/protobuf/src/google/protobuf/util/time_util.h",
  6207. "third_party/protobuf/src/google/protobuf/util/type_resolver.h",
  6208. "third_party/protobuf/src/google/protobuf/util/type_resolver_util.cc",
  6209. "third_party/protobuf/src/google/protobuf/util/type_resolver_util.h",
  6210. "third_party/protobuf/src/google/protobuf/wire_format.cc",
  6211. "third_party/protobuf/src/google/protobuf/wire_format.h",
  6212. "third_party/protobuf/src/google/protobuf/wrappers.pb.cc",
  6213. "third_party/protobuf/src/google/protobuf/wrappers.pb.h",
  6214. ]
  6215. configs -= [ "//build/config/compiler:chromium_code" ]
  6216. configs += [
  6217. "//build/config/compiler:no_chromium_code",
  6218. ":protobuf_config",
  6219. ]
  6220. if (is_win) {
  6221. configs -= [ "//build/config/win:lean_and_mean" ]
  6222. }
  6223. public_configs = [ ":protobuf_gen_config" ]
  6224. }
  6225. if (current_toolchain == host_toolchain) {
  6226. source_set("protoc_lib") {
  6227. deps = [ ":protobuf_full" ]
  6228. sources = [
  6229. "third_party/protobuf/src/google/protobuf/compiler/code_generator.cc",
  6230. "third_party/protobuf/src/google/protobuf/compiler/code_generator.h",
  6231. "third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc",
  6232. "third_party/protobuf/src/google/protobuf/compiler/command_line_interface.h",
  6233. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc",
  6234. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h",
  6235. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc",
  6236. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h",
  6237. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc",
  6238. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.h",
  6239. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc",
  6240. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h",
  6241. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc",
  6242. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h",
  6243. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc",
  6244. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h",
  6245. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc",
  6246. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h",
  6247. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc",
  6248. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.h",
  6249. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc",
  6250. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h",
  6251. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc",
  6252. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h",
  6253. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_layout_helper.h",
  6254. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h",
  6255. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc",
  6256. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.h",
  6257. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc",
  6258. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h",
  6259. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc",
  6260. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_service.h",
  6261. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc",
  6262. "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h",
  6263. "third_party/protobuf/src/google/protobuf/compiler/plugin.cc",
  6264. "third_party/protobuf/src/google/protobuf/compiler/plugin.h",
  6265. "third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc",
  6266. "third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h",
  6267. "third_party/protobuf/src/google/protobuf/compiler/subprocess.cc",
  6268. "third_party/protobuf/src/google/protobuf/compiler/subprocess.h",
  6269. "third_party/protobuf/src/google/protobuf/compiler/zip_writer.cc",
  6270. "third_party/protobuf/src/google/protobuf/compiler/zip_writer.h",
  6271. ]
  6272. configs -= [ "//build/config/compiler:chromium_code" ]
  6273. configs += [
  6274. "//build/config/compiler:no_chromium_code",
  6275. ":protobuf_config",
  6276. ]
  6277. if (is_win) {
  6278. configs -= [ "//build/config/win:lean_and_mean" ]
  6279. }
  6280. public_configs = [ ":protobuf_gen_config" ]
  6281. }
  6282. executable("protoc") {
  6283. deps = [
  6284. ":protoc_lib",
  6285. "//build/win:default_exe_manifest",
  6286. ]
  6287. sources = [ "src/protobuf/protobuf-compiler-main.cc" ]
  6288. configs -= [ "//build/config/compiler:chromium_code" ]
  6289. configs += [ "//build/config/compiler:no_chromium_code" ]
  6290. }
  6291. } # host_toolchain
  6292. v8_component("v8_libperfetto") {
  6293. configs = [ ":v8_tracing_config" ]
  6294. public_configs = [ "//third_party/perfetto/gn:public_config" ]
  6295. deps = [
  6296. "//third_party/perfetto/src/trace_processor:storage_minimal",
  6297. "//third_party/perfetto/src/tracing/core",
  6298. # TODO(skyostil): Support non-POSIX platforms.
  6299. "//third_party/perfetto/protos/perfetto/config:cpp",
  6300. "//third_party/perfetto/protos/perfetto/trace/track_event:zero",
  6301. "//third_party/perfetto/src/tracing:in_process_backend",
  6302. "//third_party/perfetto/src/tracing:platform_impl",
  6303. ]
  6304. public_deps = [
  6305. "//third_party/perfetto/include/perfetto/trace_processor",
  6306. "//third_party/perfetto/src/trace_processor:export_json",
  6307. "//third_party/perfetto/src/tracing:client_api",
  6308. ]
  6309. }
  6310. } # if (!build_with_chromium && v8_use_perfetto)