-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathcompile-flags.cmake
More file actions
26 lines (23 loc) · 924 Bytes
/
compile-flags.cmake
File metadata and controls
26 lines (23 loc) · 924 Bytes
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
set(WASI 1)
set(CMAKE_CXX_STANDARD 20)
add_compile_definitions("$<$<CONFIG:DEBUG>:DEBUG=1>")
list(APPEND CMAKE_EXE_LINKER_FLAGS
-Wl,-z,stack-size=1048576 -Wl,--stack-first
-mexec-model=reactor
-lwasi-emulated-signal
-lwasi-emulated-process-clocks
-lwasi-emulated-getpid
)
list(JOIN CMAKE_EXE_LINKER_FLAGS " " CMAKE_EXE_LINKER_FLAGS)
list(APPEND CMAKE_CXX_FLAGS
-std=gnu++20 -Wall -Werror -Qunused-arguments -Wimplicit-fallthrough -Wno-unknown-warning-option
-fno-sized-deallocation -fno-aligned-new -mthread-model single
-fPIC -fno-rtti -fno-exceptions -fno-math-errno -pipe
-fno-omit-frame-pointer -funwind-tables -m32
)
list(JOIN CMAKE_CXX_FLAGS " " CMAKE_CXX_FLAGS)
list(APPEND CMAKE_C_FLAGS
-Wall -Werror -Wno-unknown-attributes -Wno-pointer-to-int-cast
-Wno-int-to-pointer-cast -m32
)
list(JOIN CMAKE_C_FLAGS " " CMAKE_C_FLAGS)