forked from GaijinEntertainment/daScript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmake.lua
215 lines (207 loc) · 7.81 KB
/
xmake.lua
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
set_languages("c11", "cxx17")
add_rules("mode.release", "mode.releasedbg", "mode.asan")
target("UriParser")
set_kind("static")
set_optimize("fastest")
add_rules("c++.unity_build", {batchsize = 32})
add_files(
"3rdparty/uriparser/src/UriCommon.c",
"3rdparty/uriparser/src/UriCompare.c",
"3rdparty/uriparser/src/UriEscape.c",
"3rdparty/uriparser/src/UriFile.c",
"3rdparty/uriparser/src/UriIp4.c",
"3rdparty/uriparser/src/UriIp4Base.c",
"3rdparty/uriparser/src/UriNormalize.c",
"3rdparty/uriparser/src/UriNormalizeBase.c",
"3rdparty/uriparser/src/UriParse.c",
"3rdparty/uriparser/src/UriParseBase.c",
"3rdparty/uriparser/src/UriQuery.c",
"3rdparty/uriparser/src/UriRecompose.c",
"3rdparty/uriparser/src/UriResolve.c",
"3rdparty/uriparser/src/UriShorten.c",
"3rdparty/uriparser/src/UriMemory.c"
)
add_defines("URIPARSER_BUILD_CHAR", "URI_STATIC_BUILD", {public = true})
add_includedirs("3rdparty/uriparser/include", {public = true})
target("libdaScript")
set_kind("static")
set_optimize("fastest")
add_vectorexts("sse", "sse2")
if is_plat("windows") then
add_cxflags("/Zc:threadSafeInit", {public = true})
add_cxflags("/bigobj", {force = true})
add_defines("_CRT_SECURE_NO_WARNINGS", "NOMINMAX")
end
if is_mode("release") then
add_defines("DAS_FUSION=2", "NDEBUG=1", "DAS_DEBUGGER=0", {public = true})
elseif is_mode("releasedbg") then
add_defines("DAS_FUSION=1", "NDEBUG=1", "DAS_SMART_PTR_DEBUG=1", {public = true})
elseif is_mode("debug") then
end
add_deps("UriParser", {public = true})
add_includedirs("include", {public = true})
-- parser
add_files(
-- "src/parser/ds_parser.hpp",
"src/parser/ds_parser.cpp",
-- "src/parser/ds_parser.output",
-- "src/parser/lex.yy.h",
"src/parser/ds_lexer.cpp"
)
add_files(
-- "src/parser/ds_parser.ypp",
-- "src/parser/ds_lexer.lpp",
-- "src/parser/parser_state.h",
-- "src/parser/parser_impl.h"
"src/parser/parser_impl.cpp"
)
-- vecmath
-- add_files(
-- "include/vecmath/dag_vecMath.h",
-- "include/vecmath/dag_vecMathDecl.h",
-- "include/vecmath/dag_vecMath_common.h",
-- "include/vecmath/dag_vecMath_const.h",
-- "include/vecmath/dag_vecMath_neon.h",
-- "include/vecmath/dag_vecMath_pc_sse.h"
-- )
-- ast
add_files(
"src/ast/ast.cpp",
"src/ast/ast_tls.cpp",
"src/ast/ast_visitor.cpp",
"src/ast/ast_generate.cpp",
"src/ast/ast_simulate.cpp",
"src/ast/ast_typedecl.cpp",
"src/ast/ast_match.cpp",
"src/ast/ast_module.cpp",
"src/ast/ast_print.cpp",
"src/ast/ast_aot_cpp.cpp",
"src/ast/ast_infer_type.cpp",
"src/ast/ast_lint.cpp",
"src/ast/ast_allocate_stack.cpp",
"src/ast/ast_derive_alias.cpp",
"src/ast/ast_const_folding.cpp",
"src/ast/ast_block_folding.cpp",
"src/ast/ast_unused.cpp",
"src/ast/ast_annotations.cpp",
"src/ast/ast_export.cpp",
"src/ast/ast_parse.cpp",
"src/ast/ast_debug_info_helper.cpp",
"src/ast/ast_handle.cpp"
)
-- builtin
add_files(
"src/builtin/module_builtin.cpp",
"src/builtin/module_builtin_misc_types.cpp",
"src/builtin/module_builtin_runtime.cpp",
"src/builtin/module_builtin_runtime_sort.cpp",
"src/builtin/module_builtin_runtime_lockcheck.cpp",
"src/builtin/module_builtin_vector.cpp",
"src/builtin/module_builtin_vector_ctor.cpp",
"src/builtin/module_builtin_array.cpp",
"src/builtin/module_builtin_das.cpp",
"src/builtin/module_builtin_math.cpp",
"src/builtin/module_builtin_raster.cpp",
"src/builtin/module_builtin_string.cpp",
"src/builtin/module_builtin_rtti.cpp",
"src/builtin/module_builtin_ast.cpp",
"src/builtin/module_builtin_ast_flags.cpp",
"src/builtin/module_builtin_ast_annotations.cpp",
"src/builtin/module_builtin_ast_annotations_1.cpp",
"src/builtin/module_builtin_ast_annotations_2.cpp",
"src/builtin/module_builtin_ast_annotations_3.cpp",
"src/builtin/module_builtin_ast_adapters.cpp",
"src/builtin/module_builtin_uriparser.cpp",
"src/builtin/module_jit.cpp",
"src/builtin/module_builtin_fio.cpp",
"src/builtin/module_builtin_dasbind.cpp",
"src/builtin/module_builtin_network.cpp",
"src/builtin/module_builtin_debugger.cpp",
"src/builtin/module_builtin_jobque.cpp",
"src/builtin/module_file_access.cpp"
--"src/builtin/builtin.das.inc",
--"src/builtin/builtin.das",
--"src/builtin/fio.das.inc",
--"src/builtin/fio.das",
--"src/builtin/rtti.das.inc",
--"src/builtin/rtti.das",
--"src/builtin/ast.das.inc",
--"src/builtin/ast.das",
--"src/builtin/network.das.inc",
--"src/builtin/network.das",
--"src/builtin/debugger.das.inc",
--"src/builtin/debugger.das"
)
-- misc
add_files(
"src/misc/sysos.cpp",
"src/misc/string_writer.cpp",
"src/misc/memory_model.cpp",
"src/misc/job_que.cpp",
"src/misc/free_list.cpp",
"src/misc/daScriptC.cpp",
"src/misc/uric.cpp"
)
-- simulation fusion
add_files(
"src/simulate/simulate_fusion.cpp",
"src/simulate/simulate_fusion_op1.cpp",
"src/simulate/simulate_fusion_op1_return.cpp",
"src/simulate/simulate_fusion_ptrfdr.cpp",
"src/simulate/simulate_fusion_op2.cpp",
"src/simulate/simulate_fusion_op2_set.cpp",
"src/simulate/simulate_fusion_op2_bool.cpp",
"src/simulate/simulate_fusion_op2_bin.cpp",
"src/simulate/simulate_fusion_op2_vec.cpp",
"src/simulate/simulate_fusion_op2_set_vec.cpp",
"src/simulate/simulate_fusion_op2_bool_vec.cpp",
"src/simulate/simulate_fusion_op2_bin_vec.cpp",
"src/simulate/simulate_fusion_op2_scalar_vec.cpp",
"src/simulate/simulate_fusion_at.cpp",
"src/simulate/simulate_fusion_at_array.cpp",
"src/simulate/simulate_fusion_tableindex.cpp",
"src/simulate/simulate_fusion_misc_copy.cpp",
"src/simulate/simulate_fusion_call1.cpp",
"src/simulate/simulate_fusion_call2.cpp",
"src/simulate/simulate_fusion_if.cpp"
)
-- simulate src
add_files(
"src/hal/performance_time.cpp",
"src/hal/debug_break.cpp",
"src/hal/project_specific.cpp",
"src/hal/project_specific_file_info.cpp",
"src/misc/network.cpp",
"src/simulate/hash.cpp",
"src/simulate/debug_info.cpp",
"src/simulate/runtime_string.cpp",
"src/simulate/runtime_array.cpp",
"src/simulate/runtime_table.cpp",
"src/simulate/runtime_profile.cpp",
"src/simulate/simulate.cpp",
"src/simulate/simulate_exceptions.cpp",
"src/simulate/simulate_gc.cpp",
"src/simulate/simulate_tracking.cpp",
"src/simulate/simulate_visit.cpp",
"src/simulate/simulate_print.cpp",
"src/simulate/simulate_fn_hash.cpp",
"src/simulate/simulate_instrument.cpp",
"src/simulate/heap.cpp",
"src/simulate/data_walker.cpp",
"src/simulate/debug_print.cpp",
"src/simulate/bin_serializer.cpp",
"src/simulate/fs_file_info.cpp"
)
-- test src
add_files(
"examples/test/test_handles.cpp",
"examples/test/test_enum.cpp"
)
target("daScript")
set_kind("binary")
add_deps("libdaScript")
add_files("utils/daScript/main.cpp")
target("nano-test")
set_kind("binary")
add_deps("libdaScript")
add_files("examples/tutorial/tutorial00.cpp")