Open zmodem opened 8 years ago
You're right, osx-ld64-live_support
(which should maybe be renamed to macos-ld64-live_support
) checks the system version instead of checking the linker version, which could be parsed out of ld -v
. I'll try to address this.
Note that AddressSanitizerModule::ShouldUseMachOGlobalsSection
doesn't quite do it correctly either; it bases the decision off of the target OS version, whereas it should use the linker version. However I don't know of a performant way to ask the linker whether it supports the feature. This causes false negatives and we end up falling back when we don't need to (when targeting an earlier OS).
I have removed the test from 3.9 in r278427 to unblock 3.9.
I think this is about the SDK versus OS version. The dead-strip.c
test has a
// REQUIRES: osx-ld64-live_support
line, which is gated on sw_vers -productVersion
being >= 10.11
.
But on my machine, lit runs the tests with:
lit.py: util.py:254: note: using SDKROOT: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk'
With that in the environment, Clang invokes cc1
with:
"-macosx_version_min" "10.10.0"
Which in turn means lib/Transforms/Instrumentation/AddressSanitizer.cpp
's AddressSanitizerModule::ShouldUseMachOGlobalsSection()
will return false
.
Extended Description
These two tests always fail on my Mac, both on trunk and 3.9.
They are the only two tests failing when testing the 3.9 release.