f6a9fbe5c2782f5c91e0efe7246dedb3f752f38b
[WebKit-https.git] / Source / JavaScriptCore / JavaScriptCore.pro
1 # JavaScriptCore - qmake build info
2 CONFIG += building-libs
3 include($$PWD/../WebKit.pri)
4 include(JavaScriptCore.pri)
5
6 TEMPLATE = lib
7 CONFIG += staticlib
8 # Don't use JavaScriptCore as the target name. qmake would create a JavaScriptCore.vcproj for msvc
9 # which already exists as a directory
10 TARGET = $$JAVASCRIPTCORE_TARGET
11 DESTDIR = $$JAVASCRIPTCORE_DESTDIR
12 QT += core
13 QT -= gui
14
15 CONFIG += depend_includepath
16
17 contains(QT_CONFIG, embedded):CONFIG += embedded
18
19 # WebCore adds these config only when in a standalone build.
20 # qbase.pri takes care of that when in a QTDIR_build
21 # Here we add the config for both cases since we don't include qbase.pri
22 contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
23 unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions
24
25 CONFIG(QTDIR_build) {
26     # Remove the following 2 lines if you want debug information in JavaScriptCore
27     CONFIG -= separate_debug_info
28     CONFIG += no_debug_info
29 }
30
31 *-g++*:QMAKE_CXXFLAGS_RELEASE -= -O2
32 *-g++*:QMAKE_CXXFLAGS_RELEASE += -O3
33
34 # Rules when JIT enabled (not disabled)
35 !contains(DEFINES, ENABLE_JIT=0) {
36     linux*-g++*:greaterThan(GCC_MAJOR_VERSION,3):greaterThan(GCC_MINOR_VERSION,0) {
37         QMAKE_CXXFLAGS += -fno-stack-protector
38         QMAKE_CFLAGS += -fno-stack-protector
39     }
40 }
41
42 wince* {
43     SOURCES += $$QT_SOURCE_TREE/src/3rdparty/ce-compat/ce_time.c
44 }
45
46 include(yarr/yarr.pri)
47 include(wtf/wtf.pri)
48
49 INSTALLDEPS += all
50
51 SOURCES += \
52     API/JSBase.cpp \
53     API/JSCallbackConstructor.cpp \
54     API/JSCallbackFunction.cpp \
55     API/JSCallbackObject.cpp \
56     API/JSClassRef.cpp \
57     API/JSContextRef.cpp \
58     API/JSObjectRef.cpp \
59     API/JSStringRef.cpp \
60     API/JSValueRef.cpp \
61     API/OpaqueJSString.cpp \
62     assembler/ARMAssembler.cpp \
63     assembler/ARMv7Assembler.cpp \
64     assembler/MacroAssemblerARM.cpp \
65     assembler/MacroAssemblerSH4.cpp \
66     bytecode/CodeBlock.cpp \
67     bytecode/JumpTable.cpp \
68     bytecode/Opcode.cpp \
69     bytecode/PredictedType.cpp \
70     bytecode/SamplingTool.cpp \
71     bytecode/StructureStubInfo.cpp \
72     bytecode/ValueProfile.cpp \
73     bytecompiler/BytecodeGenerator.cpp \
74     bytecompiler/NodesCodegen.cpp \
75     heap/ConservativeRoots.cpp \
76     heap/HandleHeap.cpp \
77     heap/HandleStack.cpp \
78     heap/Heap.cpp \
79     heap/MachineStackMarker.cpp \
80     heap/MarkStack.cpp \
81     heap/MarkedBlock.cpp \
82     heap/NewSpace.cpp \
83     heap/VTableSpectrum.cpp \
84     heap/WriteBarrierSupport.cpp \
85     debugger/DebuggerActivation.cpp \
86     debugger/DebuggerCallFrame.cpp \
87     debugger/Debugger.cpp \
88     dfg/DFGByteCodeParser.cpp \
89     dfg/DFGGraph.cpp \
90     dfg/DFGJITCodeGenerator.cpp \
91     dfg/DFGJITCompiler.cpp \
92     dfg/DFGNonSpeculativeJIT.cpp \
93     dfg/DFGOperations.cpp \
94     dfg/DFGSpeculativeJIT.cpp \
95     interpreter/CallFrame.cpp \
96     interpreter/Interpreter.cpp \
97     interpreter/RegisterFile.cpp \
98     jit/ExecutableAllocatorFixedVMPool.cpp \
99     jit/ExecutableAllocator.cpp \
100     jit/JITArithmetic.cpp \
101     jit/JITArithmetic32_64.cpp \
102     jit/JITCall.cpp \
103     jit/JITCall32_64.cpp \
104     jit/JIT.cpp \
105     jit/JITOpcodes.cpp \
106     jit/JITOpcodes32_64.cpp \
107     jit/JITPropertyAccess.cpp \
108     jit/JITPropertyAccess32_64.cpp \
109     jit/JITStubs.cpp \
110     jit/ThunkGenerators.cpp \
111     parser/JSParser.cpp \
112     parser/Lexer.cpp \
113     parser/Nodes.cpp \
114     parser/ParserArena.cpp \
115     parser/Parser.cpp \
116     parser/SourceProviderCache.cpp \
117     profiler/Profile.cpp \
118     profiler/ProfileGenerator.cpp \
119     profiler/ProfileNode.cpp \
120     profiler/Profiler.cpp \
121     runtime/ArgList.cpp \
122     runtime/Arguments.cpp \
123     runtime/ArrayConstructor.cpp \
124     runtime/ArrayPrototype.cpp \
125     runtime/BooleanConstructor.cpp \
126     runtime/BooleanObject.cpp \
127     runtime/BooleanPrototype.cpp \
128     runtime/CallData.cpp \
129     runtime/CommonIdentifiers.cpp \
130     runtime/Completion.cpp \
131     runtime/ConstructData.cpp \
132     runtime/DateConstructor.cpp \
133     runtime/DateConversion.cpp \
134     runtime/DateInstance.cpp \
135     runtime/DatePrototype.cpp \
136     runtime/ErrorConstructor.cpp \
137     runtime/Error.cpp \
138     runtime/ErrorInstance.cpp \
139     runtime/ErrorPrototype.cpp \
140     runtime/ExceptionHelpers.cpp \
141     runtime/Executable.cpp \
142     runtime/FunctionConstructor.cpp \
143     runtime/FunctionPrototype.cpp \
144     runtime/GCActivityCallback.cpp \
145     runtime/GetterSetter.cpp \
146     runtime/Identifier.cpp \
147     runtime/InitializeThreading.cpp \
148     runtime/InternalFunction.cpp \
149     runtime/JSActivation.cpp \
150     runtime/JSAPIValueWrapper.cpp \
151     runtime/JSArray.cpp \
152     runtime/JSByteArray.cpp \
153     runtime/JSCell.cpp \
154     runtime/JSFunction.cpp \
155     runtime/JSGlobalData.cpp \
156     runtime/JSGlobalObject.cpp \
157     runtime/JSGlobalObjectFunctions.cpp \
158     runtime/JSLock.cpp \
159     runtime/JSNotAnObject.cpp \
160     runtime/JSObject.cpp \
161     runtime/JSONObject.cpp \
162     runtime/JSPropertyNameIterator.cpp \
163     runtime/JSStaticScopeObject.cpp \
164     runtime/JSString.cpp \
165     runtime/JSValue.cpp \
166     runtime/JSVariableObject.cpp \
167     runtime/JSWrapperObject.cpp \
168     runtime/LiteralParser.cpp \
169     runtime/Lookup.cpp \
170     runtime/MathObject.cpp \
171     runtime/NativeErrorConstructor.cpp \
172     runtime/NativeErrorPrototype.cpp \
173     runtime/NumberConstructor.cpp \
174     runtime/NumberObject.cpp \
175     runtime/NumberPrototype.cpp \
176     runtime/ObjectConstructor.cpp \
177     runtime/ObjectPrototype.cpp \
178     runtime/Operations.cpp \
179     runtime/PropertyDescriptor.cpp \
180     runtime/PropertyNameArray.cpp \
181     runtime/PropertySlot.cpp \
182     runtime/RegExpConstructor.cpp \
183     runtime/RegExp.cpp \
184     runtime/RegExpObject.cpp \
185     runtime/RegExpPrototype.cpp \
186     runtime/RegExpCache.cpp \
187     runtime/RopeImpl.cpp \
188     runtime/SamplingCounter.cpp \
189     runtime/ScopeChain.cpp \
190     runtime/SmallStrings.cpp \
191     runtime/StrictEvalActivation.cpp \
192     runtime/StringConstructor.cpp \
193     runtime/StringObject.cpp \
194     runtime/StringPrototype.cpp \
195     runtime/StringRecursionChecker.cpp \
196     runtime/StructureChain.cpp \
197     runtime/Structure.cpp \
198     runtime/TimeoutChecker.cpp \
199     runtime/UString.cpp \
200     yarr/YarrJIT.cpp \
201
202 *sh4* {
203     QMAKE_CXXFLAGS += -mieee -w
204     QMAKE_CFLAGS   += -mieee -w
205 }
206
207 # Generated files, simply list them for JavaScriptCore
208
209 symbian: {
210     symbian-abld|symbian-sbsv2 {
211         MMP_RULES += ALWAYS_BUILD_AS_ARM
212     }  else {
213         QMAKE_CFLAGS -= --thumb
214         QMAKE_CXXFLAGS -= --thumb
215     }
216     QMAKE_CXXFLAGS.ARMCC += -OTime -O3
217 }
218
219 lessThan(GCC_MAJOR_VERSION, 5) {
220     # GCC 4.5 and before
221     lessThan(GCC_MINOR_VERSION, 6) {
222         # Disable C++0x mode in JSC for those who enabled it in their Qt's mkspec.
223         *-g++*:QMAKE_CXXFLAGS -= -std=c++0x -std=gnu++0x
224     }
225
226     # GCC 4.6 and after.
227     greaterThan(GCC_MINOR_VERSION, 5) {
228         if (!contains(QMAKE_CXXFLAGS, -std=c++0x) && !contains(QMAKE_CXXFLAGS, -std=gnu++0x)) {
229             # We need to deactivate those warnings because some names conflicts with upcoming c++0x types (e.g.nullptr).
230             QMAKE_CFLAGS_WARN_ON += -Wno-c++0x-compat
231             QMAKE_CXXFLAGS_WARN_ON += -Wno-c++0x-compat
232             QMAKE_CFLAGS += -Wno-c++0x-compat
233             QMAKE_CXXFLAGS += -Wno-c++0x-compat
234         }
235     }
236 }