Skip to content

Commit ddf32ad

Browse files
committed
changed toolchain
1 parent 11d3eb6 commit ddf32ad

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

CMakeLists.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ set(SNMALLOC_STATIC_LIBRARY_PREFIX "sn_" CACHE STRING "Static library function p
2828

2929
if(ENABLE_WASI)
3030

31-
set( COMPILER_BIN /opt/wasi-sdk/bin)
31+
set( COMPILER_BIN /usr/local/vwasm/toolchain/bin)
32+
set( WASM_SYSROOT /usr/local/vwasm/llvm-sysroot)
33+
3234
set( CMAKE_C_COMPILER ${COMPILER_BIN}/clang CACHE PATH "clang" FORCE )
3335
set( CMAKE_CXX_COMPILER ${COMPILER_BIN}/clang++ CACHE PATH "clang++" FORCE )
3436
set( CMAKE_AR ${COMPILER_BIN}/llvm-ar CACHE PATH "llvm-ar" FORCE )
@@ -102,11 +104,11 @@ endmacro()
102104
# The main target for snmalloc
103105
add_library(snmalloc_lib INTERFACE)
104106
target_include_directories(snmalloc_lib INTERFACE src/)
105-
add_compile_options(--target=wasm32-wasi -fno-trapping-math --sysroot=/opt/wasi-sdk -nostdinc++ -nostdinc )#-nostdinc++
107+
add_compile_options(--target=wasm32-wasi -fno-trapping-math --sysroot=${WASM_SYSROOT} -fno-exceptions)#-nostdinc++ -nostdinc
106108

107109
#/opt/wasi-sdk/share/wasi-sysroot/include/c++/v1/
108110
#${MUSL_INCLUDES}
109-
target_include_directories(snmalloc_lib INTERFACE /opt/wasi-sdk/share/wasi-sysroot/include/c++/v1/ /opt/wasi-sdk/share/wasi-sysroot/include /opt/wasi-sdk/lib/clang/10.0.0/include/)
111+
#target_include_directories(snmalloc_lib INTERFACE /opt/wasi-sdk/share/wasi-sysroot/include/c++/v1/ /opt/wasi-sdk/share/wasi-sysroot/include )
110112

111113

112114

0 commit comments

Comments
 (0)