File tree Expand file tree Collapse file tree 2 files changed +64
-1
lines changed Expand file tree Collapse file tree 2 files changed +64
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : release-static
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - " *"
7
+ workflow_dispatch :
8
+
9
+ jobs :
10
+ release-static :
11
+ name : release-x86_64-linux-static
12
+ runs-on : ubuntu-24.04
13
+ steps :
14
+
15
+ - name : system-deps
16
+ run : |
17
+ sudo apt install -y \
18
+ ninja-build
19
+
20
+ - name : checkout
21
+ uses : actions/checkout@v4
22
+
23
+ - name : checkout-submodules
24
+ run : git submodule update --init --depth 1 --jobs 2
25
+
26
+ - name : build
27
+ run : |
28
+ cmake \
29
+ -Bbuild \
30
+ -G Ninja \
31
+ -DCMAKE_BUILD_TYPE=Release \
32
+ -DCMAKE_INSTALL_PREFIX="/tmp/binaryen-$GITHUB_REF_NAME" \
33
+ -DCMAKE_EXE_LINKER_FLAGS="-s -static" \
34
+ -DBUILD_STATIC_LIB=ON \
35
+ -DENABLE_WERROR=OFF \
36
+ -DINSTALL_LIBS=OFF
37
+
38
+ cmake --build build --target install -- -v
39
+
40
+ tar \
41
+ --sort=name \
42
+ --owner=0 \
43
+ --group=0 \
44
+ --numeric-owner \
45
+ -czf "binaryen-$GITHUB_REF_NAME-x86_64-linux-static.tar.gz" \
46
+ -C /tmp \
47
+ "binaryen-$GITHUB_REF_NAME"
48
+
49
+ - name : upload-artifact
50
+ uses : actions/upload-artifact@v4
51
+ with :
52
+ name : binaryen-x86_64-linux-static
53
+ path : binaryen-*-x86_64-linux-static.tar.gz
54
+
55
+ - name : test
56
+ run : |
57
+ VENV_PATH=$(mktemp -d)
58
+ python3 -m venv $VENV_PATH
59
+ source $VENV_PATH/bin/activate
60
+
61
+ pip3 install -r requirements-dev.txt
62
+
63
+ COMPILER_FLAGS="-s -static" ./check.py --binaryen-bin build/bin --binaryen-lib build/lib
Original file line number Diff line number Diff line change @@ -309,7 +309,7 @@ else()
309
309
else ()
310
310
add_link_flag ("-Wl,--stack,8388608" )
311
311
endif ()
312
- elseif (NOT EMSCRIPTEN )
312
+ elseif (( NOT EMSCRIPTEN ) AND ( NOT BUILD_STATIC_LIB ) )
313
313
add_compile_flag ("-fPIC" )
314
314
endif ()
315
315
add_debug_compile_flag ("-g3" )
You can’t perform that action at this time.
0 commit comments