Skip to content
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
11 changes: 8 additions & 3 deletions binaryen.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: binaryen
version: "118"
version: "119"
epoch: 0
description: Optimizer and compiler/toolchain library for WebAssembly
copyright:
Expand All @@ -25,7 +25,11 @@ pipeline:
with:
repository: https://github.com/webassembly/binaryen
tag: version_${{package.version}}
expected-commit: 4179603f8c21f5676cf4826ec4e41a1513c41540
expected-commit: 5fca52781efe63c1683c436cb0c5e08cc4a87b9e

- uses: patch
with:
patches: gcc-14-Wmaybe-uninitialized.patch

- uses: cmake/configure
with:
Expand All @@ -35,7 +39,8 @@ pipeline:
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=20
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON

- uses: cmake/build

Expand Down
36 changes: 36 additions & 0 deletions binaryen/gcc-14-Wmaybe-uninitialized.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
commit 8064d12129c92209ecd08461adf41918b21263e4
Author: Scott Moser <[email protected]>
Date: Fri Sep 6 19:44:49 2024 +0000

Fix building on gcc-14.

I'm able to get this to build on gcc-14 with
this change and CXX_FLAGS containing all of the following:

-Wno-error=maybe-uninitialized
-Wno-error=conversion
-Wno-error=float-conversion
-Wno-error=format-nonliteral

diff --git a/src/parser/wat-parser.h b/src/parser/wat-parser.h
index 041ba1d58..0bfb829cb 100644
--- a/src/parser/wat-parser.h
+++ b/src/parser/wat-parser.h
@@ -34,12 +34,17 @@ Result<> parseModule(Module& wasm, Lexer& lexer);

Result<Literal> parseConst(Lexer& lexer);

+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+
struct InvokeAction {
std::optional<Name> base;
Name name;
Literals args;
};

+#pragma GCC diagnostic pop
+
struct GetAction {
std::optional<Name> base;
Name name;