Skip to content

Commit 80576c7

Browse files
authored
c-api: use --release when MinSizeRel and RelWithDebInfo is used (bytecodealliance#8549)
1 parent b617d50 commit 80576c7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/c-api/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ set(WASMTIME_USER_CARGO_BUILD_OPTIONS "" CACHE STRING "Additional cargo flags (s
55
option(BUILD_SHARED_LIBS "Build using shared libraries" OFF)
66
option(WASMTIME_ALWAYS_BUILD "If cmake should always invoke cargo to build wasmtime" ON)
77

8-
if(CMAKE_BUILD_TYPE STREQUAL "Release")
8+
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR
9+
CMAKE_BUILD_TYPE STREQUAL "MinSizeRel" OR
10+
CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"
11+
)
912
set(WASMTIME_BUILD_TYPE_FLAG "--release")
1013
set(WASMTIME_BUILD_TYPE "release")
1114
else()

0 commit comments

Comments
 (0)