Skip to content

Commit 1a5e5be

Browse files
authored
Merge pull request #352 from Yubico/dennisdyallo/zig-glibc
build(linux): Optimize Zig compiler wrappers by adding optimization flags
2 parents 06315b3 + 89c8a0a commit 1a5e5be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/build-nativeshims.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ jobs:
114114
# Create x86_64 C compiler wrapper
115115
cat > $HOME/zig-wrappers/zig-cc << 'EOF'
116116
#!/bin/bash
117-
exec zig cc -target x86_64-linux-gnu.2.23 "$@"
117+
exec zig cc -target x86_64-linux-gnu.2.23 -O2 -s "$@"
118118
EOF
119119
120120
# Create x86_64 C++ compiler wrapper
121121
cat > $HOME/zig-wrappers/zig-c++ << 'EOF'
122122
#!/bin/bash
123-
exec zig c++ -target x86_64-linux-gnu.2.23 "$@"
123+
exec zig c++ -target x86_64-linux-gnu.2.23 -O2 -s "$@"
124124
EOF
125125
126126
chmod +x $HOME/zig-wrappers/zig-cc
@@ -264,13 +264,13 @@ jobs:
264264
# Create aarch64 C compiler wrapper
265265
cat > $HOME/zig-wrappers/zig-cc << 'EOF'
266266
#!/bin/bash
267-
exec zig cc -target aarch64-linux-gnu.2.23 "$@"
267+
exec zig cc -target aarch64-linux-gnu.2.23 -O2 -s "$@"
268268
EOF
269269
270270
# Create aarch64 C++ compiler wrapper
271271
cat > $HOME/zig-wrappers/zig-c++ << 'EOF'
272272
#!/bin/bash
273-
exec zig c++ -target aarch64-linux-gnu.2.23 "$@"
273+
exec zig c++ -target aarch64-linux-gnu.2.23 -O2 -s "$@"
274274
EOF
275275
276276
chmod +x $HOME/zig-wrappers/zig-cc

0 commit comments

Comments
 (0)