Skip to content

Commit f5b7418

Browse files
authored
force wamrc debug build using release version of dependent libs on Windows (#4496)
1 parent e1ba1dd commit f5b7418

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

build-scripts/config_common.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ if (WAMR_BUILD_JIT EQUAL 1)
9999
# Enable Lazy JIT by default
100100
set (WAMR_BUILD_LAZY_JIT 1)
101101
endif ()
102+
103+
# In Debug mode, always use release builds of pre-built dependency libraries
104+
if (WAMR_BUILD_PLATFORM STREQUAL "windows" AND MSVC)
105+
add_compile_options($<$<CONFIG:Debug>:/MD>)
106+
endif()
107+
102108
if (NOT DEFINED LLVM_DIR)
103109
set (LLVM_SRC_ROOT "${WAMR_ROOT_DIR}/core/deps/llvm")
104110
set (LLVM_BUILD_ROOT "${LLVM_SRC_ROOT}/build")

wamr-compiler/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@ if (WAMR_BUILD_DEBUG_AOT EQUAL 1)
159159
endif()
160160

161161
# Enable LLVM
162+
# In Debug mode, always use release builds of pre-built dependency libraries
163+
if (WAMR_BUILD_PLATFORM STREQUAL "windows" AND MSVC)
164+
add_compile_options($<$<CONFIG:Debug>:/MD>)
165+
endif()
166+
162167
if (NOT WAMR_BUILD_WITH_CUSTOM_LLVM)
163168
set (LLVM_SRC_ROOT "${PROJECT_SOURCE_DIR}/../core/deps/llvm")
164169
if (NOT EXISTS "${LLVM_SRC_ROOT}/build")

0 commit comments

Comments
 (0)