[5.9][Test] Add %host_triple and %host_sdkroot substitutions #64816
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.
Cherry-pick #64796 into
release/5.9
Explanation: Macro tests needs to build macro plugin libraries/exectuables for "host" machine in the
lit
cases. They used to use%target-build-swift
substitution, but that was wrong because it builds with "target"-target
triple and SDKs (resource directory).lit.cfg
didn't have a notion of "host" triple and SDK. This change adds%host_triple
,%host_sdkroot
, and%host-build-swift
substitutions, and use it from Macro test cases. Also fix%swift_driver
/%swiftc_driver
to use "host" SDK because they are meant to be "for the build machine" (We can assume "build" == "host" in test cases)Scope: Macro feature test cases
Risk: Low. The newly added substitutions are used only in Macro test cases and those tests are currently "REQUIRES: OS=macosx" where
OS
here is the "target". So in most cases "host" == "target" ==macosx
Testing: Updating existing test cases
Isssues: rdar://107398734
Reviewers: Ben Barham (@bnbarham)