forked from clasp-developers/clasp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jamroot.jam
234 lines (172 loc) · 8.21 KB
/
Jamroot.jam
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
import path ;
import os ;
CLASP_VERSION = "0.2" ;
using clang : : [ os.environ CLASP_CLANG_PATH ] ; # $(APPRES-EXTERNALS-RELEASE)/bin/clang++ ; # CLASP_TOOLSET
# using gc ;
import feature ;
feature.feature gc : boehm mps mps-prep
: symmetric implicit composite propagated link-incompatible ;
feature.compose <gc>boehm : <define>USE_BOEHM ;
feature.compose <gc>mps : <define>USE_MPS ;
feature.compose <gc>mps-prep : <define>USE_MPS <define>RUNNING_GC_BUILDER ; # used for testing MPS
GIT_COMMIT = [ os.environ GIT_COMMIT ] ;
project clasp : requirements
<define>INHERITED_FROM_SRC
<warnings>on
<cxxflags>"-ferror-limit=999"
<define>CLASP_GIT_COMMIT="\\\"$(GIT_COMMIT)\\\""
<define>CLASP_VERSION="\\\"$(CLASP_VERSION)\\\""
<cxxflags>"-Wno-attributes"
<target-os>linux:<cxxflags>"-Wno-unused-local-typedef"
<target-os>darwin:<cxxflags>"-resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/6.0"
<cxxflags>"-Wno-deprecated-register"
<define>CLBIND_DYNAMIC_LINK
<target-os>linux:<cxxflags>"-Wno-unused-local-typedef"
<target-os>linux:<linkflags>"-lpthread -ldl"
<target-os>darwin:<cxxflags>"-mmacosx-version-min=10.7"
<toolset>clang:<cxxflags>-std=c++11
<target-os>darwin:<cxxflags>"-stdlib=libc++"
<target-os>darwin:<linkflags>-stdlib=libc++
<cxxflags>"-fvisibility=default"
<variant>debug:<cxxflags>"-O0 -gdwarf-4"
<variant>release:<cxxflags>"-O3 -gdwarf-4"
<variant>release:<cflags>"-O3 -gdwarf-4"
<linkflags>"-fvisibility=default"
<target-os>darwin:<linkflags>"-lc++"
<define>INCLUDED_FROM_CLASP
<include>$(APPRES-EXTERNALS-RELEASE-INCLUDE)
<define>EXPAT
<cxxflags>"-Wgnu-array-member-paren-init"
#
# CONFIGURE CLASP BUILD
#
<define>USE_STATIC_ANALYZER_GLOBAL_SYMBOLS
## I wrote a drop in replacement for std::vector<X> that should work with the AMCpool
## If you turn on USE_STD_VECTOR then gctools::Vector0<X> will inherit from std::vector<X>
## if you disable USE_STD_VECTOR then the gctools::Vector0<X> will inherit from my
## custom GCVector which will be compatible with the MPS AMC pool
## There are two allocators for GCVector, a testing one that uses malloc/free (not MPS compatible)
## and a production one that is compatible with MPS
## Turn on USE_GCVECTOR_MALLOC_ALLOCATOR to use the malloc/free one
# <define>RUN_SAFE # Turn on safety checks in smart_ptr - this slows things down
# <define>SOURCE_DEBUG
#-------- mps options
# <define>DEBUG_MPS # generate lots of debugging information for MPS
# <define>CONFIG_VAR_COOL # Detailed, slow MPS debugging
# <define>CONFIG_PF_ANSI # Use the generic "ANSI" platform (see mps/code/config.h)
# <define>CONFIG_THREAD_SINGLE # Single threaded
<define>USE_CLASP_DYNAMIC_CAST
#---------
<define>DEBUG_CL_SYMBOLS # Lets you calculate which CL symbols are still missing from Clasp
# <define>DEBUG_LOAD_TIME_VALUES # generate lots of debugging information when accessing ltvs
# <cxxflags>-v # this will generate a lot more output during compilation but help with tooling
# <target-os>darwin:<linkflags>-stdlib=libc++
# <target-os>darwin:<linkflags>"-flat_namespace -undefined warning"
<define>__STDC_LIMIT_MACROS
<define>__STDC_CONSTANT_MACROS
<define>__STDC_FORMAT_MACROS
# <define>USE_PUT_SELECT_CLASSES_IN_AMC_POOL
# <define>DEBUG_MPS_AMS_POOL # use the debugging AMS pool and run tests on it
# <define>DEBUG_LOG_MPS_KINDS # Give more verbose MPS debugging messages that include kind names
# <define>USE_GCVECTOR_MALLOC_ALLOCATOR # DO NOT USE WITH USE_MPS - just for testing GCVector
# <toolset>clang:<include>/usr/lib/c++/v1
# <define>USEBOOSTPYTHON
#
# If you want source code debugging uncomment this
#
# <variant>debug:<define>SOURCE_DEBUG
#
# To run address sanitizer
#
# This will cause problems with examining variables while debugging - I don't know why
#
# #### REMEMBER!!! address sanitizer is BROKEN in that when you gdb with it
# it screws up addresses so that you can't locate where the asan error
# was caught - check for updates on this
# for now liberally sprinkle printf statements until you find the line
# that generates the asan error
#
# <toolset>clang,<sanitize>asan:<cxxflags>"-fsanitize=address -g3"
# <toolset>clang,<sanitize>asan:<linkflags>"-fsanitize=address"
# <sanitize>asan:<cxxflags>"-fsanitize=address -g3"
# <cxxflags>"-fsanitize=address -g3"
# <linkflags>"-fsanitize=address"
# <toolset>clang:<cxxflags>"-frelative-path=\/"
# <target-os>darwin:<linkflags>"--export-dynamic"
# <include>$(pythonInclude)
#This defines the size of a pointer - used in newhash.h
# <target-os>darwin:<define>POINTER_BITS=64
<target-os>darwin:<define>_TARGET_OS_DARWIN
<target-os>linux:<define>_TARGET_OS_LINUX
# for now
<target-os>darwin:<define>_ADDRESS_MODEL_64
<target-os>linux:<define>_ADDRESS_MODEL_32
<address-model>32:<define>_ADDRESS_MODEL_32
<address-model>64:<define>_ADDRESS_MODEL_64
# <cxxflags>-D_ADDRESS_MODEL_[<address-model>]
<variant>debug:<define>DEBUG_ASSERTS
# generate MLOG output to compare with ECL
<variant>debug:<define>_DEBUG_BUILD
<variant>release:<define>_RELEASE_BUILD
#
# Others
#
<toolset>darwin:<define>darwin
<cxxflags>"-Wno-unused-variable"
# <toolset>darwin:<cxxflags>"-fopenmp"
#-include pch.h"
<toolset>darwin:<linkflags>"-framework IOKit -framework Carbon -framework Cocoa -framework System -framework OpenGL -framework Glut -framework AGL -L/usr/local/lib/x86_64 -lgomp"
<toolset>gcc:<cxxflags>"-Wno-unused-variable"
<toolset>pathscale:<cxxflags>"-Wno-unused-variable -fopenmp"
<toolset>pgi:<cxxflags>"-mp -gopt"
<toolset>pgi:<linkflags>"-mp -gopt"
<define>READLINE
: usage-requirements
;
path-constant TOP : . ;
path-constant COMMON : src/common ;
path-constant APPTOP : [ os.environ CLASP_BUILD_TARGET_DIR ] ;
path-constant APPCONT : $(APPTOP)/Contents ;
path-constant APPRES : $(APPCONT)/Resources ;
path-constant APPRES-EXTERNALS : [ os.environ EXTERNALS_BUILD_TARGET_DIR ] ;
path-constant APPRES-EXTERNALS-RELEASE : $(APPRES-EXTERNALS)/release ;
path-constant APPRES-EXTERNALS-DEBUG : $(APPRES-EXTERNALS)/debug ;
path-constant APPRES-EXTERNALS-DEBUG-LIB : $(APPRES-EXTERNALS-DEBUG)/lib ;
path-constant APPRES-EXTERNALS-RELEASE-LIB : $(APPRES-EXTERNALS-RELEASE)/lib ;
path-constant APPRES-EXTERNALS-DEBUG-INCLUDE : $(APPRES-EXTERNALS-DEBUG)/include ;
path-constant APPRES-EXTERNALS-RELEASE-INCLUDE : $(APPRES-EXTERNALS-RELEASE)/include ;
path-constant APPRES-EXTERNALS-COMMON : $(APPRES-EXTERNALS)/common ;
path-constant APPRES-EXTERNALS-COMMON-LIB : $(APPRES-EXTERNALS-COMMON)/lib ;
path-constant APPRES-EXTERNALS-COMMON-INCLUDE : $(APPRES-EXTERNALS-COMMON)/include ;
path-constant APPRES-LISP : $(APPRES)/lisp ;
path-constant APPBIN_LINUX : $(APPTOP)/bin ;
path-constant APPBIN_OSX : $(APPTOP)/MacOS ;
path-constant APPINC : $(APPRES)/include ;
path-constant APPLIB : $(APPRES)/lib ;
path-constant APP-DEBUG-LIB : $(APPLIB)/debug ;
path-constant APP-RELEASE-LIB : $(APPLIB)/release ;
#path-constant BUILD : build ;
path-constant MPS-SRC : ./externals/src/mps-kit-1.111.0/code ;
path-constant MPS-LIB : $(APPRES-EXTERNALS-COMMON-LIB) ;
using bundler : $(TOP) ;
use-project externals : ./externals ;
use-project internals : src ;
use-project internals/core : src/core ;
# use-project boost : externals/src/boost ;
use-project internals/llvmo : src/llvmo ;
use-project internals/gctools : src/gctools ;
use-project internals/asttooling : src/asttooling ;
use-project internals/cffi : src/cffi ;
use-project internals/mpip : src/mpip ;
use-project internals/sockets : src/sockets ;
use-project internals/clbind : src/clbind ;
use-project internals/serveEvent : src/serveEvent ;
use-project internals/lisp : src/lisp ;
## If using cando
#use-project cando : cando ;
#use-project cando/addon : cando/addon ;
#use-project cando/units : cando/units ;
#use-project cando/chem : cando/chem ;
#use-project cando/src/kinematics : cando/src/kinematics ;
#use-project cando/src/packageManager : cando/src/packageManager ;
#use-project cando/main-cando : cando/main-cando ;