<rdar://problem/6467376> Race condition in WTF::currentThread can lead to a thread...
[WebKit-https.git] / JavaScriptCore / JavaScriptCore.pri
1 # JavaScriptCore - Qt4 build info
2 VPATH += $$PWD
3
4 INCLUDEPATH += tmp
5 INCLUDEPATH += $$PWD $$PWD/parser $$PWD/bytecompiler $$PWD/debugger $$PWD/runtime $$PWD/wtf $$PWD/wtf/unicode $$PWD/interpreter $$PWD/jit $$PWD/profiler $$PWD/wrec $$PWD/API $$PWD/.. \
6                $$PWD/ForwardingHeaders $$PWD/bytecode $$PWD/assembler
7 DEFINES += BUILDING_QT__
8
9 isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = tmp
10 GENERATED_SOURCES_DIR_SLASH = $$GENERATED_SOURCES_DIR/
11 win32-* {
12     GENERATED_SOURCES_DIR_SLASH ~= s|/|\|
13     LIBS += -lwinmm
14 }
15
16 # Disable the JIT due to numerous observed miscompilations :(
17 #CONFIG(release):isEqual(QT_ARCH,i386) {
18 #     JIT_DEFINES = ENABLE_JIT ENABLE_WREC ENABLE_JIT_OPTIMIZE_CALL ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS ENABLE_JIT_OPTIMIZE_ARITHMETIC
19 #     # gcc <= 4.1 is known to miscompile, so require >= 4.2, written as major > 3 and minor > 1
20 #     linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,1) {
21 #         DEFINES += $$JIT_DEFINES
22 #         SOURCES += wtf/TCSystemAlloc.cpp
23 #         DEFINES -= USE_SYSTEM_MALLOC
24 #     }
25 #     win32-msvc* {
26 #         DEFINES += $$JIT_DEFINES
27 #     }
28 #}
29
30 include(pcre/pcre.pri)
31
32 LUT_FILES += \
33     runtime/DatePrototype.cpp \
34     runtime/NumberConstructor.cpp \
35     runtime/StringPrototype.cpp \
36     runtime/ArrayPrototype.cpp \
37     runtime/MathObject.cpp \
38     runtime/RegExpConstructor.cpp \
39     runtime/RegExpObject.cpp
40
41 KEYWORDLUT_FILES += \
42     parser/Keywords.table
43
44 KJSBISON += \
45     parser/Grammar.y
46
47 SOURCES += \
48     wtf/Assertions.cpp \
49     wtf/HashTable.cpp \
50     wtf/MainThread.cpp \
51     wtf/RandomNumber.cpp \
52     wtf/RefCountedLeakCounter.cpp \
53     wtf/unicode/CollatorDefault.cpp \
54     wtf/unicode/icu/CollatorICU.cpp \
55     wtf/unicode/UTF8.cpp \
56     API/JSBase.cpp \
57     API/JSCallbackConstructor.cpp \
58     API/JSCallbackFunction.cpp \
59     API/JSCallbackObject.cpp \
60     API/JSClassRef.cpp \
61     API/JSContextRef.cpp \
62     API/JSObjectRef.cpp \
63     API/JSStringRef.cpp \
64     API/JSValueRef.cpp \
65     API/OpaqueJSString.cpp \
66     runtime/InitializeThreading.cpp \
67     runtime/JSGlobalData.cpp \
68     runtime/JSGlobalObject.cpp \
69     runtime/JSStaticScopeObject.cpp \
70     runtime/JSVariableObject.cpp \
71     runtime/JSActivation.cpp \
72     runtime/JSNotAnObject.cpp \
73     bytecode/CodeBlock.cpp \
74     bytecode/StructureStubInfo.cpp \
75     bytecode/JumpTable.cpp \
76     jit/JIT.cpp \
77     jit/JITCall.cpp \
78     jit/JITArithmetic.cpp \
79     jit/JITPropertyAccess.cpp \
80     jit/ExecutableAllocator.cpp \
81     bytecompiler/BytecodeGenerator.cpp \
82     runtime/ExceptionHelpers.cpp \
83     runtime/JSPropertyNameIterator.cpp \
84     interpreter/Interpreter.cpp \
85     bytecode/Opcode.cpp \
86     bytecode/SamplingTool.cpp \
87     wrec/CharacterClass.cpp \
88     wrec/CharacterClassConstructor.cpp \
89     wrec/WREC.cpp \
90     wrec/WRECFunctors.cpp \
91     wrec/WRECGenerator.cpp \
92     wrec/WRECParser.cpp \
93     interpreter/RegisterFile.cpp
94
95 win32-*: SOURCES += jit/ExecutableAllocatorWin.cpp
96 else: SOURCES += jit/ExecutableAllocatorPosix.cpp
97
98 # AllInOneFile.cpp helps gcc analize and optimize code
99 # Other compilers may be able to do this at link time
100 SOURCES += \
101     runtime/ArgList.cpp \
102     runtime/Arguments.cpp \
103     runtime/ArrayConstructor.cpp \
104     runtime/ArrayPrototype.cpp \
105     runtime/BooleanConstructor.cpp \
106     runtime/BooleanObject.cpp \
107     runtime/BooleanPrototype.cpp \
108     runtime/CallData.cpp \
109     runtime/Collector.cpp \
110     runtime/CommonIdentifiers.cpp \
111     runtime/ConstructData.cpp \
112     runtime/DateConstructor.cpp \
113     runtime/DateInstance.cpp \
114     runtime/DateMath.cpp \
115     runtime/DatePrototype.cpp \
116     debugger/Debugger.cpp \
117     debugger/DebuggerCallFrame.cpp \
118     wtf/dtoa.cpp \
119     runtime/Error.cpp \
120     runtime/ErrorConstructor.cpp \
121     runtime/ErrorInstance.cpp \
122     runtime/ErrorPrototype.cpp \
123     interpreter/CallFrame.cpp \
124     runtime/FunctionConstructor.cpp \
125     runtime/FunctionPrototype.cpp \
126     runtime/GetterSetter.cpp \
127     runtime/GlobalEvalFunction.cpp \
128     runtime/Identifier.cpp \
129     runtime/InternalFunction.cpp \
130     runtime/Completion.cpp \
131     runtime/JSArray.cpp \
132     runtime/JSCell.cpp \
133     runtime/JSFunction.cpp \
134     runtime/JSGlobalObjectFunctions.cpp \
135     runtime/JSImmediate.cpp \
136     runtime/JSLock.cpp \
137     runtime/JSNumberCell.cpp \
138     runtime/JSObject.cpp \
139     runtime/JSString.cpp \
140     runtime/JSValue.cpp \
141     runtime/JSWrapperObject.cpp \
142     parser/Lexer.cpp \
143     runtime/Lookup.cpp \
144     runtime/MathObject.cpp \
145     runtime/NativeErrorConstructor.cpp \
146     runtime/NativeErrorPrototype.cpp \
147     parser/Nodes.cpp \
148     runtime/NumberConstructor.cpp \
149     runtime/NumberObject.cpp \
150     runtime/NumberPrototype.cpp \
151     runtime/ObjectConstructor.cpp \
152     runtime/ObjectPrototype.cpp \
153     runtime/Operations.cpp \
154     parser/Parser.cpp \
155     runtime/PropertyNameArray.cpp \
156     runtime/PropertySlot.cpp \
157     runtime/PrototypeFunction.cpp \
158     runtime/RegExp.cpp \
159     runtime/RegExpConstructor.cpp \
160     runtime/RegExpObject.cpp \
161     runtime/RegExpPrototype.cpp \
162     runtime/ScopeChain.cpp \
163     runtime/SmallStrings.cpp \
164     runtime/StringConstructor.cpp \
165     runtime/StringObject.cpp \
166     runtime/StringPrototype.cpp \
167     runtime/Structure.cpp \
168     runtime/StructureChain.cpp \
169     runtime/UString.cpp \
170     profiler/HeavyProfile.cpp \
171     profiler/Profile.cpp \
172     profiler/ProfileGenerator.cpp \
173     profiler/ProfileNode.cpp \
174     profiler/Profiler.cpp \
175     profiler/TreeProfile.cpp \
176     wtf/FastMalloc.cpp \
177     wtf/Threading.cpp \
178     wtf/ThreadingQt.cpp \
179     wtf/qt/MainThreadQt.cpp
180
181 # GENERATOR 1-A: LUT creator
182 lut.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.lut.h
183 lut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
184 lut.depend = ${QMAKE_FILE_NAME}
185 lut.input = LUT_FILES
186 lut.CONFIG += no_link
187 addExtraCompiler(lut)
188
189 # GENERATOR 1-B: particular LUT creator (for 1 file only)
190 keywordlut.output = $$GENERATED_SOURCES_DIR/Lexer.lut.h
191 keywordlut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
192 keywordlut.depend = ${QMAKE_FILE_NAME}
193 keywordlut.input = KEYWORDLUT_FILES
194 keywordlut.CONFIG += no_link
195 addExtraCompiler(keywordlut)
196
197 # GENERATOR 2: bison grammar
198 kjsbison.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.cpp
199 kjsbison.commands = bison -d -p kjsyy ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_BASE}.tab.c && $(MOVE) ${QMAKE_FILE_BASE}.tab.c ${QMAKE_FILE_OUT} && $(MOVE) ${QMAKE_FILE_BASE}.tab.h $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.h
200 kjsbison.depend = ${QMAKE_FILE_NAME}
201 kjsbison.input = KJSBISON
202 kjsbison.variable_out = GENERATED_SOURCES
203 kjsbison.dependency_type = TYPE_C
204 kjsbison.CONFIG = target_predeps
205 addExtraCompilerWithHeader(kjsbison)
206