HomePhabricator

[TSan] Ensure we can compile the runtime with older SDKs

Authored by yln on Feb 5 2020, 8:17 AM.

Description

[TSan] Ensure we can compile the runtime with older SDKs

One of my changes [1] included in this release silently bumped the
minimal macOS SDK required for building the TSan runtime to SDK 10.12.
Let's ensure release 10 does not unexpectedly break builders with old
SDKs and add proper minimal SDK checking in CMake for subsequent
releases.

This fix #ifdefs out interceptors for newer APIs. Note that the
resulting TSan runtime is less complete: when these newer APIs are used
TSan will report false positives.

Fixes llvm 10 release blocker: #44682
https://bugs.llvm.org/show_bug.cgi?id=44682

[1] 894abb46f891cba2e0ef581650f27f512a7824b4

Reviewed By: dmajor

Differential Revision: https://reviews.llvm.org/D74059

Details