-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
BLD: Try g0 on macos? #51971
BLD: Try g0 on macos? #51971
Conversation
Is the issue still seeing debug symbols on macOS? I think there is a Darwin option for |
Doesn't Apple use clang nowadays? In the logs, I'm seeing a |
I'm not sure who's passing it though. |
Yea AFAIK the APIs between the two are supposed to be similar, but I didn't see any documentation for what clang has on gused |
Yea I think that is true. The GCC documentation for options is really good and thorough. This also confirms that https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#Debugging-Options |
Where in the logs do you see -g showing up? I must be looking in the wrong places. If I had to guess it's something conda might be adding for us. I think Ralf pointed that out on the meson PR, which was pretty enlightening. |
Wheels are built with cibuildwheel(uses the GHA python's and sometimes Docker on Linux), so there's absolutely no conda involved right now. Right now what's really infuriating me is that, even though I'm passing -g0 via CFLAGS, it is somehow showing up as -g, and I'm not sure what I'm doing wrong.
Here is an example command. The second You can find this by ctrl+f for gcc in the logs. |
Well, I'm just being stupid. It turns out I was overriding the cibuildwheel environment vars for macos 🤦. |
@@ -166,7 +166,7 @@ test-command = "" | |||
# macOS doesn't support stripping wheels with linker | |||
# https://github.com/MacPython/numpy-wheels/pull/87#issuecomment-624878264 | |||
select = "*-macosx*" | |||
environment = "" | |||
environment = {CFLAGS="-g0"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice find. a bit orthogonal but wonder if we should strip all symbols here too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guess it would help if I read the comment two lines up
I think I got the macOS symbols as well now. Savings are on par with what you mentioned Savings are currently 0.4 MB compressed for the x86_64 wheel, and 0.2 MB for the arm64 wheel. If you'd like to check one of the wheels yourself, here is a link to one of the wheels |
Thanks @lithomas1 |
Thanks so much again for the quick resolution on this! I just pulled those wheels from the link you provided... don't see debug symbols in either of them 🎉 If it interests you... I originally found these debug symbols (#51900) using a side-project I've been working on since last year's SciPy conference: https://github.com/jameslamb/pydistcheck. It's intended to be a CLI you run against wheels and sdists in CI, to catch issues like this (click here for a full list of what it checks) and ensure that changes to your build process don't introduce regressions like letting the debug symbols back in. Anyway, cheers and enjoy the rest of your week 👋🏻 |
Backport PR #51971: BLD: Try g0 on macos? Co-authored-by: Thomas Li <[email protected]>
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.