mirror of
https://fuchsia.googlesource.com/third_party/pigweed.googlesource.com/pigweed/pigweed
synced 2024-09-09 04:29:36 +00:00
pw_toolchain_bazel: Support Windows in toolchain template build files
Changes toolchain template repositories to pick up *.exe tools when the exec platform is Windows. Change-Id: Ife629a12deadcc80c94428549fd7dd6f5e32904d Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/194591 Reviewed-by: Anthony DiGirolamo <tonymd@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com> Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> Pigweed-Auto-Submit: Armando Montanez <amontanez@google.com>
This commit is contained in:
parent
6bbe3599f0
commit
f25eb6ab8c
|
@ -37,7 +37,10 @@ pw_cc_action_files(
|
|||
|
||||
pw_cc_tool(
|
||||
name = "arm-none-eabi-ar_tool",
|
||||
tool = "//:bin/arm-none-eabi-ar",
|
||||
tool = select({
|
||||
"@platforms//os:windows": "//:bin/arm-none-eabi-ar.exe",
|
||||
"//conditions:default": "//:bin/arm-none-eabi-ar",
|
||||
}),
|
||||
)
|
||||
|
||||
pw_cc_action_config(
|
||||
|
@ -56,7 +59,10 @@ pw_cc_action_config(
|
|||
|
||||
pw_cc_tool(
|
||||
name = "arm-none-eabi-g++_tool",
|
||||
tool = "//:bin/arm-none-eabi-g++",
|
||||
tool = select({
|
||||
"@platforms//os:windows": "//:bin/arm-none-eabi-g++.exe",
|
||||
"//conditions:default": "//:bin/arm-none-eabi-g++",
|
||||
}),
|
||||
additional_files = glob([
|
||||
"**/*.spec",
|
||||
"**/*.specs",
|
||||
|
@ -75,7 +81,10 @@ pw_cc_action_config(
|
|||
|
||||
pw_cc_tool(
|
||||
name = "arm-none-eabi-gcc_tool",
|
||||
tool = "//:bin/arm-none-eabi-gcc",
|
||||
tool = select({
|
||||
"@platforms//os:windows": "//:bin/arm-none-eabi-gcc.exe",
|
||||
"//conditions:default": "//:bin/arm-none-eabi-gcc",
|
||||
}),
|
||||
additional_files = glob([
|
||||
"**/*.spec",
|
||||
"**/*.specs",
|
||||
|
@ -83,9 +92,14 @@ pw_cc_tool(
|
|||
"lib/gcc/arm-none-eabi/*/include/**",
|
||||
"lib/gcc/arm-none-eabi/*/include-fixed/**",
|
||||
"libexec/**",
|
||||
]) + [
|
||||
"arm-none-eabi/bin/as", # The assembler needs to be explicilty added.
|
||||
],
|
||||
]) +
|
||||
# The assembler needs to be explicilty added. Note that the path is
|
||||
# intentionally different here as `as` is called from arm-none-eabi-gcc.
|
||||
# `arm-none-eabi-as` will not suffice for this context.
|
||||
select({
|
||||
"@platforms//os:windows": ["//:arm-none-eabi/bin/as.exe"],
|
||||
"//conditions:default": ["//:arm-none-eabi/bin/as"],
|
||||
}),
|
||||
)
|
||||
|
||||
pw_cc_action_config(
|
||||
|
@ -101,7 +115,10 @@ pw_cc_action_config(
|
|||
# tool differently to specify a different set of additional files.
|
||||
pw_cc_tool(
|
||||
name = "arm-none-eabi-ld_tool",
|
||||
tool = "//:bin/arm-none-eabi-g++",
|
||||
tool = select({
|
||||
"@platforms//os:windows": "//:bin/arm-none-eabi-g++.exe",
|
||||
"//conditions:default": "//:bin/arm-none-eabi-g++",
|
||||
}),
|
||||
additional_files = glob([
|
||||
"**/*.a",
|
||||
"**/*.ld",
|
||||
|
@ -121,7 +138,10 @@ pw_cc_action_config(
|
|||
|
||||
pw_cc_tool(
|
||||
name = "arm-none-eabi-gcov_tool",
|
||||
tool = "//:bin/arm-none-eabi-gcov",
|
||||
tool = select({
|
||||
"@platforms//os:windows": "//:bin/arm-none-eabi-gcov.exe",
|
||||
"//conditions:default": "//:bin/arm-none-eabi-gcov",
|
||||
}),
|
||||
)
|
||||
|
||||
pw_cc_action_config(
|
||||
|
@ -132,7 +152,10 @@ pw_cc_action_config(
|
|||
|
||||
pw_cc_tool(
|
||||
name = "arm-none-eabi-objcopy_tool",
|
||||
tool = "//:bin/arm-none-eabi-objcopy",
|
||||
tool = select({
|
||||
"@platforms//os:windows": "//:bin/arm-none-eabi-objcopy.exe",
|
||||
"//conditions:default": "//:bin/arm-none-eabi-objcopy",
|
||||
}),
|
||||
)
|
||||
|
||||
pw_cc_action_config(
|
||||
|
@ -143,7 +166,10 @@ pw_cc_action_config(
|
|||
|
||||
pw_cc_tool(
|
||||
name = "arm-none-eabi-objdump_tool",
|
||||
tool = "//:bin/arm-none-eabi-objdump",
|
||||
tool = select({
|
||||
"@platforms//os:windows": "//:bin/arm-none-eabi-objdump.exe",
|
||||
"//conditions:default": "//:bin/arm-none-eabi-objdump",
|
||||
}),
|
||||
)
|
||||
|
||||
pw_cc_action_config(
|
||||
|
@ -154,7 +180,10 @@ pw_cc_action_config(
|
|||
|
||||
pw_cc_tool(
|
||||
name = "arm-none-eabi-strip_tool",
|
||||
tool = "//:bin/arm-none-eabi-strip",
|
||||
tool = select({
|
||||
"@platforms//os:windows": "//:bin/arm-none-eabi-strip.exe",
|
||||
"//conditions:default": "//:bin/arm-none-eabi-strip",
|
||||
}),
|
||||
)
|
||||
|
||||
pw_cc_action_config(
|
||||
|
|
|
@ -34,7 +34,10 @@ filegroup(
|
|||
|
||||
pw_cc_tool(
|
||||
name = "ar_tool",
|
||||
tool = "//:bin/llvm-ar",
|
||||
tool = select({
|
||||
"@platforms//os:windows": "//:bin/llvm-ar.exe",
|
||||
"//conditions:default": "//:bin/llvm-ar",
|
||||
}),
|
||||
)
|
||||
|
||||
pw_cc_tool(
|
||||
|
@ -61,7 +64,10 @@ pw_cc_action_config(
|
|||
|
||||
pw_cc_tool(
|
||||
name = "clang++_tool",
|
||||
tool = "//:bin/clang++",
|
||||
tool = select({
|
||||
"@platforms//os:windows": "//:bin/clang++.exe",
|
||||
"//conditions:default": "//:bin/clang++",
|
||||
}),
|
||||
additional_files = glob([
|
||||
"include/**",
|
||||
"lib/clang/**/include/**",
|
||||
|
@ -76,7 +82,10 @@ pw_cc_action_config(
|
|||
|
||||
pw_cc_tool(
|
||||
name = "clang_tool",
|
||||
tool = "//:bin/clang",
|
||||
tool = select({
|
||||
"@platforms//os:windows": "//:bin/clang.exe",
|
||||
"//conditions:default": "//:bin/clang",
|
||||
}),
|
||||
additional_files = glob([
|
||||
"include/**",
|
||||
"lib/clang/**/include/**",
|
||||
|
@ -96,7 +105,10 @@ pw_cc_action_config(
|
|||
# tool differently to specify a different set of additional files.
|
||||
pw_cc_tool(
|
||||
name = "lld_tool",
|
||||
tool = "//:bin/clang++",
|
||||
tool = select({
|
||||
"@platforms//os:windows": "//:bin/clang++.exe",
|
||||
"//conditions:default": "//:bin/clang++",
|
||||
}),
|
||||
additional_files = glob([
|
||||
"lib/**/*.a",
|
||||
"lib/**/*.so*",
|
||||
|
@ -111,7 +123,10 @@ pw_cc_action_config(
|
|||
|
||||
pw_cc_tool(
|
||||
name = "llvm_cov_tool",
|
||||
tool = "//:bin/llvm-cov",
|
||||
tool = select({
|
||||
"@platforms//os:windows": "//:bin/llvm-cov.exe",
|
||||
"//conditions:default": "//:bin/llvm-cov",
|
||||
}),
|
||||
)
|
||||
|
||||
pw_cc_action_config(
|
||||
|
@ -122,7 +137,10 @@ pw_cc_action_config(
|
|||
|
||||
pw_cc_tool(
|
||||
name = "llvm_objcopy_tool",
|
||||
tool = "//:bin/llvm-objcopy",
|
||||
tool = select({
|
||||
"@platforms//os:windows": "//:bin/llvm-objcopy.exe",
|
||||
"//conditions:default": "//:bin/llvm-objcopy",
|
||||
}),
|
||||
)
|
||||
|
||||
pw_cc_action_config(
|
||||
|
@ -133,7 +151,10 @@ pw_cc_action_config(
|
|||
|
||||
pw_cc_tool(
|
||||
name = "llvm_objdump_tool",
|
||||
tool = "//:bin/llvm-objdump",
|
||||
tool = select({
|
||||
"@platforms//os:windows": "//:bin/llvm-objdump.exe",
|
||||
"//conditions:default": "//:bin/llvm-objdump",
|
||||
}),
|
||||
)
|
||||
|
||||
pw_cc_action_config(
|
||||
|
@ -144,7 +165,10 @@ pw_cc_action_config(
|
|||
|
||||
pw_cc_tool(
|
||||
name = "llvm_strip_tool",
|
||||
tool = "//:bin/llvm-strip",
|
||||
tool = select({
|
||||
"@platforms//os:windows": "//:bin/llvm-strip.exe",
|
||||
"//conditions:default": "//:bin/llvm-strip",
|
||||
}),
|
||||
)
|
||||
|
||||
pw_cc_action_config(
|
||||
|
|
Loading…
Reference in New Issue
Block a user