pw_build: Add missing pw_linker_script flag
Adds -no-canonical-prefixes as an unconditional flag to pw_linker_script
so cc1 can be found during linker script preprocessing.
Bug: b/296928739
Change-Id: I40a8de9339cabf594ff5a97a492f426b16046a19
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/167632
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>
Reviewed-by: Taylor Cramer <cramertj@google.com>
diff --git a/pw_build/bazel_internal/pigweed_internal.bzl b/pw_build/bazel_internal/pigweed_internal.bzl
index d3f0132..ecfa834 100644
--- a/pw_build/bazel_internal/pigweed_internal.bzl
+++ b/pw_build/bazel_internal/pigweed_internal.bzl
@@ -110,6 +110,11 @@
arguments = [
"-E",
"-P",
+ # TODO: b/296928739 - This flag is needed so cc1 can be located
+ # despite the presence of symlinks. Normally this is provided
+ # through copts inherited from the toolchain, but since those are
+ # not pulled in here the flag must be explicitly added.
+ "-no-canonical-prefixes",
"-xc",
ctx.file.linker_script.short_path,
"-o",