clang-14: Fix build under Xcode 15, re-enabling sanitizers on macOS 14 #20625
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This also reverts the following as they relate to clang-14:
370d81a llvm-14: Allow build on darwin23 but disable sanitizers
0c2af47 llvm-{10-14}: Restrict to darwin < 23
Note that the actual incompatibility was not strictly between clang-14 and Darwin 23 (macOS 14) as these previous commits suggest. The incompatibility existed between clang-14 and the macOS 14 SDK, which is part of Xcode 15. The incompatibility equally affected clang-14 on macOS 13 (Darwin 22) using Xcode 15.
This also makes the compiler-rt build for various runtimes targeting iOS and iOS Simulator work correctly by removing the macOS SDK -syslibroot when linking, allowing the platform-specific SDK provided by the Clang build to be effective.
Fixes: https://trac.macports.org/ticket/68257
Description
Type(s)
Tested on
macOS 14.0 23A344 arm64
Xcode 15.0 15A240d
Verification
Have you
port lint --nitpick
?sudo port test
?sudo port -vst install
?@cjones051073