Skip to content

Commit

Permalink
CI: Build the full slang-wasm.[js|wasm] targets instead of just the s…
Browse files Browse the repository at this point in the history
…lang library.

A recent build breakage for slang-wasm.[js|wasm] was not noticed by CI since it built the
slang library target instead of the slang-wasm.js "executable" target.
(We added a that used objcopy to split debug info from executables. objcopy does not
report errors when it finds object files with unexpected format inside static libraries,
but it *does* report errors when it's run on an exceutable of unexpected format, such as
in the case of slang-wasm.js.)

This closes #5959.
  • Loading branch information
aleino-nv committed Jan 3, 2025
1 parent 39ba1fb commit 007105a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ jobs:
- name: Build Slang
if: steps.filter.outputs.should-run == 'true'
run: |
set -e
if [[ "${{ matrix.platform }}" = "wasm" ]]; then
git clone https://github.com/emscripten-core/emsdk.git
pushd emsdk
Expand All @@ -125,10 +126,9 @@ jobs:
mkdir generators
cmake --install build --prefix generators --component generators
emcmake cmake -DSLANG_GENERATORS_PATH=generators/bin --preset emscripten -DSLANG_SLANG_LLVM_FLAVOR=DISABLE
cmake --build --preset emscripten --config "$cmake_config" --target slang
[ -f "build.em/$cmake_config/lib/libslang.a" ]
[ -f "build.em/$cmake_config/lib/libcompiler-core.a" ]
[ -f "build.em/$cmake_config/lib/libcore.a" ]
cmake --build --preset emscripten --config "$cmake_config" --target slang-wasm
[ -f "build.em/$cmake_config/bin/slang-wasm.wasm" ]
[ -f "build.em/$cmake_config/bin/slang-wasm.js" ]
else
if [[ "${{ matrix.os }}" =~ "windows" && "${{ matrix.config }}" != "release" && "${{ matrix.config }}" != "releaseWithDebugInfo" ]]; then
# Doing a debug build will try to link against a release built llvm, this
Expand Down

0 comments on commit 007105a

Please sign in to comment.