-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmeson.build
34 lines (30 loc) · 891 Bytes
/
meson.build
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
project('s7-playground', 'c',
default_options: ['default_library=static']
)
s7 = subproject('s7')
s7_dep = s7.get_variable('s7_dep')
if meson.is_cross_build()
# building for wasm
# Note:
# Options can be specified as a single argument without a space
# between the "-s" and option name. e.g. "-sFOO=1".
executable('s7_wasm',
# sources,
'src/s7_wasm.c',
dependencies: [s7_dep],
c_args: [
# note: this is called when compiling the c files to object files
],
link_args: [
# this is the second pass, emcc -o s7_wasm.js ...
'-sEXTRA_EXPORTED_RUNTIME_METHODS=["ccall"]',
'-sEXPORTED_FUNCTIONS=["_main", "_eval_string", "_get_out", "_get_err"]',
],
name_suffix: 'js')
endif
if not meson.is_cross_build()
executable('repl',
'src/repl.c',
dependencies: s7_dep,
)
endif