-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Test] Add %host_triple and %host_sdk substitutions #64796
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
Conversation
@swift Please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Rintaro!
test/Macros/composed_macro.swift
Outdated
// RUN: %target-build-swift -swift-version 5 -I %swift-host-lib-dir -L %swift-host-lib-dir -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition %S/Inputs/syntax_macro_definitions.swift -g -no-toolchain-stdlib-rpath | ||
// RUN: %swiftc_driver -sdk %host_sdk -target %host_triple -swift-version 5 -I %swift-host-lib-dir -L %swift-host-lib-dir -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition %S/Inputs/syntax_macro_definitions.swift -g -no-toolchain-stdlib-rpath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have a host-build-swift
to match target-build-swift
?
test/lit.cfg
Outdated
@@ -963,7 +963,7 @@ def use_interpreter_for_simple_runs(): | |||
result += ( | |||
'env SWIFT_INTERPRETER=%r %s %r %s -module-name main %s %s %s ' | |||
% (config.swift, xcrun_prefix, config.swift, target_options, | |||
config.swift_test_options, | |||
onfig.swift_test_options, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops!
4f9e6f4
to
1828fc6
Compare
@swift-ci Please smoke test |
@swift-ci Please smoke test macOS |
@swift-ci Please smoke test |
Macro tests need to build host libraries/tools. We can't use %target-* substitutions for that. rdar://107398734
1828fc6
to
1d2fd42
Compare
@swift-ci Please smoke test |
@@ -1,5 +1,5 @@ | |||
// RUN: %empty-directory(%t) | |||
// RUN: %target-build-swift -swift-version 5 -I %swift-host-lib-dir -L %swift-host-lib-dir -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition %S/Inputs/syntax_macro_definitions.swift -g -no-toolchain-stdlib-rpath | |||
// RUN: %host-build-swift -swift-version 5 -I %swift-host-lib-dir -L %swift-host-lib-dir -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition %S/Inputs/syntax_macro_definitions.swift -g -no-toolchain-stdlib-rpath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any thoughts on including -I %swift-host-lib-dir -L %swift-host-lib-dir
by default for host-build-swift
? Or we could have %host-tool-build-swift
or something 😅. What you have now is fine though, I can do that when I go through and fix up all the REQUIRES if we can think of a nice name for it.
Macro tests need to build host libraries/tools. We can't use
%target-*
substitutions for that.rdar://107398734