summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-03-12 15:11:36 -0700
committerGitHub <noreply@github.com>2024-03-12 15:11:36 -0700
commitf3eceb763541524e439e2c5fb607dbe1b603e4c7 (patch)
treed6a137dc9bbe44bb698ba41b30ae0e33a3923afc
parentb671b6ce2ccbff5e1b735293bcf7fe94a5b65971 (diff)
downloadbinaryen-f3eceb763541524e439e2c5fb607dbe1b603e4c7.tar.gz
binaryen-f3eceb763541524e439e2c5fb607dbe1b603e4c7.tar.bz2
binaryen-f3eceb763541524e439e2c5fb607dbe1b603e4c7.zip
Fix Emscripten build with -Wno-unused-command-line-argument (#6392)
Emscripten had started complaining about the repeated NODERAWFS arguments in the link command, but they would be nontrivial to deduplicate.
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d86f4c30c..3a8af137c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -366,7 +366,7 @@ if(EMSCRIPTEN)
add_link_flag("-sMODULARIZE")
add_link_flag("-sEXPORT_ES6")
add_link_flag("-sFILESYSTEM")
- add_link_flag("-sFORCE_FILESYSTEM")
+ add_link_flag("-sFORCE_FILESYSTEM")
else()
# On Node.js, make the tools immediately usable.
add_link_flag("-sNODERAWFS")
@@ -474,6 +474,8 @@ if(EMSCRIPTEN)
target_link_libraries(binaryen_wasm "-sFILESYSTEM")
target_link_libraries(binaryen_wasm "-sEXPORT_NAME=Binaryen")
target_link_libraries(binaryen_wasm "-sNODERAWFS=0")
+ # Do not error on the repeated NODERAWFS argument
+ target_link_libraries(binaryen_wasm "-Wno-unused-command-line-argument")
# Emit a single file for convenience of people using binaryen.js as a library,
# so they only need to distribute a single file.
target_link_libraries(binaryen_wasm "-sSINGLE_FILE")
@@ -509,6 +511,8 @@ if(EMSCRIPTEN)
target_link_libraries(binaryen_js "-sFILESYSTEM=1")
endif()
target_link_libraries(binaryen_js "-sNODERAWFS=0")
+ # Do not error on the repeated NODERAWFS argument
+ target_link_libraries(binaryen_js "-Wno-unused-command-line-argument")
target_link_libraries(binaryen_js "-sSINGLE_FILE")
target_link_libraries(binaryen_js "-sEXPORT_NAME=Binaryen")
# Currently, js_of_ocaml can only process ES5 code