Skip to content

[5.9][Test] Add %host_triple and %host_sdkroot substitutions #64816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Mar 31, 2023

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)

Macro tests need to build host libraries/tools. We can't use %target-*
substitutions for that.

rdar://107398734
(cherry picked from commit 1d2fd42)
@rintaro rintaro requested a review from a team as a code owner March 31, 2023 16:35
@rintaro
Copy link
Member Author

rintaro commented Mar 31, 2023

@swift-ci Please test

@rintaro rintaro merged commit 94e7016 into swiftlang:release/5.9 Mar 31, 2023
@AnthonyLatsis AnthonyLatsis added the 🍒 release cherry pick Flag: Release branch cherry picks label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants