Skip to content

[CI] Add a no-asserts build #7611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,23 @@ jobs:
run: |
python check.py --binaryen-bin=out/bin lit
python check.py --binaryen-bin=out/bin gtest

# Ensures we can build in no-asserts mode (just building).
build-noasserts:
name: noasserts
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: actions/checkout@v4
with:
submodules: true
- name: install ninja
run: sudo apt-get install ninja-build
- name: cmake
run: |
mkdir -p out
cmake -S . -B out -G Ninja -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DBYN_ENABLE_ASSERTIONS=OFF
- name: build
run: cmake --build out -v
2 changes: 1 addition & 1 deletion src/tools/wasm-reduce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ struct Reducer
return maxSkip > 2;
}

void visitModule(Module* curr) {
void visitModule([[maybe_unused]] Module* curr) {
// The initial module given to us is our global object. As we continue to
// process things here, we may replace the module, so we should never again
// refer to curr.
Expand Down
2 changes: 1 addition & 1 deletion src/wasm/wasm-binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ void WasmBinaryWriter::writeNames() {
auto substart =
startSubsection(BinaryConsts::CustomSections::Subsection::NameLocal);
o << U32LEB(functionsWithLocalNames.size());
Index emitted = 0;
[[maybe_unused]] Index emitted = 0;
for (auto& [index, func] : functionsWithLocalNames) {
// Pairs of (local index in IR, name).
std::vector<std::pair<Index, Name>> localsWithNames;
Expand Down
Loading