Skip to content

How to force @nixpkgs_foreign_cc//:make_nix_impl to be the preferred toolchain? #447

Closed Answered by attilaolah
attilaolah asked this question in Q&A
Discussion options

You must be logged in to vote

Apparently adding the toolchains via the command line helps, e.g. in .bazelrc:

build --extra_toolchains=@nixpkgs_foreign_cc_toolchain//:all

This is because, according to the documented toolchain resolution order:

The set of available toolchains, in priority order, is created from --extra_toolchains and register_toolchains:

  1. Toolchains registered using --extra_toolchains are added first.
    a. Within these, the last toolchain has highest priority.
  2. Toolchains registered using register_toolchains
    a. Within these, the first mentioned toolchain has highest priority.

This still does not disable the built toolchains, but the ones provided by the @nixpkgs_foreign_cc_toolchain repo will be prefer…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by attilaolah
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@aherrmann
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants