File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,18 @@ jobs:
31
31
wget --no-verbose https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${{matrix.wasi_sdk_version}}/wasi-sdk-${{matrix.wasi_sdk_version}}.0-linux.tar.gz
32
32
tar xf wasi-sdk-${{matrix.wasi_sdk_version}}.0-linux.tar.gz
33
33
34
+ # Building a wasm library without needing to define a main():
35
+ # https://github.com/WebAssembly/wasi-sdk/issues/332
36
+ - name : Modify CMakeLists.txt for WASI
37
+ run : |
38
+ echo 'if (CMAKE_SYSTEM_NAME STREQUAL "WASI")' >> CMakeLists.txt
39
+ echo ' target_link_options(${PROJECT_NAME} PRIVATE -mexec-model=reactor)' >> CMakeLists.txt
40
+ echo 'endif()' >> CMakeLists.txt
41
+
34
42
- name : Configure CMake
35
43
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
36
44
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
37
- # Building a wasm library without needing to define a main():
38
- # https://github.com/WebAssembly/wasi-sdk/issues/332
39
- run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DCMAKE_C_FLAGS="${{matrix.C_FLAGS}}" -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/wasi-sdk-${{matrix.wasi_sdk_version}}.0/share/cmake/wasi-sdk.cmake -DWASI_SDK_PREFIX=${{github.workspace}}/wasi-sdk-${{matrix.wasi_sdk_version}}.0 -DCMAKE_EXE_LINKER_FLAGS="-mexec-model=reactor" -DCGLM_USE_TEST=ON
45
+ run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DCMAKE_C_FLAGS="${{matrix.C_FLAGS}}" -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/wasi-sdk-${{matrix.wasi_sdk_version}}.0/share/cmake/wasi-sdk.cmake -DWASI_SDK_PREFIX=${{github.workspace}}/wasi-sdk-${{matrix.wasi_sdk_version}}.0 -DCGLM_USE_TEST=ON
40
46
41
47
- name : Build
42
48
# Build your program with the given configuration
You can’t perform that action at this time.
0 commit comments