Skip to content

Commit 0eaad8c

Browse files
committed
Add TOYWASM_EXTRA_CFLAGS
1 parent 3d5bd17 commit 0eaad8c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/ToywasmConfig.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ option(TOYWASM_ENABLE_COVERAGE "Enable coverage" OFF)
185185
option(TOYWASM_BUILD_UNITTEST "Build toywasm-test" ON)
186186
option(TOYWASM_BUILD_CLI "Build toywasm command" ON)
187187

188+
# Extra CFLAGS. intended for -mcpu=xxx etc.
189+
# eg. -D TOYWASM_EXTRA_CFLAGS="-mfoo;-mbar"
190+
set(TOYWASM_EXTRA_CFLAGS "" CACHE STRING "Extra CFLAGS")
191+
add_compile_options(${TOYWASM_EXTRA_CFLAGS})
192+
188193
if(TOYWASM_ENABLE_FUZZER)
189194
add_compile_options(-fsanitize=fuzzer-no-link)
190195
# https://llvm.org/docs/LibFuzzer.html#fuzzer-friendly-build-mode

0 commit comments

Comments
 (0)