Skip to content

Compilation: strip debug info from ReleaseSmall by default #13067

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 1 commit into from
Oct 11, 2022

Conversation

alichraghi
Copy link
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

@wooster0
Copy link
Contributor

wooster0 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
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
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
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
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
4 participants