This is an archive of the discontinued LLVM Phabricator instance.

[Compiler-RT] For arm64e test suites use the SDK version as the minimum deployment target.
AbandonedPublic

Authored by delcypher on Sep 15 2021, 11:28 AM.

Details

Summary

Previously we used the minimum deployment target used for the platform
(e.g. iOS is 9.0). Unfortunately this leads to ABI incompatibilities with
arm64e devices running newer OSs. In particular the following TSan test
cases that used libcxx would fail due to the ABI mismatch.

  • Darwin/libcxx-shared-ptr-recursive.mm
  • Darwin/libcxx-shared-ptr-stress.mm
  • Darwin/libcxx-shared-ptr.mm
  • libcxx/std_shared_ptr.cpp

Given that arm64e is not ABI stable we should ideally match the
deployment target for sanitizer runtimes and their tests cases to the
device when building for arm64e. Unfortunately having a mixed deployment
target (based on architecture) isn't currently supported by the build system
and is non-trivial to implement.

As a stop-gap measure this patch changes the sanitizer test suites (but not the
sanitizer runtimes themselves) to use a newer deployment target when
targetting arm64e.

The deployment target used for arm64e is the SDK version because this
"should" match the OS version running on the target device (it is a
configuration error to not match them).

rdar://83080611

Diff Detail

Event Timeline

delcypher created this revision.Sep 15 2021, 11:28 AM
delcypher requested review of this revision.Sep 15 2021, 11:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2021, 11:28 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript

Avoid use of global DARWIN_${platform}_SDK_VERSION variables.

delcypher updated this revision to Diff 372801.Sep 15 2021, 2:13 PM

Make not handling an Apple platform non-fatal.

delcypher abandoned this revision.Sep 15 2021, 2:21 PM