REGRESSION(r165704): [GTK] Inspector resources not correctly generated
[WebKit-https.git] / Source / JavaScriptCore / CMakeLists.txt
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}/bindings"
8     "${JAVASCRIPTCORE_DIR}/builtins"
9     "${JAVASCRIPTCORE_DIR}/bytecode"
10     "${JAVASCRIPTCORE_DIR}/bytecompiler"
11     "${JAVASCRIPTCORE_DIR}/dfg"
12     "${JAVASCRIPTCORE_DIR}/disassembler"
13     "${JAVASCRIPTCORE_DIR}/ftl"
14     "${JAVASCRIPTCORE_DIR}/heap"
15     "${JAVASCRIPTCORE_DIR}/debugger"
16     "${JAVASCRIPTCORE_DIR}/inspector"
17     "${JAVASCRIPTCORE_DIR}/inspector/agents"
18     "${JAVASCRIPTCORE_DIR}/interpreter"
19     "${JAVASCRIPTCORE_DIR}/jit"
20     "${JAVASCRIPTCORE_DIR}/llint"
21     "${JAVASCRIPTCORE_DIR}/llvm"
22     "${JAVASCRIPTCORE_DIR}/parser"
23     "${JAVASCRIPTCORE_DIR}/profiler"
24     "${JAVASCRIPTCORE_DIR}/runtime"
25     "${JAVASCRIPTCORE_DIR}/tools"
26     "${JAVASCRIPTCORE_DIR}/yarr"
27     "${WTF_DIR}"
28     "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
29     "${CMAKE_SOURCE_DIR}/Source"
30     ${ICU_INCLUDE_DIRS}
31 )
32
33 set(JavaScriptCore_SOURCES
34     API/JSBase.cpp
35     API/JSCTestRunnerUtils.cpp
36     API/JSCallbackConstructor.cpp
37     API/JSCallbackFunction.cpp
38     API/JSCallbackObject.cpp
39     API/JSClassRef.cpp
40     API/JSContextRef.cpp
41     API/JSObjectRef.cpp
42     API/JSProfilerPrivate.cpp
43     API/JSScriptRef.cpp
44     API/JSStringRef.cpp
45     API/JSValueRef.cpp
46     API/JSWeakObjectMapRefPrivate.cpp
47     API/OpaqueJSString.cpp
48
49     assembler/LinkBuffer.cpp
50     assembler/MacroAssembler.cpp
51     assembler/MacroAssemblerX86Common.cpp
52
53     bindings/ScriptFunctionCall.cpp
54     bindings/ScriptObject.cpp
55     bindings/ScriptValue.cpp
56
57     builtins/BuiltinExecutables.cpp
58
59     bytecode/ArrayAllocationProfile.cpp
60     bytecode/ArrayProfile.cpp
61     bytecode/BytecodeBasicBlock.cpp
62     bytecode/BytecodeLivenessAnalysis.cpp
63     bytecode/CallLinkInfo.cpp
64     bytecode/CallLinkStatus.cpp
65     bytecode/CodeBlock.cpp
66     bytecode/CodeBlockHash.cpp
67     bytecode/CodeBlockJettisoningWatchpoint.cpp
68     bytecode/CodeOrigin.cpp
69     bytecode/CodeType.cpp
70     bytecode/DFGExitProfile.cpp
71     bytecode/DeferredCompilationCallback.cpp
72     bytecode/ExecutionCounter.cpp
73     bytecode/ExitKind.cpp
74     bytecode/ExitingJITType.cpp
75     bytecode/GetByIdStatus.cpp
76     bytecode/GetByIdVariant.cpp
77     bytecode/InlineCallFrameSet.cpp
78     bytecode/JumpTable.cpp
79     bytecode/LazyOperandValueProfile.cpp
80     bytecode/MethodOfGettingAValueProfile.cpp
81     bytecode/Opcode.cpp
82     bytecode/PolymorphicGetByIdList.cpp
83     bytecode/PolymorphicPutByIdList.cpp
84     bytecode/PreciseJumpTargets.cpp
85     bytecode/ProfiledCodeBlockJettisoningWatchpoint.cpp
86     bytecode/PutByIdStatus.cpp
87     bytecode/PutByIdVariant.cpp
88     bytecode/ReduceWhitespace.cpp
89     bytecode/SamplingTool.cpp
90     bytecode/SpecialPointer.cpp
91     bytecode/SpeculatedType.cpp
92     bytecode/StructureStubClearingWatchpoint.cpp
93     bytecode/StructureStubInfo.cpp
94     bytecode/UnlinkedCodeBlock.cpp
95     bytecode/UnlinkedInstructionStream.cpp
96     bytecode/ValueRecovery.cpp
97     bytecode/Watchpoint.cpp
98
99     bytecompiler/BytecodeGenerator.cpp
100     bytecompiler/NodesCodegen.cpp
101
102     debugger/Debugger.cpp
103     debugger/DebuggerActivation.cpp
104     debugger/DebuggerCallFrame.cpp
105
106     dfg/DFGAbstractHeap.cpp
107     dfg/DFGAbstractValue.cpp
108     dfg/DFGArgumentsSimplificationPhase.cpp
109     dfg/DFGArithMode.cpp
110     dfg/DFGArrayMode.cpp
111     dfg/DFGAtTailAbstractState.cpp
112     dfg/DFGAvailability.cpp
113     dfg/DFGBackwardsPropagationPhase.cpp
114     dfg/DFGBasicBlock.cpp
115     dfg/DFGBinarySwitch.cpp
116     dfg/DFGBlockInsertionSet.cpp
117     dfg/DFGByteCodeParser.cpp
118     dfg/DFGCFAPhase.cpp
119     dfg/DFGCFGSimplificationPhase.cpp
120     dfg/DFGCPSRethreadingPhase.cpp
121     dfg/DFGCSEPhase.cpp
122     dfg/DFGCapabilities.cpp
123     dfg/DFGClobberSet.cpp
124     dfg/DFGClobberize.cpp
125     dfg/DFGCommon.cpp
126     dfg/DFGCommonData.cpp
127     dfg/DFGCompilationKey.cpp
128     dfg/DFGCompilationMode.cpp
129     dfg/DFGConstantFoldingPhase.cpp
130     dfg/DFGCriticalEdgeBreakingPhase.cpp
131     dfg/DFGDCEPhase.cpp
132     dfg/DFGDesiredIdentifiers.cpp
133     dfg/DFGDesiredStructureChains.cpp
134     dfg/DFGDesiredTransitions.cpp
135     dfg/DFGDesiredWatchpoints.cpp
136     dfg/DFGDesiredWeakReferences.cpp
137     dfg/DFGDesiredWriteBarriers.cpp
138     dfg/DFGDisassembler.cpp
139     dfg/DFGDominators.cpp
140     dfg/DFGDriver.cpp
141     dfg/DFGEdge.cpp
142     dfg/DFGFailedFinalizer.cpp
143     dfg/DFGFinalizer.cpp
144     dfg/DFGFixupPhase.cpp
145     dfg/DFGFlushFormat.cpp
146     dfg/DFGFlushedAt.cpp
147     dfg/DFGGraph.cpp
148     dfg/DFGGraphSafepoint.cpp
149     dfg/DFGInPlaceAbstractState.cpp
150     dfg/DFGIntegerCheckCombiningPhase.cpp
151     dfg/DFGInvalidationPointInjectionPhase.cpp
152     dfg/DFGJITCode.cpp
153     dfg/DFGJITCompiler.cpp
154     dfg/DFGJITFinalizer.cpp
155     dfg/DFGJumpReplacement.cpp
156     dfg/DFGLICMPhase.cpp
157     dfg/DFGLazyJSValue.cpp
158     dfg/DFGLivenessAnalysisPhase.cpp
159     dfg/DFGLongLivedState.cpp
160     dfg/DFGLoopPreHeaderCreationPhase.cpp
161     dfg/DFGMinifiedNode.cpp
162     dfg/DFGNaturalLoops.cpp
163     dfg/DFGNode.cpp
164     dfg/DFGNodeFlags.cpp
165     dfg/DFGOSRAvailabilityAnalysisPhase.cpp
166     dfg/DFGOSREntry.cpp
167     dfg/DFGOSREntrypointCreationPhase.cpp
168     dfg/DFGOSRExit.cpp
169     dfg/DFGOSRExitBase.cpp
170     dfg/DFGOSRExitCompiler.cpp
171     dfg/DFGOSRExitCompiler32_64.cpp
172     dfg/DFGOSRExitCompiler64.cpp
173     dfg/DFGOSRExitCompilerCommon.cpp
174     dfg/DFGOSRExitJumpPlaceholder.cpp
175     dfg/DFGOSRExitPreparation.cpp
176     dfg/DFGOperations.cpp
177     dfg/DFGPhase.cpp
178     dfg/DFGPlan.cpp
179     dfg/DFGPredictionInjectionPhase.cpp
180     dfg/DFGPredictionPropagationPhase.cpp
181     dfg/DFGResurrectionForValidationPhase.cpp
182     dfg/DFGSSAConversionPhase.cpp
183     dfg/DFGSSALoweringPhase.cpp
184     dfg/DFGSafepoint.cpp
185     dfg/DFGSpeculativeJIT.cpp
186     dfg/DFGSpeculativeJIT32_64.cpp
187     dfg/DFGSpeculativeJIT64.cpp
188     dfg/DFGStackLayoutPhase.cpp
189     dfg/DFGStaticExecutionCountEstimationPhase.cpp
190     dfg/DFGStoreBarrierElisionPhase.cpp
191     dfg/DFGStrengthReductionPhase.cpp
192     dfg/DFGThreadData.cpp
193     dfg/DFGThunks.cpp
194     dfg/DFGTierUpCheckInjectionPhase.cpp
195     dfg/DFGTypeCheckHoistingPhase.cpp
196     dfg/DFGUnificationPhase.cpp
197     dfg/DFGUseKind.cpp
198     dfg/DFGValidate.cpp
199     dfg/DFGValueSource.cpp
200     dfg/DFGVariableAccessDataDump.cpp
201     dfg/DFGVariableEvent.cpp
202     dfg/DFGVariableEventStream.cpp
203     dfg/DFGVirtualRegisterAllocationPhase.cpp
204     dfg/DFGWatchpointCollectionPhase.cpp
205     dfg/DFGWorklist.cpp
206
207     disassembler/ARMv7Disassembler.cpp
208     disassembler/Disassembler.cpp
209     disassembler/LLVMDisassembler.cpp
210     disassembler/UDis86Disassembler.cpp
211     disassembler/X86Disassembler.cpp
212
213     heap/BlockAllocator.cpp
214     heap/CodeBlockSet.cpp
215     heap/ConservativeRoots.cpp
216     heap/CopiedSpace.cpp
217     heap/CopyVisitor.cpp
218     heap/DeferGC.cpp
219     heap/EdenGCActivityCallback.cpp
220     heap/FullGCActivityCallback.cpp
221     heap/GCActivityCallback.cpp
222     heap/GCThread.cpp
223     heap/GCThreadSharedData.cpp
224     heap/HandleSet.cpp
225     heap/HandleStack.cpp
226     heap/Heap.cpp
227     heap/HeapStatistics.cpp
228     heap/HeapTimer.cpp
229     heap/IncrementalSweeper.cpp
230     heap/JITStubRoutineSet.cpp
231     heap/MachineStackMarker.cpp
232     heap/MarkStack.cpp
233     heap/MarkedAllocator.cpp
234     heap/MarkedBlock.cpp
235     heap/MarkedSpace.cpp
236     heap/SlotVisitor.cpp
237     heap/SuperRegion.cpp
238     heap/Weak.cpp
239     heap/WeakBlock.cpp
240     heap/WeakHandleOwner.cpp
241     heap/WeakSet.cpp
242     heap/WriteBarrierBuffer.cpp
243     heap/WriteBarrierSupport.cpp
244
245     inspector/ConsoleMessage.cpp
246     inspector/ContentSearchUtilities.cpp
247     inspector/IdentifiersFactory.cpp
248     inspector/InjectedScript.cpp
249     inspector/InjectedScriptBase.cpp
250     inspector/InjectedScriptHost.cpp
251     inspector/InjectedScriptManager.cpp
252     inspector/InjectedScriptModule.cpp
253     inspector/InspectorAgentRegistry.cpp
254     inspector/InspectorBackendDispatcher.cpp
255     inspector/InspectorValues.cpp
256     inspector/JSInjectedScriptHost.cpp
257     inspector/JSInjectedScriptHostPrototype.cpp
258     inspector/JSJavaScriptCallFrame.cpp
259     inspector/JSJavaScriptCallFramePrototype.cpp
260     inspector/JavaScriptCallFrame.cpp
261     inspector/ScriptArguments.cpp
262     inspector/ScriptCallFrame.cpp
263     inspector/ScriptCallStack.cpp
264     inspector/ScriptCallStackFactory.cpp
265     inspector/ScriptDebugServer.cpp
266     inspector/agents/InspectorAgent.cpp
267     inspector/agents/InspectorConsoleAgent.cpp
268     inspector/agents/InspectorDebuggerAgent.cpp
269     inspector/agents/InspectorRuntimeAgent.cpp
270
271     interpreter/AbstractPC.cpp
272     interpreter/CallFrame.cpp
273     interpreter/Interpreter.cpp
274     interpreter/JSStack.cpp
275     interpreter/ProtoCallFrame.cpp
276     interpreter/StackVisitor.cpp
277     interpreter/VMInspector.cpp
278
279     jit/AccessorCallJITStubRoutine.cpp
280     jit/AssemblyHelpers.cpp
281     jit/ArityCheckFailReturnThunks.cpp
282     jit/ClosureCallStubRoutine.cpp
283     jit/ExecutableAllocator.cpp
284     jit/ExecutableAllocatorFixedVMPool.cpp
285     jit/GCAwareJITStubRoutine.cpp
286     jit/HostCallReturnValue.cpp
287     jit/JIT.cpp
288     jit/JITArithmetic.cpp
289     jit/JITArithmetic32_64.cpp
290     jit/JITCall.cpp
291     jit/JITCall32_64.cpp
292     jit/JITCode.cpp
293     jit/JITDisassembler.cpp
294     jit/JITExceptions.cpp
295     jit/JITInlineCacheGenerator.cpp
296     jit/JITOpcodes.cpp
297     jit/JITOpcodes32_64.cpp
298     jit/JITOperations.cpp
299     jit/JITPropertyAccess.cpp
300     jit/JITPropertyAccess32_64.cpp
301     jit/JITStubRoutine.cpp
302     jit/JITStubs.cpp
303     jit/JITThunks.cpp
304     jit/JITToDFGDeferredCompilationCallback.cpp
305     jit/Reg.cpp
306     jit/RegisterPreservationWrapperGenerator.cpp
307     jit/RegisterSet.cpp
308     jit/Repatch.cpp
309     jit/ScratchRegisterAllocator.cpp
310     jit/TempRegisterSet.cpp
311     jit/ThunkGenerators.cpp
312
313     parser/Lexer.cpp
314     parser/Nodes.cpp
315     parser/Parser.cpp
316     parser/ParserArena.cpp
317     parser/SourceCode.cpp
318     parser/SourceProvider.cpp
319     parser/SourceProviderCache.cpp
320
321     profiler/LegacyProfiler.cpp
322     profiler/Profile.cpp
323     profiler/ProfileGenerator.cpp
324     profiler/ProfileNode.cpp
325     profiler/ProfilerBytecode.cpp
326     profiler/ProfilerBytecodeSequence.cpp
327     profiler/ProfilerBytecodes.cpp
328     profiler/ProfilerCompilation.cpp
329     profiler/ProfilerCompilationKind.cpp
330     profiler/ProfilerCompiledBytecode.cpp
331     profiler/ProfilerDatabase.cpp
332     profiler/ProfilerJettisonReason.cpp
333     profiler/ProfilerOSRExit.cpp
334     profiler/ProfilerOSRExitSite.cpp
335     profiler/ProfilerOrigin.cpp
336     profiler/ProfilerOriginStack.cpp
337     profiler/ProfilerProfiledBytecodes.cpp
338
339     runtime/ArgList.cpp
340     runtime/Arguments.cpp
341     runtime/ArgumentsIteratorConstructor.cpp
342     runtime/ArgumentsIteratorPrototype.cpp
343     runtime/ArrayBuffer.cpp
344     runtime/ArrayBufferNeuteringWatchpoint.cpp
345     runtime/ArrayBufferView.cpp
346     runtime/ArrayConstructor.cpp
347     runtime/ArrayIteratorConstructor.cpp
348     runtime/ArrayIteratorPrototype.cpp
349     runtime/ArrayPrototype.cpp
350     runtime/BooleanConstructor.cpp
351     runtime/BooleanObject.cpp
352     runtime/BooleanPrototype.cpp
353     runtime/CallData.cpp
354     runtime/CodeCache.cpp
355     runtime/CodeSpecializationKind.cpp
356     runtime/CommonIdentifiers.cpp
357     runtime/CommonSlowPaths.cpp
358     runtime/CommonSlowPathsExceptions.cpp
359     runtime/CompilationResult.cpp
360     runtime/Completion.cpp
361     runtime/ConsoleClient.cpp
362     runtime/ConsolePrototype.cpp
363     runtime/ConstructData.cpp
364     runtime/DataView.cpp
365     runtime/DataView.h
366     runtime/DateConstructor.cpp
367     runtime/DateConversion.cpp
368     runtime/DateInstance.cpp
369     runtime/DatePrototype.cpp
370     runtime/DumpContext.cpp
371     runtime/Error.cpp
372     runtime/ErrorConstructor.cpp
373     runtime/ErrorHandlingScope.cpp
374     runtime/ErrorInstance.cpp
375     runtime/ErrorPrototype.cpp
376     runtime/ExceptionHelpers.cpp
377     runtime/Executable.cpp
378     runtime/FunctionConstructor.cpp
379     runtime/FunctionExecutableDump.cpp
380     runtime/FunctionPrototype.cpp
381     runtime/GetterSetter.cpp
382     runtime/Identifier.cpp
383     runtime/IndexingType.cpp
384     runtime/InitializeThreading.cpp
385     runtime/IntendedStructureChain.cpp
386     runtime/InternalFunction.cpp
387     runtime/JSAPIValueWrapper.cpp
388     runtime/JSActivation.cpp
389     runtime/JSArgumentsIterator.cpp
390     runtime/JSArray.cpp
391     runtime/JSArrayBuffer.cpp
392     runtime/JSArrayBufferConstructor.cpp
393     runtime/JSArrayBufferPrototype.cpp
394     runtime/JSArrayBufferView.cpp
395     runtime/JSArrayIterator.cpp
396     runtime/JSBoundFunction.cpp
397     runtime/JSCJSValue.cpp
398     runtime/JSCell.cpp
399     runtime/JSConsole.cpp
400     runtime/JSDataView.cpp
401     runtime/JSDataViewPrototype.cpp
402     runtime/JSDateMath.cpp
403     runtime/JSFunction.cpp
404     runtime/JSGlobalObject.cpp
405     runtime/JSGlobalObjectFunctions.cpp
406     runtime/JSLock.cpp
407     runtime/JSMap.cpp
408     runtime/JSMapIterator.cpp
409     runtime/JSNameScope.cpp
410     runtime/JSNotAnObject.cpp
411     runtime/JSONObject.cpp
412     runtime/JSObject.cpp
413     runtime/JSPromise.cpp
414     runtime/JSPromiseConstructor.cpp
415     runtime/JSPromiseDeferred.cpp
416     runtime/JSPromiseFunctions.cpp
417     runtime/JSPromiseReaction.cpp
418     runtime/JSPromisePrototype.cpp
419     runtime/JSPropertyNameIterator.cpp
420     runtime/JSProxy.cpp
421     runtime/JSScope.cpp
422     runtime/JSSegmentedVariableObject.cpp
423     runtime/JSSet.cpp
424     runtime/JSSetIterator.cpp
425     runtime/JSString.cpp
426     runtime/JSStringJoiner.cpp
427     runtime/JSSymbolTableObject.cpp
428     runtime/JSTypedArrayConstructors.cpp
429     runtime/JSTypedArrayPrototypes.cpp
430     runtime/JSTypedArrays.cpp
431     runtime/JSVariableObject.cpp
432     runtime/JSWeakMap.cpp
433     runtime/JSWithScope.cpp
434     runtime/JSWrapperObject.cpp
435     runtime/LiteralParser.cpp
436     runtime/Lookup.cpp
437     runtime/MapConstructor.cpp
438     runtime/MapData.cpp
439     runtime/MapIteratorConstructor.cpp
440     runtime/MapIteratorPrototype.cpp
441     runtime/MapPrototype.cpp
442     runtime/MathObject.cpp
443     runtime/MemoryStatistics.cpp
444     runtime/NameConstructor.cpp
445     runtime/NameInstance.cpp
446     runtime/NamePrototype.cpp
447     runtime/NativeErrorConstructor.cpp
448     runtime/NativeErrorPrototype.cpp
449     runtime/NumberConstructor.cpp
450     runtime/NumberObject.cpp
451     runtime/NumberPrototype.cpp
452     runtime/ObjectConstructor.cpp
453     runtime/ObjectPrototype.cpp
454     runtime/Operations.cpp
455     runtime/Options.cpp
456     runtime/PropertyDescriptor.cpp
457     runtime/PropertyNameArray.cpp
458     runtime/PropertySlot.cpp
459     runtime/PropertyTable.cpp
460     runtime/PrototypeMap.cpp
461     runtime/RegExp.cpp
462     runtime/RegExpCache.cpp
463     runtime/RegExpCachedResult.cpp
464     runtime/RegExpConstructor.cpp
465     runtime/RegExpMatchesArray.cpp
466     runtime/RegExpObject.cpp
467     runtime/RegExpPrototype.cpp
468     runtime/SamplingCounter.cpp
469     runtime/SetConstructor.cpp
470     runtime/SetIteratorConstructor.cpp
471     runtime/SetIteratorPrototype.cpp
472     runtime/SetPrototype.cpp
473     runtime/SimpleTypedArrayController.cpp
474     runtime/SmallStrings.cpp
475     runtime/SparseArrayValueMap.cpp
476     runtime/StrictEvalActivation.cpp
477     runtime/StringConstructor.cpp
478     runtime/StringObject.cpp
479     runtime/StringPrototype.cpp
480     runtime/StringRecursionChecker.cpp
481     runtime/Structure.cpp
482     runtime/StructureChain.cpp
483     runtime/StructureIDTable.cpp
484     runtime/StructureRareData.cpp
485     runtime/SymbolTable.cpp
486     runtime/TestRunnerUtils.cpp
487     runtime/TypedArrayController.cpp
488     runtime/TypedArrayType.cpp
489     runtime/VM.cpp
490     runtime/VMEntryScope.cpp
491     runtime/Watchdog.cpp
492     runtime/WatchdogNone.cpp
493     runtime/WeakMapConstructor.cpp
494     runtime/WeakMapData.cpp
495     runtime/WeakMapPrototype.cpp
496
497     tools/CodeProfile.cpp
498     tools/CodeProfiling.cpp
499
500     yarr/RegularExpression.cpp
501     yarr/YarrCanonicalizeUCS2.cpp
502     yarr/YarrInterpreter.cpp
503     yarr/YarrJIT.cpp
504     yarr/YarrPattern.cpp
505     yarr/YarrSyntaxChecker.cpp
506 )
507
508 set(JavaScriptCore_LUT_FILES
509     runtime/ArrayConstructor.cpp
510     runtime/ArrayPrototype.cpp
511     runtime/BooleanPrototype.cpp
512     runtime/DateConstructor.cpp
513     runtime/DatePrototype.cpp
514     runtime/ErrorPrototype.cpp
515     runtime/JSDataViewPrototype.cpp
516     runtime/JSGlobalObject.cpp
517     runtime/JSONObject.cpp
518     runtime/JSPromiseConstructor.cpp
519     runtime/JSPromisePrototype.cpp
520     runtime/NamePrototype.cpp
521     runtime/NumberConstructor.cpp
522     runtime/NumberPrototype.cpp
523     runtime/ObjectConstructor.cpp
524     runtime/RegExpConstructor.cpp
525     runtime/RegExpObject.cpp
526     runtime/RegExpPrototype.cpp
527     runtime/StringConstructor.cpp
528 )
529
530 set(JavaScriptCore_LIBRARIES
531     WTF
532     ${ICU_I18N_LIBRARIES}
533 )
534
535 if (WTF_USE_UDIS86)
536     set(UDIS_GEN_DEP
537         disassembler/udis86/ud_opcode.py
538         disassembler/udis86/ud_optable.py
539     )
540
541     add_custom_command(
542         OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/udis86_itab.c ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/udis86_itab.h
543         DEPENDS ${UDIS_GEN_DEP}
544         WORKING_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
545         COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/disassembler/udis86/itab.py ${JAVASCRIPTCORE_DIR}/disassembler/udis86/optable.xml
546         VERBATIM)
547
548     list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
549         ${JAVASCRIPTCORE_DIR}/disassembler/udis86
550     )
551     list(APPEND JavaScriptCore_HEADERS
552         ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/udis86_itab.h
553     )
554     list(APPEND JavaScriptCore_SOURCES
555         disassembler/udis86/udis86.c
556         disassembler/udis86/udis86_decode.c
557         disassembler/udis86/udis86_input.c
558         disassembler/udis86/udis86_itab_holder.c
559         disassembler/udis86/udis86_syn-att.c
560         disassembler/udis86/udis86_syn-intel.c
561         disassembler/udis86/udis86_syn.c
562     )
563 endif ()
564
565 if (ENABLE_LLINT)
566     # We cannot check for RUBY_FOUND because it is set only when the full package is installed and
567     # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
568     # for finding the only Ruby interpreter.
569     if (NOT RUBY_EXECUTABLE)
570         message(FATAL_ERROR "The Ruby interpreter is needed to generate LLInt files.")
571     endif ()
572
573     set(LLINT_ASM
574         llint/LowLevelInterpreter.asm
575         llint/LowLevelInterpreter32_64.asm
576         llint/LowLevelInterpreter64.asm
577     )
578
579     set(OFFLINE_ASM
580         offlineasm/arm.rb
581         offlineasm/ast.rb
582         offlineasm/backends.rb
583         offlineasm/cloop.rb
584         offlineasm/config.rb
585         offlineasm/instructions.rb
586         offlineasm/offsets.rb
587         offlineasm/opt.rb
588         offlineasm/parser.rb
589         offlineasm/registers.rb
590         offlineasm/risc.rb
591         offlineasm/self_hash.rb
592         offlineasm/settings.rb
593         offlineasm/transform.rb
594         offlineasm/x86.rb
595     )
596
597     add_custom_command(
598         OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm
599         MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/generate-bytecode-files
600         DEPENDS ${JAVASCRIPTCORE_DIR}/generate-bytecode-files bytecode/BytecodeList.json
601         COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/generate-bytecode-files --bytecodes_h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h --init_bytecodes_asm ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm ${JAVASCRIPTCORE_DIR}/bytecode/BytecodeList.json
602         VERBATIM)
603
604     add_custom_command(
605         OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
606         MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb
607         DEPENDS ${LLINT_ASM} ${OFFLINE_ASM}
608         COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
609         VERBATIM)
610
611     # We add the header files directly to the ADD_EXECUTABLE call instead of setting the
612     # OBJECT_DEPENDS property in LLIntOffsetsExtractor.cpp because generate_offset_extractor.rb and
613     # generate-bytecode-files may not regenerate the .h files in case the hash it calculates does not change.
614     # In this case, if some of the dependencies specified in the ADD_CUSTOM_COMMANDs above have
615     # changed the command will always be called because the mtime of the .h files will
616     # always be older than that of their dependencies.
617     # Additionally, setting the OBJECT_DEPENDS property will make the .h files a Makefile
618     # dependency of both LLIntOffsetsExtractor and LLIntOffsetsExtractor.cpp, so the command will
619     # actually be run multiple times!
620     add_executable(LLIntOffsetsExtractor
621         ${JAVASCRIPTCORE_DIR}/llint/LLIntOffsetsExtractor.cpp
622         ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h
623     )
624     target_link_libraries(LLIntOffsetsExtractor WTF)
625
626     # The build system will execute asm.rb every time LLIntOffsetsExtractor's mtime is newer than
627     # LLIntAssembly.h's mtime. The problem we have here is: asm.rb has some built-in optimization
628     # that generates a checksum of the LLIntOffsetsExtractor binary, if the checksum of the new
629     # LLIntOffsetsExtractor matches, no output is generated. To make this target consistent and avoid
630     # running this command for every build, we artificially update LLIntAssembly.h's mtime (using touch)
631     # after every asm.rb run.
632     add_custom_command(
633         OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
634         MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb
635         DEPENDS LLIntOffsetsExtractor ${LLINT_ASM} ${OFFLINE_ASM} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm
636         COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm $<TARGET_FILE:LLIntOffsetsExtractor> ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
637         COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
638         VERBATIM)
639
640     # The explanation for not making LLIntAssembly.h part of the OBJECT_DEPENDS property of some of
641     # the .cpp files below is similar to the one in the previous comment. However, since these .cpp
642     # files are used to build JavaScriptCore itself, we can just add LLIntAssembly.h to JSC_HEADERS
643     # since it is used in the add_library() call at the end of this file.
644     list(APPEND JavaScriptCore_HEADERS
645         ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
646     )
647     list(APPEND JavaScriptCore_SOURCES
648         llint/LLIntCLoop.cpp
649         llint/LLIntData.cpp
650         llint/LLIntEntrypoint.cpp
651         llint/LLIntExceptions.cpp
652         llint/LLIntSlowPaths.cpp
653         llint/LLIntThunks.cpp
654         llint/LowLevelInterpreter.cpp
655     )
656 endif ()
657
658 if (ENABLE_FTL_JIT)
659     if (NOT LLVM_STATIC_LIBRARIES)
660         message(FATAL_ERROR "No LLVM libs found, but FTL is enabled. Stopping build.")
661     endif ()
662
663     # Configure llvmForJSC.so
664     set(llvmForJSC_SOURCES
665         llvm/library/LLVMAnchor.cpp
666         llvm/library/LLVMExports.cpp
667         llvm/library/LLVMOverrides.cpp
668     )
669     set(llvmForJSC_INCLUDE_DIRECTORIES
670         ${LLVM_INCLUDE_DIRS}
671         "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
672     )
673
674     add_custom_command(
675         OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/WebKitLLVMLibraryToken.h
676         DEPENDS ${LLVM_STATIC_LIBRARIES}
677         COMMAND ${CMAKE_COMMAND} -E touch ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/WebKitLLVMLibraryToken.h
678         VERBATIM)
679
680     WEBKIT_WRAP_SOURCELIST(${llvmForJSC_SOURCES})
681     add_library(llvmForJSC SHARED ${llvmForJSC_SOURCES} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/WebKitLLVMLibraryToken.h)
682     target_link_libraries(llvmForJSC ${LLVM_STATIC_LIBRARIES} "pthread" "dl")
683
684     # Added extra items for JavaScriptCore
685     list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
686         ${LLVM_INCLUDE_DIRS}
687     )
688
689     list(APPEND JavaScriptCore_SOURCES
690         llvm/InitializeLLVM.cpp
691         llvm/InitializeLLVMPOSIX.cpp
692         llvm/InitializeLLVMLinux.cpp
693         llvm/LLVMAPI.cpp
694
695         dfg/DFGToFTLDeferredCompilationCallback.cpp
696         dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp
697
698         disassembler/LLVMDisassembler.cpp
699         disassembler/X86Disassembler.cpp
700
701         ftl/FTLAbstractHeap.cpp
702         ftl/FTLAbstractHeapRepository.cpp
703         ftl/FTLCapabilities.cpp
704         ftl/FTLCommonValues.cpp
705         ftl/FTLCompile.cpp
706         ftl/FTLDWARFDebugLineInfo.cpp
707         ftl/FTLExitArgument.cpp
708         ftl/FTLExitArgumentForOperand.cpp
709         ftl/FTLExitThunkGenerator.cpp
710         ftl/FTLExitValue.cpp
711         ftl/FTLFail.cpp
712         ftl/FTLForOSREntryJITCode.cpp
713         ftl/FTLInlineCacheSize.cpp
714         ftl/FTLIntrinsicRepository.cpp
715         ftl/FTLJITCode.cpp
716         ftl/FTLJITFinalizer.cpp
717         ftl/FTLLink.cpp
718         ftl/FTLLocation.cpp
719         ftl/FTLLowerDFGToLLVM.cpp
720         ftl/FTLOSREntry.cpp
721         ftl/FTLOSRExit.cpp
722         ftl/FTLOSRExitCompiler.cpp
723         ftl/FTLOutput.cpp
724         ftl/FTLSaveRestore.cpp
725         ftl/FTLSlowPathCall.cpp
726         ftl/FTLSlowPathCallKey.cpp
727         ftl/FTLStackMaps.cpp
728         ftl/FTLState.cpp
729         ftl/FTLThunks.cpp
730         ftl/FTLValueFormat.cpp
731     )
732 endif ()
733
734 set(HASH_LUT_GENERATOR ${CMAKE_CURRENT_SOURCE_DIR}/create_hash_table)
735 macro(GENERATE_HASH_LUT _input _output)
736     add_custom_command(
737         OUTPUT ${_output}
738         DEPENDS ${HASH_LUT_GENERATOR} ${_input} ${CMAKE_CURRENT_SOURCE_DIR}/generate-js-builtins
739         COMMAND ${PERL_EXECUTABLE} ${HASH_LUT_GENERATOR} ${_input} -i > ${_output}
740         VERBATIM)
741     list(APPEND JavaScriptCore_HEADERS ${_output})
742 endmacro()
743
744 # GENERATOR 1-A: LUT creator
745 foreach (_file ${JavaScriptCore_LUT_FILES})
746     get_filename_component(_name ${_file} NAME_WE)
747     GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
748 endforeach ()
749
750 set(JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES
751     assembler
752     bindings
753     bytecode
754     debugger
755     heap
756     inspector
757     inspector/agents
758     interpreter
759     jit
760     llint
761     parser
762     profiler
763     runtime
764     yarr
765
766     collector/handles
767     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
768 )
769
770 set(JavaScriptCore_FORWARDING_HEADERS_FILES
771     API/APICast.h
772     API/JSBase.h
773     API/JSCTestRunnerUtils.h
774     API/JSContextRef.h
775     API/JSContextRefPrivate.h
776     API/JSObjectRef.h
777     API/JSObjectRefPrivate.h
778     API/JSRetainPtr.h
779     API/JSScriptRefPrivate.h
780     API/JSStringRef.h
781     API/JSStringRefBSTR.h
782     API/JSStringRefCF.h
783     API/JSValueRef.h
784     API/JSWeakObjectMapRefInternal.h
785     API/JSWeakObjectMapRefPrivate.h
786     API/JavaScript.h
787     API/JavaScriptCore.h
788     API/OpaqueJSString.h
789     API/WebKitAvailability.h
790
791     assembler/LinkBuffer.h
792     assembler/MacroAssembler.h
793     assembler/MacroAssemblerCodeRef.h
794     assembler/MacroAssemblerCodeRef.h
795     jit/GPRInfo.h
796     runtime/VM.h
797
798     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h
799     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h
800 )
801
802
803 # GENERATOR 1-B: particular LUT creator (for 1 file only)
804 GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h)
805
806 #GENERATOR: "RegExpJitTables.h": tables used by Yarr
807 add_custom_command(
808     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
809     MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/create_regex_tables
810     COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/create_regex_tables > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
811     VERBATIM)
812 ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/yarr/YarrPattern.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h)
813
814
815 #GENERATOR: "KeywordLookup.h": keyword decision tree used by the lexer
816 add_custom_command(
817     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
818     MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/KeywordLookupGenerator.py
819     COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/KeywordLookupGenerator.py ${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
820     VERBATIM)
821 ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/parser/Lexer.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h)
822
823
824 # Inspector Interfaces
825
826 set(JavaScriptCore_INSPECTOR_SCRIPTS_DIR "${JAVASCRIPTCORE_DIR}/inspector/scripts")
827
828 set(JavaScriptCore_INSPECTOR_DOMAINS
829     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Console.json
830     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Debugger.json
831     ${JAVASCRIPTCORE_DIR}/inspector/protocol/GenericTypes.json
832     ${JAVASCRIPTCORE_DIR}/inspector/protocol/InspectorDomain.json
833     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Runtime.json
834 )
835
836 add_custom_command(
837     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJS.json
838     MAIN_DEPENDENCY ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/generate-combined-inspector-json.py
839     DEPENDS ${JavaScriptCore_INSPECTOR_DOMAINS}
840     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/generate-combined-inspector-json.py ${JavaScriptCore_INSPECTOR_DOMAINS} > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJS.json
841     VERBATIM)
842
843 # Inspector Backend Dispatchers, Frontend Dispatchers, Type Builders
844 add_custom_command(
845     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSBackendDispatchers.cpp
846            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSBackendDispatchers.h
847            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSFrontendDispatchers.cpp
848            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSFrontendDispatchers.h
849            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSTypeBuilders.cpp
850            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSTypeBuilders.h
851            ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorJSBackendCommands.js
852     MAIN_DEPENDENCY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJS.json
853     DEPENDS ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/CodeGeneratorInspector.py
854             ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/CodeGeneratorInspectorStrings.py
855     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/CodeGeneratorInspector.py ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJS.json --output_h_dir "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}" --output_cpp_dir "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}" --output_js_dir "${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol" --output_type JavaScript --write_always && mkdir -p ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector && cp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSBackendDispatchers.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSFrontendDispatchers.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSTypeBuilders.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector
856     VERBATIM)
857
858 # JSCBuiltins
859 file(GLOB JSCBuiltins_js_files "${CMAKE_CURRENT_SOURCE_DIR}/builtins/*.js")
860 add_custom_command(
861    OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h
862    MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/generate-js-builtins
863    DEPENDS ${JSCBuiltins_js_files}
864    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/generate-js-builtins ${JSCBuiltins_js_files} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp
865    VERBATIM)
866
867 list(APPEND JavaScriptCore_SOURCES
868     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSBackendDispatchers.cpp
869     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSFrontendDispatchers.cpp
870     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSTypeBuilders.cpp
871     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp
872 )
873
874 list(APPEND JavaScriptCore_HEADERS
875     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSBackendDispatchers.h
876     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSFrontendDispatchers.h
877     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSTypeBuilders.h
878     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h
879 )
880
881 add_custom_command(
882     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js
883     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/inspector/InjectedScriptSource.js
884     DEPENDS ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/xxd.pl ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/jsmin.py
885     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/jsmin.py < ${JAVASCRIPTCORE_DIR}/inspector/InjectedScriptSource.js > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js
886     COMMAND ${PERL_EXECUTABLE} ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/xxd.pl InjectedScriptSource_js ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.h
887     VERBATIM)
888
889 list(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.h)
890
891
892 if (WTF_CPU_ARM)
893     list(APPEND JavaScriptCore_SOURCES
894         assembler/ARMAssembler.cpp
895         assembler/ARMv7Assembler.cpp
896         assembler/MacroAssemblerARM.cpp
897     )
898     if (MSVC AND ENABLE_JIT)
899         add_custom_command(
900             OUTPUT ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm
901             MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_jit_stubs
902             DEPENDS ${JAVASCRIPTCORE_DIR}/jit/JITStubsARM.h
903             DEPENDS ${JAVASCRIPTCORE_DIR}/jit/JITStubs.cpp
904             COMMAND ${PERL_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_jit_stubs --prefix=MSVC --header ${JAVASCRIPTCORE_DIR}/jit/JITStubsARM.h ${JAVASCRIPTCORE_DIR}/jit/JITStubs.cpp > ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm
905             VERBATIM)
906
907         add_custom_command(
908             OUTPUT ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj
909             MAIN_DEPENDENCY ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm
910             COMMAND armasm -nologo ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj
911             VERBATIM)
912
913         list(APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj)
914     endif ()
915 elseif (WTF_CPU_MIPS)
916 elseif (WTF_CPU_SH4)
917 elseif (WTF_CPU_X86)
918     list(APPEND JavaScriptCore_SOURCES
919         assembler/MacroAssemblerX86Common.cpp
920     )
921 elseif (WTF_CPU_X86_64)
922     if (MSVC AND ENABLE_JIT)
923         add_custom_command(
924             OUTPUT ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj
925             MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/jit/JITStubsMSVC64.asm
926             COMMAND ml64 -nologo -c -Fo ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj ${JAVASCRIPTCORE_DIR}/jit/JITStubsMSVC64.asm
927             VERBATIM)
928
929         list(APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj)
930     endif ()
931     list(APPEND JavaScriptCore_SOURCES
932         assembler/MacroAssemblerX86Common.cpp
933     )
934 else ()
935     message(FATAL_ERROR "Unknown CPU")
936 endif ()
937
938
939 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
940
941 WEBKIT_CREATE_FORWARDING_HEADERS(JavaScriptCore DIRECTORIES ${JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES} FILES ${JavaScriptCore_FORWARDING_HEADERS_FILES})
942
943
944 add_subdirectory(shell)
945
946 WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
947 include_directories(${JavaScriptCore_INCLUDE_DIRECTORIES})
948 add_definitions(-DSTATICALLY_LINKED_WITH_WTF)
949 add_library(JavaScriptCore ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
950 target_link_libraries(JavaScriptCore ${JavaScriptCore_LIBRARIES})
951 set_target_properties(JavaScriptCore PROPERTIES COMPILE_DEFINITIONS "BUILDING_JavaScriptCore")
952 set_target_properties(JavaScriptCore PROPERTIES FOLDER "JavaScriptCore")
953 set_target_properties(JavaScriptCore PROPERTIES LINK_INTERFACE_LIBRARIES "")
954
955 if (JavaScriptCore_OUTPUT_NAME)
956     set_target_properties(JavaScriptCore PROPERTIES OUTPUT_NAME ${JavaScriptCore_OUTPUT_NAME})
957 endif ()
958
959 if (${JavaScriptCore_LIBRARY_TYPE} STREQUAL "SHARED")
960     POPULATE_LIBRARY_VERSION(JAVASCRIPTCORE)
961     set_target_properties(JavaScriptCore PROPERTIES VERSION ${JAVASCRIPTCORE_VERSION} SOVERSION ${JAVASCRIPTCORE_VERSION_MAJOR})
962     install(TARGETS JavaScriptCore DESTINATION "${LIB_INSTALL_DIR}")
963 endif ()
964
965 if (ENABLE_FTL_JIT)
966     add_dependencies(JavaScriptCore llvmForJSC)
967 endif ()