buck2 icon indicating copy to clipboard operation
buck2 copied to clipboard

Toolchain rules don't consistently use `attrs.arg()`

Open Ralith opened this issue 7 months ago • 0 comments
trafficstars

Compare: https://github.com/facebook/buck2/blob/0011c3f7af59d9d6aa99fce7a5b890e8c9a35ab1/prelude/toolchains/cxx.bzl#L232 https://github.com/facebook/buck2/blob/0011c3f7af59d9d6aa99fce7a5b890e8c9a35ab1/prelude/toolchains/rust.bzl#L71 https://github.com/facebook/buck2/blob/0011c3f7af59d9d6aa99fce7a5b890e8c9a35ab1/prelude/toolchains/python.bzl#L86

Encountered this while trying to work around https://github.com/facebookincubator/reindeer/issues/62 by referencing a filegroup's location in a toolchain's linker args. It's also weird that system_cxx_toolchain uses link_flags where linker_flags is common elsewhere. Copy-pasting the toolchain definitions and adjusting the attr types seems to work fine.

Ralith avatar Apr 06 '25 18:04 Ralith