aboutsummaryrefslogtreecommitdiffstats
path: root/src/v4/v4.pro
blob: e2987da2f35d732958dbeec13b400c08370e33e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
TARGET = QtV4
QT_PRIVATE = core-private qmldevtools-private

CONFIG += internal_module

LLVM_CONFIG=llvm-config

OBJECTS_DIR=.obj

load(qt_build_config)
load(qt_module)

CONFIG += warn_off

#win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x66000000 #TODO ??!


# Pick up the qmake variable or environment variable for LLVM_INSTALL_DIR. If either was set, change the LLVM_CONFIG to use that.
isEmpty(LLVM_INSTALL_DIR):LLVM_INSTALL_DIR=$$(LLVM_INSTALL_DIR)
!isEmpty(LLVM_INSTALL_DIR):LLVM_CONFIG=$$LLVM_INSTALL_DIR/bin/llvm-config

!macx-clang*:LIBS += -rdynamic

SOURCES += \
    qv4codegen.cpp \
    qv4ir.cpp \
    qmljs_engine.cpp \
    qmljs_environment.cpp \
    qmljs_runtime.cpp \
    qmljs_value.cpp \
    qv4syntaxchecker.cpp \
    qv4isel_masm.cpp \
    llvm_runtime.cpp \
    qv4isel_p.cpp \
    debugging.cpp \
    qv4mm.cpp \
    qv4managed.cpp \
    qv4array.cpp \
    qv4arrayobject.cpp \
    qv4argumentsobject.cpp \
    qv4booleanobject.cpp \
    qv4dateobject.cpp \
    qv4errorobject.cpp \
    qv4functionobject.cpp \
    qv4globalobject.cpp \
    qv4jsonobject.cpp \
    qv4mathobject.cpp \
    qv4numberobject.cpp \
    qv4object.cpp \
    qv4objectproto.cpp \
    qv4regexpobject.cpp \
    qv4stringobject.cpp \
    qv4string.cpp \
    qv4objectiterator.cpp \
    qv4regexp.cpp

HEADERS += \
    qv4global.h \
    qv4codegen_p.h \
    qv4ir_p.h \
    qmljs_engine.h \
    qmljs_environment.h \
    qmljs_runtime.h \
    qmljs_math.h \
    qmljs_value.h \
    qv4syntaxchecker_p.h \
    qv4isel_masm_p.h \
    qv4isel_p.h \
    qv4isel_util_p.h \
    debugging.h \
    qv4identifier.h \
    qv4mm.h \
    qv4managed.h \
    qv4array.h \
    qv4arrayobject.h \
    qv4argumentsobject.h \
    qv4booleanobject.h \
    qv4dateobject.h \
    qv4errorobject.h \
    qv4functionobject.h \
    qv4globalobject.h \
    qv4jsonobject.h \
    qv4mathobject.h \
    qv4numberobject.h \
    qv4object.h \
    qv4objectproto.h \
    qv4regexpobject.h \
    qv4stringobject.h \
    qv4string.h \
    qv4propertydescriptor.h \
    qv4propertytable.h \
    qv4objectiterator.h \
    qv4regexp.h

llvm {

SOURCES += \
    qv4isel_llvm.cpp

HEADERS += \
    qv4isel_llvm_p.h \
    qv4_llvm_p.h

LLVM_RUNTIME_BC = $$PWD/llvm_runtime.bc
DEFINES += LLVM_RUNTIME="\"\\\"$$LLVM_RUNTIME_BC\\\"\""

INCLUDEPATH += \
    $$system($$LLVM_CONFIG --includedir)

QMAKE_CXXFLAGS += $$system($$LLVM_CONFIG --cppflags) -fvisibility-inlines-hidden
QMAKE_CXXFLAGS -= -pedantic
QMAKE_CXXFLAGS -= -Wcovered-switch-default

LIBS += \
    $$system($$LLVM_CONFIG --ldflags) \
    $$system($$LLVM_CONFIG --libs core jit bitreader linker ipo target x86 arm native)

QMAKE_EXTRA_TARGETS += gen_llvm_runtime

GEN_LLVM_RUNTIME_FLAGS = $$system($$LLVM_CONFIG --cppflags)
GEN_LLVM_RUNTIME_FLAGS -= -pedantic

gen_llvm_runtime.target = llvm_runtime
gen_llvm_runtime.commands = clang -O2 -emit-llvm -c $(INCPATH) $$GEN_LLVM_RUNTIME_FLAGS -DQMLJS_LLVM_RUNTIME llvm_runtime.cpp -o $$LLVM_RUNTIME_BC


} else {

DEFINES += QMLJS_NO_LLVM

}

# Use SSE2 floating point math on 32 bit instead of the default
# 387 to make test results pass on 32 and on 64 bit builds.
linux-g++*:isEqual(QT_ARCH,i386) {
    QMAKE_CFLAGS += -march=pentium4 -msse2 -mfpmath=sse
    QMAKE_CXXFLAGS += -march=pentium4 -msse2 -mfpmath=sse
}

TESTSCRIPT=$$PWD/../../tests/test262.py
V4CMD = v4

checktarget.target = check
checktarget.commands = python $$TESTSCRIPT --command=$$V4CMD --parallel --with-test-expectations --update-expectations
checktarget.depends = all
QMAKE_EXTRA_TARGETS += checktarget

checkmothtarget.target = check-interpreter
checkmothtarget.commands = python $$TESTSCRIPT --command=\"$$V4CMD --interpret\" --parallel --with-test-expectations
checkmothtarget.depends = all
QMAKE_EXTRA_TARGETS += checkmothtarget


include(moth/moth.pri)
include(../3rdparty/masm/masm.pri)
include(../3rdparty/double-conversion/double-conversion.pri)