You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is probably a bug with rules_foreign_cc, but I'm not sure how you'd go about fixing it, so I'm posting it here.
Rules_foreign_cc's configure_make rule sets the LD environment variable before calling ./configure. The value of LD is set from cc_toolchain.ld_executable, which is set from tool_paths. Because the new rule-based toolchain API uses action configs instead of tool paths, I can't use it to create a toolchain that works with rules_foreign_cc.
Some configure + make systems look for the ld binary that is supposed to be used, and invoke it directly for various reasons.
[...]
This grabs the ld executable directly from cc_toolchain.ld_executable rather than using something like cxx_linker_executable, because the former returns CC generally, but LD should be the linker directly.
Is there a good way to fix this in rules_foreign_cc now, or does rules_cc need to be changed (a new action type perhaps?) to make this work?
This is probably a bug with rules_foreign_cc, but I'm not sure how you'd go about fixing it, so I'm posting it here.
Rules_foreign_cc's
configure_make
rule sets theLD
environment variable before calling./configure
. The value ofLD
is set fromcc_toolchain.ld_executable
, which is set fromtool_paths
. Because the new rule-based toolchain API uses action configs instead of tool paths, I can't use it to create a toolchain that works with rules_foreign_cc.This was introduced to rules_foreign_cc in bazel-contrib/rules_foreign_cc#1068. The justification for the behavior was:
Is there a good way to fix this in rules_foreign_cc now, or does rules_cc need to be changed (a new action type perhaps?) to make this work?
This issue is being tracked in bazel-contrib/rules_foreign_cc#1160. I can provide a simple example if necessary.
I'm running Debian 12.8 on aarch64, Bazel 7.4.1, rules_cc 0.1.0 and rules_foreign_cc 0.13.0.
The text was updated successfully, but these errors were encountered: