rules_foreign_cc icon indicating copy to clipboard operation
rules_foreign_cc copied to clipboard

Consider adding `toolchains` parameter to `configure_make_variant`

Open LeifAndersen opened this issue 8 months ago • 0 comments

I'm trying to use rules_foreign_cc to build qemu. And at the moment, I'd like to use the preinstalled pkgconfig and preinstalled meson toolchains.

Unfortunately, it seems like configure_make_variant only allows for me to pass in a single toolchain, so I can't do something like:

configure_make_variant(
    name = "qemu",
    lib_source = "@qemu_dist//:all_srcs",
    toolchains = ["@rules_foreign_cc//toolchains:preinstalled_meson_toolchain",
                  "@rules_foreign_cc//toolchains:preinstalled_pkgconfig_toolchain"]
)

Alternatively, if there was a way to compose toolchains, the existing toolchain parameter might work:

configure_make_variant(
    name = "qemu",
    lib_source = "@qemu_dist//:all_srcs",
    toolchain = compose_toolchains(["@rules_foreign_cc//toolchains:preinstalled_meson_toolchain",
                              "@rules_foreign_cc//toolchains:preinstalled_pkgconfig_toolchain"])
)

LeifAndersen avatar Jun 16 '24 15:06 LeifAndersen