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