[K/N][build] Add usr subdir to absoluteTargetToolchain path
absoluteTargetToolchain has started to include the usr directory while
tests use a bootstrap version that doesn't have this change.
See commit 3aeca1956e with the change to toolchain path.
This commit is contained in:
committed by
Space Team
parent
707482e738
commit
5f7b1761d7
@@ -292,7 +292,11 @@ fun compileSwift(
|
||||
val platform = project.platformManager.platform(target)
|
||||
assert(platform.configurables is AppleConfigurables)
|
||||
val configs = platform.configurables as AppleConfigurables
|
||||
val compiler = configs.absoluteTargetToolchain + "/usr/bin/swiftc"
|
||||
val compiler = with(configs.absoluteTargetToolchain) {
|
||||
// This is a follow up to the change "Consolidate toolchain paths between platforms" (3aeca1956e1a)
|
||||
// The absoluteTargetToolchain has started to include usr subdir, but the bootstrap version still has the old path without.
|
||||
this + if (this.endsWith("/usr")) "/bin/swiftc" else "/usr/bin/swiftc"
|
||||
}
|
||||
|
||||
val swiftTarget = configs.targetTriple.withOSVersion(configs.osVersionMin).toString()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user