CMakeLists.txt 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. set(JavaScriptCore_INCLUDE_DIRECTORIES
  2. "${CMAKE_BINARY_DIR}"
  3. "${JAVASCRIPTCORE_DIR}"
  4. "${JAVASCRIPTCORE_DIR}/API"
  5. "${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
  6. "${JAVASCRIPTCORE_DIR}/assembler"
  7. "${JAVASCRIPTCORE_DIR}/bytecode"
  8. "${JAVASCRIPTCORE_DIR}/bytecompiler"
  9. "${JAVASCRIPTCORE_DIR}/dfg"
  10. "${JAVASCRIPTCORE_DIR}/disassembler"
  11. "${JAVASCRIPTCORE_DIR}/heap"
  12. "${JAVASCRIPTCORE_DIR}/debugger"
  13. "${JAVASCRIPTCORE_DIR}/interpreter"
  14. "${JAVASCRIPTCORE_DIR}/jit"
  15. "${JAVASCRIPTCORE_DIR}/llint"
  16. "${JAVASCRIPTCORE_DIR}/parser"
  17. "${JAVASCRIPTCORE_DIR}/profiler"
  18. "${JAVASCRIPTCORE_DIR}/runtime"
  19. "${JAVASCRIPTCORE_DIR}/tools"
  20. "${JAVASCRIPTCORE_DIR}/yarr"
  21. "${WTF_DIR}"
  22. "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
  23. "${CMAKE_SOURCE_DIR}/Source"
  24. )
  25. set(JavaScriptCore_SOURCES
  26. API/JSBase.cpp
  27. API/JSCallbackConstructor.cpp
  28. API/JSCallbackFunction.cpp
  29. API/JSCallbackObject.cpp
  30. API/JSClassRef.cpp
  31. API/JSContextRef.cpp
  32. API/JSObjectRef.cpp
  33. API/JSProfilerPrivate.cpp
  34. API/JSScriptRef.cpp
  35. API/JSStringRef.cpp
  36. API/JSValueRef.cpp
  37. API/JSWeakObjectMapRefPrivate.cpp
  38. API/OpaqueJSString.cpp
  39. assembler/MacroAssembler.cpp
  40. assembler/LinkBuffer.cpp
  41. bytecode/ArrayAllocationProfile.cpp
  42. bytecode/ArrayProfile.cpp
  43. bytecode/CallLinkInfo.cpp
  44. bytecode/CallLinkStatus.cpp
  45. bytecode/CodeBlock.cpp
  46. bytecode/CodeBlockHash.cpp
  47. bytecode/CodeOrigin.cpp
  48. bytecode/CodeType.cpp
  49. bytecode/DFGExitProfile.cpp
  50. bytecode/ExecutionCounter.cpp
  51. bytecode/ExitKind.cpp
  52. bytecode/GetByIdStatus.cpp
  53. bytecode/JumpTable.cpp
  54. bytecode/LazyOperandValueProfile.cpp
  55. bytecode/MethodOfGettingAValueProfile.cpp
  56. bytecode/Opcode.cpp
  57. bytecode/PolymorphicPutByIdList.cpp
  58. bytecode/PreciseJumpTargets.cpp
  59. bytecode/PutByIdStatus.cpp
  60. bytecode/SpeculatedType.cpp
  61. bytecode/ReduceWhitespace.cpp
  62. bytecode/ResolveGlobalStatus.cpp
  63. bytecode/SamplingTool.cpp
  64. bytecode/SpecialPointer.cpp
  65. bytecode/StructureStubClearingWatchpoint.cpp
  66. bytecode/StructureStubInfo.cpp
  67. bytecode/UnlinkedCodeBlock.cpp
  68. bytecode/Watchpoint.cpp
  69. bytecompiler/BytecodeGenerator.cpp
  70. bytecompiler/NodesCodegen.cpp
  71. dfg/DFGAbstractState.cpp
  72. dfg/DFGArgumentsSimplificationPhase.cpp
  73. dfg/DFGArrayMode.cpp
  74. dfg/DFGAssemblyHelpers.cpp
  75. dfg/DFGBackwardsPropagationPhase.cpp
  76. dfg/DFGByteCodeParser.cpp
  77. dfg/DFGCapabilities.cpp
  78. dfg/DFGCommon.cpp
  79. dfg/DFGCFAPhase.cpp
  80. dfg/DFGCFGSimplificationPhase.cpp
  81. dfg/DFGCPSRethreadingPhase.cpp
  82. dfg/DFGConstantFoldingPhase.cpp
  83. dfg/DFGCSEPhase.cpp
  84. dfg/DFGDCEPhase.cpp
  85. dfg/DFGDisassembler.cpp
  86. dfg/DFGDominators.cpp
  87. dfg/DFGDriver.cpp
  88. dfg/DFGEdge.cpp
  89. dfg/DFGFixupPhase.cpp
  90. dfg/DFGGraph.cpp
  91. dfg/DFGJITCompiler.cpp
  92. dfg/DFGLongLivedState.cpp
  93. dfg/DFGMinifiedNode.cpp
  94. dfg/DFGNode.cpp
  95. dfg/DFGNodeFlags.cpp
  96. dfg/DFGOSREntry.cpp
  97. dfg/DFGOSRExit.cpp
  98. dfg/DFGOSRExitCompiler.cpp
  99. dfg/DFGOSRExitCompiler32_64.cpp
  100. dfg/DFGOSRExitCompiler64.cpp
  101. dfg/DFGOSRExitJumpPlaceholder.cpp
  102. dfg/DFGOperations.cpp
  103. dfg/DFGPhase.cpp
  104. dfg/DFGPredictionPropagationPhase.cpp
  105. dfg/DFGPredictionInjectionPhase.cpp
  106. dfg/DFGRepatch.cpp
  107. dfg/DFGSpeculativeJIT.cpp
  108. dfg/DFGSpeculativeJIT32_64.cpp
  109. dfg/DFGSpeculativeJIT64.cpp
  110. dfg/DFGTypeCheckHoistingPhase.cpp
  111. dfg/DFGThunks.cpp
  112. dfg/DFGUnificationPhase.cpp
  113. dfg/DFGUseKind.cpp
  114. dfg/DFGValueSource.cpp
  115. dfg/DFGVariableAccessDataDump.cpp
  116. dfg/DFGVariableEvent.cpp
  117. dfg/DFGVariableEventStream.cpp
  118. dfg/DFGValidate.cpp
  119. dfg/DFGVirtualRegisterAllocationPhase.cpp
  120. disassembler/Disassembler.cpp
  121. heap/BlockAllocator.cpp
  122. heap/CopiedSpace.cpp
  123. heap/CopyVisitor.cpp
  124. heap/ConservativeRoots.cpp
  125. heap/DFGCodeBlocks.cpp
  126. heap/GCThread.cpp
  127. heap/GCThreadSharedData.cpp
  128. heap/HandleSet.cpp
  129. heap/HandleStack.cpp
  130. heap/Heap.cpp
  131. heap/HeapStatistics.cpp
  132. heap/HeapTimer.cpp
  133. heap/IncrementalSweeper.cpp
  134. heap/JITStubRoutineSet.cpp
  135. heap/MachineStackMarker.cpp
  136. heap/MarkedAllocator.cpp
  137. heap/MarkedBlock.cpp
  138. heap/MarkedSpace.cpp
  139. heap/MarkStack.cpp
  140. heap/SlotVisitor.cpp
  141. heap/SuperRegion.cpp
  142. heap/Weak.cpp
  143. heap/WeakBlock.cpp
  144. heap/WeakHandleOwner.cpp
  145. heap/WeakSet.cpp
  146. debugger/Debugger.cpp
  147. debugger/DebuggerActivation.cpp
  148. debugger/DebuggerCallFrame.cpp
  149. interpreter/AbstractPC.cpp
  150. interpreter/CallFrame.cpp
  151. interpreter/Interpreter.cpp
  152. interpreter/JSStack.cpp
  153. interpreter/VMInspector.cpp
  154. jit/ClosureCallStubRoutine.cpp
  155. jit/ExecutableAllocator.cpp
  156. jit/ExecutableAllocatorFixedVMPool.cpp
  157. jit/HostCallReturnValue.cpp
  158. jit/GCAwareJITStubRoutine.cpp
  159. jit/JITArithmetic32_64.cpp
  160. jit/JITArithmetic.cpp
  161. jit/JITCall32_64.cpp
  162. jit/JITCall.cpp
  163. jit/JITCode.cpp
  164. jit/JIT.cpp
  165. jit/JITDisassembler.cpp
  166. jit/JITExceptions.cpp
  167. jit/JITOpcodes32_64.cpp
  168. jit/JITOpcodes.cpp
  169. jit/JITPropertyAccess32_64.cpp
  170. jit/JITPropertyAccess.cpp
  171. jit/JITStubRoutine.cpp
  172. jit/JITStubs.cpp
  173. jit/JITThunks.cpp
  174. jit/JumpReplacementWatchpoint.cpp
  175. jit/ThunkGenerators.cpp
  176. parser/Lexer.cpp
  177. parser/Nodes.cpp
  178. parser/Parser.cpp
  179. parser/ParserArena.cpp
  180. parser/SourceProvider.cpp
  181. parser/SourceProviderCache.cpp
  182. profiler/ProfilerBytecode.cpp
  183. profiler/ProfilerBytecodeSequence.cpp
  184. profiler/ProfilerBytecodes.cpp
  185. profiler/ProfilerCompilation.cpp
  186. profiler/ProfilerCompilationKind.cpp
  187. profiler/ProfilerCompiledBytecode.cpp
  188. profiler/ProfilerDatabase.cpp
  189. profiler/ProfilerOrigin.cpp
  190. profiler/ProfilerOriginStack.cpp
  191. profiler/ProfilerOSRExit.cpp
  192. profiler/ProfilerOSRExitSite.cpp
  193. profiler/ProfilerProfiledBytecodes.cpp
  194. profiler/Profile.cpp
  195. profiler/ProfileGenerator.cpp
  196. profiler/ProfileNode.cpp
  197. profiler/LegacyProfiler.cpp
  198. runtime/ArgList.cpp
  199. runtime/Arguments.cpp
  200. runtime/ArrayConstructor.cpp
  201. runtime/ArrayPrototype.cpp
  202. runtime/BooleanConstructor.cpp
  203. runtime/BooleanObject.cpp
  204. runtime/BooleanPrototype.cpp
  205. runtime/CallData.cpp
  206. runtime/CodeCache.cpp
  207. runtime/CodeSpecializationKind.cpp
  208. runtime/CommonIdentifiers.cpp
  209. runtime/Completion.cpp
  210. runtime/ConstructData.cpp
  211. runtime/DateConstructor.cpp
  212. runtime/DateConversion.cpp
  213. runtime/DateInstance.cpp
  214. runtime/DatePrototype.cpp
  215. runtime/Error.cpp
  216. runtime/ErrorConstructor.cpp
  217. runtime/ErrorInstance.cpp
  218. runtime/ErrorPrototype.cpp
  219. runtime/ExceptionHelpers.cpp
  220. runtime/Executable.cpp
  221. runtime/FunctionConstructor.cpp
  222. runtime/FunctionExecutableDump.cpp
  223. runtime/FunctionPrototype.cpp
  224. runtime/GCActivityCallback.cpp
  225. runtime/GetterSetter.cpp
  226. runtime/Identifier.cpp
  227. runtime/IndexingType.cpp
  228. runtime/InitializeThreading.cpp
  229. runtime/InternalFunction.cpp
  230. runtime/JSActivation.cpp
  231. runtime/JSAPIValueWrapper.cpp
  232. runtime/JSArray.cpp
  233. runtime/JSCell.cpp
  234. runtime/JSDateMath.cpp
  235. runtime/JSFunction.cpp
  236. runtime/JSBoundFunction.cpp
  237. runtime/VM.cpp
  238. runtime/JSGlobalObject.cpp
  239. runtime/JSGlobalObjectFunctions.cpp
  240. runtime/JSProxy.cpp
  241. runtime/JSLock.cpp
  242. runtime/JSNotAnObject.cpp
  243. runtime/JSObject.cpp
  244. runtime/JSONObject.cpp
  245. runtime/JSPropertyNameIterator.cpp
  246. runtime/JSSegmentedVariableObject.cpp
  247. runtime/JSNameScope.cpp
  248. runtime/JSWithScope.cpp
  249. runtime/JSScope.cpp
  250. runtime/JSString.cpp
  251. runtime/JSStringJoiner.cpp
  252. runtime/JSSymbolTableObject.cpp
  253. runtime/JSCJSValue.cpp
  254. runtime/JSVariableObject.cpp
  255. runtime/JSWrapperObject.cpp
  256. runtime/LiteralParser.cpp
  257. runtime/Lookup.cpp
  258. runtime/MathObject.cpp
  259. runtime/MemoryStatistics.cpp
  260. runtime/NameConstructor.cpp
  261. runtime/NameInstance.cpp
  262. runtime/NamePrototype.cpp
  263. runtime/NativeErrorConstructor.cpp
  264. runtime/NativeErrorPrototype.cpp
  265. runtime/NumberConstructor.cpp
  266. runtime/NumberObject.cpp
  267. runtime/NumberPrototype.cpp
  268. runtime/ObjectConstructor.cpp
  269. runtime/ObjectPrototype.cpp
  270. runtime/Operations.cpp
  271. runtime/Options.cpp
  272. runtime/PropertyDescriptor.cpp
  273. runtime/PropertyNameArray.cpp
  274. runtime/PropertySlot.cpp
  275. runtime/PropertyTable.cpp
  276. runtime/PrototypeMap.cpp
  277. runtime/RegExp.cpp
  278. runtime/RegExpCache.cpp
  279. runtime/RegExpConstructor.cpp
  280. runtime/RegExpCachedResult.cpp
  281. runtime/RegExpMatchesArray.cpp
  282. runtime/RegExpObject.cpp
  283. runtime/RegExpPrototype.cpp
  284. runtime/SmallStrings.cpp
  285. runtime/SparseArrayValueMap.cpp
  286. runtime/StrictEvalActivation.cpp
  287. runtime/StringConstructor.cpp
  288. runtime/StringObject.cpp
  289. runtime/StringPrototype.cpp
  290. runtime/StringRecursionChecker.cpp
  291. runtime/Structure.cpp
  292. runtime/StructureRareData.cpp
  293. runtime/StructureChain.cpp
  294. runtime/SymbolTable.cpp
  295. runtime/Watchdog.cpp
  296. runtime/WatchdogNone.cpp
  297. tools/CodeProfile.cpp
  298. tools/CodeProfiling.cpp
  299. yarr/YarrCanonicalizeUCS2.cpp
  300. yarr/YarrPattern.cpp
  301. yarr/YarrInterpreter.cpp
  302. yarr/YarrJIT.cpp
  303. yarr/YarrSyntaxChecker.cpp
  304. )
  305. set(JavaScriptCore_LUT_FILES
  306. runtime/ArrayConstructor.cpp
  307. runtime/ArrayPrototype.cpp
  308. runtime/BooleanPrototype.cpp
  309. runtime/DateConstructor.cpp
  310. runtime/DatePrototype.cpp
  311. runtime/ErrorPrototype.cpp
  312. runtime/JSGlobalObject.cpp
  313. runtime/JSONObject.cpp
  314. runtime/MathObject.cpp
  315. runtime/NamePrototype.cpp
  316. runtime/NumberConstructor.cpp
  317. runtime/NumberPrototype.cpp
  318. runtime/ObjectConstructor.cpp
  319. runtime/RegExpConstructor.cpp
  320. runtime/RegExpObject.cpp
  321. runtime/RegExpPrototype.cpp
  322. runtime/StringConstructor.cpp
  323. )
  324. set(JavaScriptCore_LIBRARIES
  325. WTF
  326. )
  327. if (WTF_USE_ICU_UNICODE)
  328. list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
  329. ${ICU_INCLUDE_DIRS}
  330. )
  331. list(APPEND JavaScriptCore_LIBRARIES
  332. ${ICU_I18N_LIBRARIES}
  333. )
  334. endif ()
  335. if (ENABLE_LLINT)
  336. # We cannot check for RUBY_FOUND because it is set only when the full package is installed and
  337. # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
  338. # for finding the only Ruby interpreter.
  339. if (NOT RUBY_EXECUTABLE)
  340. message(FATAL_ERROR "The Ruby interpreter is needed to generate LLInt files.")
  341. endif ()
  342. set(LLINT_ASM
  343. llint/LowLevelInterpreter.asm
  344. llint/LowLevelInterpreter32_64.asm
  345. llint/LowLevelInterpreter64.asm
  346. )
  347. set(OFFLINE_ASM
  348. offlineasm/arm.rb
  349. offlineasm/ast.rb
  350. offlineasm/backends.rb
  351. offlineasm/cloop.rb
  352. offlineasm/config.rb
  353. offlineasm/instructions.rb
  354. offlineasm/offsets.rb
  355. offlineasm/opt.rb
  356. offlineasm/parser.rb
  357. offlineasm/registers.rb
  358. offlineasm/risc.rb
  359. offlineasm/self_hash.rb
  360. offlineasm/settings.rb
  361. offlineasm/transform.rb
  362. offlineasm/x86.rb
  363. )
  364. add_custom_command(
  365. OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
  366. MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb
  367. DEPENDS ${LLINT_ASM} ${OFFLINE_ASM}
  368. COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
  369. VERBATIM)
  370. # We add the header file directly to the ADD_EXECUTABLE call instead of setting the
  371. # OBJECT_DEPENDS property in LLIntOffsetsExtractor.cpp because generate_offset_extractor.rb may
  372. # not regenerate it in case the hash it calculates does not change.
  373. # In this case, if some of the dependencies specified in the ADD_CUSTOM_COMMAND above have
  374. # changed the command will always be called because the mtime of LLIntDesiredOffsets.h will
  375. # always be older than that of its dependencies.
  376. # Additionally, setting the OBJECT_DEPENDS property will make LLIntDesiredOffsets.h a Makefile
  377. # dependency of both LLIntOffsetsExtractor and LLIntOffsetsExtractor.cpp, so the command will
  378. # actually be run twice!
  379. add_executable(LLIntOffsetsExtractor
  380. ${JAVASCRIPTCORE_DIR}/llint/LLIntOffsetsExtractor.cpp
  381. ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
  382. )
  383. target_link_libraries(LLIntOffsetsExtractor WTF)
  384. # The build system will execute asm.rb every time LLIntOffsetsExtractor's mtime is newer than
  385. # LLIntAssembly.h's mtime. The problem we have here is: asm.rb has some built-in optimization
  386. # that generates a checksum of the LLIntOffsetsExtractor binary, if the checksum of the new
  387. # LLIntOffsetsExtractor matches, no output is generated. To make this target consistent and avoid
  388. # running this command for every build, we artificially update LLIntAssembly.h's mtime (using touch)
  389. # after every asm.rb run.
  390. add_custom_command(
  391. OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
  392. MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb
  393. DEPENDS LLIntOffsetsExtractor ${LLINT_ASM} ${OFFLINE_ASM}
  394. COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm $<TARGET_FILE:LLIntOffsetsExtractor> ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
  395. COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
  396. VERBATIM)
  397. # The explanation for not making LLIntAssembly.h part of the OBJECT_DEPENDS property of some of
  398. # the .cpp files below is similar to the one in the previous comment. However, since these .cpp
  399. # files are used to build JavaScriptCore itself, we can just add LLIntAssembly.h to JSC_HEADERS
  400. # since it is used in the add_library() call at the end of this file.
  401. list(APPEND JavaScriptCore_HEADERS
  402. ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
  403. )
  404. list(APPEND JavaScriptCore_SOURCES
  405. llint/LLIntCLoop.cpp
  406. llint/LLIntData.cpp
  407. llint/LLIntEntrypoints.cpp
  408. llint/LLIntExceptions.cpp
  409. llint/LLIntSlowPaths.cpp
  410. llint/LLIntThunks.cpp
  411. llint/LowLevelInterpreter.cpp
  412. )
  413. endif ()
  414. set(HASH_LUT_GENERATOR ${CMAKE_CURRENT_SOURCE_DIR}/create_hash_table)
  415. macro(GENERATE_HASH_LUT _input _output)
  416. add_custom_command(
  417. OUTPUT ${_output}
  418. DEPENDS ${HASH_LUT_GENERATOR} ${_input}
  419. COMMAND ${PERL_EXECUTABLE} ${HASH_LUT_GENERATOR} ${_input} -i > ${_output}
  420. VERBATIM)
  421. list(APPEND JavaScriptCore_HEADERS ${_output})
  422. endmacro()
  423. # GENERATOR 1-A: LUT creator
  424. foreach (_file ${JavaScriptCore_LUT_FILES})
  425. get_filename_component(_name ${_file} NAME_WE)
  426. GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
  427. endforeach ()
  428. set(JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES
  429. assembler
  430. bytecode
  431. collector/handles
  432. debugger
  433. heap
  434. interpreter
  435. jit
  436. llint
  437. parser
  438. profiler
  439. runtime
  440. yarr
  441. )
  442. set(JavaScriptCore_FORWARDING_HEADERS_FILES
  443. API/APICast.h
  444. API/APIShims.h
  445. API/JavaScript.h
  446. API/JSBase.h
  447. API/JSContextRef.h
  448. API/JSContextRefPrivate.h
  449. API/JSObjectRef.h
  450. API/JSObjectRefPrivate.h
  451. API/JSScriptRefPrivate.h
  452. API/JSStringRef.h
  453. API/JSStringRefCF.h
  454. API/JSStringRefBSTR.h
  455. API/JSValueRef.h
  456. API/JavaScriptCore.h
  457. API/JSRetainPtr.h
  458. API/JSWeakObjectMapRefInternal.h
  459. API/JSWeakObjectMapRefPrivate.h
  460. API/JSRetainPtr.h
  461. API/OpaqueJSString.h
  462. API/WebKitAvailability.h
  463. )
  464. # GENERATOR 1-B: particular LUT creator (for 1 file only)
  465. GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h)
  466. #GENERATOR: "RegExpJitTables.h": tables used by Yarr
  467. add_custom_command(
  468. OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
  469. MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/create_regex_tables
  470. COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/create_regex_tables > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
  471. VERBATIM)
  472. ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/yarr/YarrPattern.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h)
  473. #GENERATOR: "KeywordLookup.h": keyword decision tree used by the lexer
  474. add_custom_command(
  475. OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
  476. MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/KeywordLookupGenerator.py
  477. COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/KeywordLookupGenerator.py ${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
  478. VERBATIM)
  479. ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/parser/Lexer.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h)
  480. if (WTF_CPU_ARM)
  481. list(APPEND JavaScriptCore_SOURCES
  482. assembler/ARMAssembler.cpp
  483. assembler/ARMv7Assembler.cpp
  484. assembler/MacroAssemblerARM.cpp
  485. )
  486. elseif (WTF_CPU_MIPS)
  487. elseif (WTF_CPU_X86)
  488. elseif (WTF_CPU_X86_64)
  489. else ()
  490. message(FATAL_ERROR "Unknown CPU")
  491. endif ()
  492. WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
  493. WEBKIT_CREATE_FORWARDING_HEADERS(JavaScriptCore DIRECTORIES ${JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES} FILES ${JavaScriptCore_FORWARDING_HEADERS_FILES})
  494. add_subdirectory(shell)
  495. WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
  496. include_directories(${JavaScriptCore_INCLUDE_DIRECTORIES})
  497. add_definitions(-DBUILDING_JavaScriptCore)
  498. add_library(JavaScriptCore ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
  499. target_link_libraries(JavaScriptCore ${JavaScriptCore_LIBRARIES})
  500. set_target_properties(JavaScriptCore PROPERTIES FOLDER "JavaScriptCore")
  501. set_target_properties(JavaScriptCore PROPERTIES LINK_INTERFACE_LIBRARIES "")
  502. if (JavaScriptCore_OUTPUT_NAME)
  503. set_target_properties(JavaScriptCore PROPERTIES OUTPUT_NAME ${JavaScriptCore_OUTPUT_NAME})
  504. endif ()
  505. if (SHARED_CORE)
  506. set_target_properties(JavaScriptCore PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
  507. install(TARGETS JavaScriptCore DESTINATION "${LIB_INSTALL_DIR}")
  508. endif ()