I need use clang to cross compile for aarch64 on a x86_64 platform, so I write a rule like tools/cpp/unix_cc_toolchain_config.bzl. but -internal-isystem and -internal-externc-isystem not passed to clang, why it doesn't take effect? because wrong setting actions or iterate_over or it's bazel's bug?
and another question, viarble's in tools/cpp/unix_cc_toolchain_config.bzl is substituted by bazel it self??? I cannot find any substitution in local_config_cc
Description of the bug:
I need use clang to cross compile for aarch64 on a x86_64 platform, so I write a rule like tools/cpp/unix_cc_toolchain_config.bzl. but -internal-isystem and -internal-externc-isystem not passed to clang, why it doesn't take effect? because wrong setting actions or iterate_over or it's bazel's bug?
and another question, viarble's in tools/cpp/unix_cc_toolchain_config.bzl is substituted by bazel it self??? I cannot find any substitution in local_config_cc
here is a demo https://github.com/xiedeacc/bazel_template/tree/problem build command
BUILD file
toolchain/clang_linux_aarch64_cc_toolchain_config.bzl
Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
No response
Which operating system are you running Bazel on?
ubuntu 22.04
What is the output of
bazel info release
?7.2.0
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response