gh-109575: Don't export -fsanitize compiler options#109576
Conversation
|
On the main branch, with the bug: With the fix, the flags are not longer exported: |
Sorry, something went wrong.
Sorry, something went wrong.
3ee7830 to
5d039d7
Compare
September 19, 2023 15:37
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
September 19, 2023 15:39
|
Test PY_LDFLAGS_NOLTO on building Logs:
|
Sorry, something went wrong.
|
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) |
Sorry, something went wrong.
|
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! |
Sorry, something went wrong.
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.