summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt3
-rw-r--r--src/tools/CMakeLists.txt8
2 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b2fc00c04..05d0a9645 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,6 +40,9 @@ option(BUILD_TOOLS "Build tools" ON)
# Turn this off to install only tools and not static/dynamic libs
option(INSTALL_LIBS "Install libraries" ON)
+# Turn this on to build only the subset of tools needed for emscripten
+option(BUILD_EMSCRIPTEN_TOOLS_ONLY "Build only tools needed by emscripten" OFF)
+
# Turn this on to build binaryen.js as ES5, with additional compatibility configuration for js_of_ocaml.
option(JS_OF_OCAML "Build binaryen.js for js_of_ocaml" OFF)
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
index 7953eeeca..943479923 100644
--- a/src/tools/CMakeLists.txt
+++ b/src/tools/CMakeLists.txt
@@ -8,14 +8,16 @@ set(fuzzing_SOURCES
)
binaryen_add_executable(wasm-opt "${fuzzing_SOURCES};wasm-opt.cpp")
-binaryen_add_executable(wasm-shell wasm-shell.cpp)
binaryen_add_executable(wasm-metadce wasm-metadce.cpp)
binaryen_add_executable(wasm2js wasm2js.cpp)
binaryen_add_executable(wasm-emscripten-finalize wasm-emscripten-finalize.cpp)
binaryen_add_executable(wasm-as wasm-as.cpp)
binaryen_add_executable(wasm-dis wasm-dis.cpp)
binaryen_add_executable(wasm-ctor-eval wasm-ctor-eval.cpp)
-binaryen_add_executable(wasm-reduce wasm-reduce.cpp)
-binaryen_add_executable(wasm-fuzz-types "${fuzzing_SOURCES};wasm-fuzz-types.cpp")
+if(NOT BUILD_EMSCRIPTEN_TOOLS_ONLY)
+ binaryen_add_executable(wasm-shell wasm-shell.cpp)
+ binaryen_add_executable(wasm-reduce wasm-reduce.cpp)
+ binaryen_add_executable(wasm-fuzz-types "${fuzzing_SOURCES};wasm-fuzz-types.cpp")
+endif()
add_subdirectory(wasm-split)