-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-109575: Don't export -fsanitize compiler options #109576
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
Conversation
On the main branch, with the bug:
With the fix, the flags are not longer exported:
|
3ee7830
to
5d039d7
Compare
When Python is configured to use ASAN, MSAN or UBSAN sanitizer, with "./configure --with-address-sanitizer" for example, compiler and linker flags for sanitizers are no longer exported to third party C extensions. Add flags to CFLAGS_NODIST and LDFLAGS_NODIST, instead of BASECFLAGS and LDFLAGS. Makefile.pre.in: PY_LDFLAGS_NOLTO now uses PY_LDFLAGS_NODIST, instead of LDFLAGS_NODIST, and add CONFIGURE_LDFLAGS_NOLTO after PY_LDFLAGS_NODIST.
5d039d7
to
a9da37c
Compare
Test PY_LDFLAGS_NOLTO on building
Logs:
|
this change makes sense if we want to do this. it wasn't clear what "right" behavior was to me for this, see my comment on the Issue. (i'm happy either way myself) |
I thought that it was a mistake, but apparently, some people actually want this behavior. I'm mostly using ASAN, but for ASAN, it seems to be the expected behavior. So I just close my PR :-) If someone wants to adjust the code for other sanitizers, please go ahead! |
When Python is configured to use ASAN, MSAN or UBSAN sanitizer, with "./configure --with-address-sanitizer" for example, compiler and linker flags for sanitizers are no longer exported to third party C extensions. Add flags to CFLAGS_NODIST and LDFLAGS_NODIST, instead of BASECFLAGS and LDFLAGS.
Makefile.pre.in: PY_LDFLAGS_NOLTO now uses PY_LDFLAGS_NODIST, instead of LDFLAGS_NODIST, and add CONFIGURE_LDFLAGS_NOLTO after PY_LDFLAGS_NODIST.