diff options
author | David Robillard <d@drobilla.net> | 2020-11-11 01:06:00 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-11 01:06:00 +0100 |
commit | d19992202543ebb810609c074f754b5ec48c0fd7 (patch) | |
tree | 2a186389b64fe7b86dc3d51d6df43f207624caf4 | |
parent | 562dca2de607d81bfad78ed2d3901abca302c517 (diff) | |
download | autowaf-d19992202543ebb810609c074f754b5ec48c0fd7.tar.gz autowaf-d19992202543ebb810609c074f754b5ec48c0fd7.tar.bz2 autowaf-d19992202543ebb810609c074f754b5ec48c0fd7.zip |
Don't add Wl,--no-undefined when using sanitizers
This causes linker errors at runtime.
-rw-r--r-- | extras/autowaf.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/extras/autowaf.py b/extras/autowaf.py index 01d6503..e528fdd 100644 --- a/extras/autowaf.py +++ b/extras/autowaf.py @@ -572,7 +572,14 @@ def configure(conf): conf.env.append_value('LINKFLAGS', '/nologo') elif Options.options.strict: if conf.env.DEST_OS != "darwin": - conf.env.append_value('LINKFLAGS', ['-Wl,--no-undefined']) + sanitizing = False + for f in conf.env.LINKFLAGS: + if f.startswith('-fsanitize'): + sanitizing = True + break; + + if not sanitizing: + conf.env.append_value('LINKFLAGS', ['-Wl,--no-undefined']) # Add less universal flags after checking they work extra_flags = ['-Wlogical-op', |