-
Notifications
You must be signed in to change notification settings - Fork 96
Replace nixpkgs_cc_configure() with a toolchain #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
9f7430d
nixpkgs_cc_configure_hermetic
aherrmann b9560af
cc.nix: Handle empty sequences correctly
aherrmann b6c5b7d
Track whether cc is clang
aherrmann f2a5ecd
Write system module map if required.
aherrmann 80da937
bzl_library dependencies
aherrmann 55e1615
Update nixpkgs/toolchains/cc.nix
aherrmann 9299eed
Document the dependency on rules_cc
aherrmann 60e0819
Avoid clang errors due to unused command line flags
aherrmann b3cce10
Configure warnings on Nix derivation
aherrmann ca71928
Drop the `_hermetic` suffix on new cc toolchain
aherrmann a62b793
Use local_config_cc as default cc toolchain name
aherrmann f34bd28
Don't hardcode tool list in docs
aherrmann c229107
Reference bazel_tools templates
aherrmann 169875e
compiler_flags --> compile_flags
aherrmann efe4293
ternary vs. dict.get
aherrmann 173ba08
Docstring for nixopts
aherrmann 9b2114d
avoid with
aherrmann a579b93
Remove unused build input
aherrmann be84215
More explicit switch between attrset/expression/default
aherrmann dba7836
fmt
aherrmann ae1a255
Fix Darwin attributes
aherrmann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,7 @@ | ||
| build --host_platform=@io_tweag_rules_nixpkgs//nixpkgs/platforms:host | ||
| build --crosstool_top=@nixpkgs_config_cc//:toolchain | ||
| # Using toolchain resolution can lead to spurious dependencies on | ||
| # `@local_config_cc//:builtin_include_directory_paths`. This needs to be | ||
| # resolved before `--incompatible_enable_cc_toolchain_resolution` can be | ||
| # recommended for `nixpkgs_cc_configure_hermetic`. | ||
| # build --incompatible_enable_cc_toolchain_resolution | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aherrmann is there a ticket tracking this? Once this flag is enabled, do I understand right that
--crosstool_topwill no longer be necessary?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've looked into the issue in the daml repo once more. It looks like this is a rules_haskell issue: tweag/rules_haskell#1467
However, in general bazelbuild/bazel#1258 suggests that there is still ongoing work in Bazel in this area. And bazelbuild/bazel#12712 also seems related.
Correct, assuming that all involved Starlark code is compatible with cc toolchain resolution. E.g. any direct reference to
ctx.attr._cc_toolchainbreaks this and causes a dependency on--crosstool_top.