[K/N] Consolidate toolchain paths between platforms

The compiler had some code that looked for the same tools and files
in toolchains at different relative paths depending on the platform.

This commit improves that code by including `usr/` into the path to
the toolchain on macOS, which allows to unify the relative paths
inside the toolchains.

Co-authored-by: Johan Bay <jobay@google.com>
This commit is contained in:
Johan Bay
2023-11-07 12:10:14 +00:00
committed by Space Cloud
parent 0d8960088e
commit 3aeca1956e
5 changed files with 9 additions and 19 deletions
@@ -35,11 +35,7 @@ internal class BitcodeCompiler(
.execute()
private fun targetTool(tool: String, vararg arg: String) {
val absoluteToolName = if (platform.configurables is AppleConfigurables) {
"${platform.absoluteTargetToolchain}/usr/bin/$tool"
} else {
"${platform.absoluteTargetToolchain}/bin/$tool"
}
val absoluteToolName = "${platform.absoluteTargetToolchain}/bin/$tool"
runTool(absoluteToolName, *arg)
}