From 69f6235c36ebf87a700341a78bcf38a32c752b29 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 2 Dec 2022 15:32:24 -0800 Subject: Add CMake option to only build tools needed for Emscripten (#5319) This helps cut the size and build time of the emsdk package. --- src/tools/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') 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) -- cgit v1.2.3