Skip to content

Compilation: strip debug info from ReleaseSmall by default#13067

Merged
Vexu merged 1 commit into
ziglang:masterfrom
alichraghi:o0
Oct 11, 2022
Merged

Compilation: strip debug info from ReleaseSmall by default#13067
Vexu merged 1 commit into
ziglang:masterfrom
alichraghi:o0

Conversation

@alichraghi
Copy link
Copy Markdown
Contributor

Closes #6676

ali@linux ~/d/zig (o0)> build/zig2 build-exe z.zig -O ReleaseSmall
ali@linux ~/d/zig (o0)> ls -lha ./z ./z.o
-rwxr-xr-x 1 ali ali 8.5K Oct  4 17:52 ./z*
-rw-r--r-- 1 ali ali  12K Oct  4 17:52 ./z.o
ali@linux ~/d/zig (o0)> build/zig2 build-exe z.zig -O ReleaseSmall --strip
ali@linux ~/d/zig (o0)> ls -lha ./z ./z.o
-rwxr-xr-x 1 ali ali 8.5K Oct  4 17:52 ./z*
-rw-r--r-- 1 ali ali  12K Oct  4 17:52 ./z.o
ali@linux ~/d/zig (o0)> build/zig2 build-exe z.zig -O ReleaseSmall --no-strip
ali@linux ~/d/zig (o0)> ls -lha ./z ./z.o
-rwxr-xr-x 1 ali ali 426K Oct  4 17:53 ./z*
-rw-r--r-- 1 ali ali 729K Oct  4 17:53 ./z.o
ali@linux ~/d/zig (o0)> build/zig2 build-exe z.zig
ali@linux ~/d/zig (o0)> ls -lha ./z ./z.o
-rwxr-xr-x 1 ali ali 976K Oct  4 17:53 ./z*
-rw-r--r-- 1 ali ali 1.4M Oct  4 17:53 ./z.o

Comment thread src/main.zig Outdated
@ghost
Copy link
Copy Markdown

ghost commented Oct 4, 2022

Also, Andrew suggested -fstrip and -fno-strip instead of --strip and --no-strip (#6676 (comment)); have you considered that?

@alichraghi
Copy link
Copy Markdown
Contributor Author

thanks. i missed that

@alichraghi alichraghi force-pushed the o0 branch 6 times, most recently from afc4467 to 9ad28a1 Compare October 5, 2022 16:52
@alichraghi
Copy link
Copy Markdown
Contributor Author

alichraghi commented Oct 5, 2022

Now, will it make sense to disable strip by default for zig test or zig build test?
* by "default", i mean it's null so it get enabled in ReleaseSmall

@Vexu Vexu merged commit d086b37 into ziglang:master Oct 11, 2022
@Vexu
Copy link
Copy Markdown
Member

Vexu commented Oct 11, 2022

Whoops, looks like the Windows failure wasn't spurious but caused by a need for a new tarball (sigh). #13055 also needs one so maybe these two should be handled together.

@Luukdegram
Copy link
Copy Markdown
Contributor

Looks like this also caused the CI to error out for the linker test for the 'producers' section.
Fixed this in 8635c18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

strip debug info from ReleaseSmall builds by default

3 participants