Skip to content
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

llvmPackages_{10,11}.compiler-rt: restrict build to current arch #116833

Merged
merged 2 commits into from Mar 19, 2021

Conversation

thefloweringash
Copy link
Member

Motivation for this change

Fix llvmPackages_10.compiler-rt and llvmPackages_11.compiler-rt on staging-next.

These packages were broken by #114817 (see #114817 (comment)).

While I'm here, use darwinArch for all compiler-rts, which is a no-op on x86_64-darwin.

I assert this change is correct in that nixpkgs only targets a single architecture at once, so building for extra platforms is unnecessary work. The alternative is to remove the -arch argument from the cc/bintools wrappers (revert fc0456b, b26e0ba and 8feb949).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@Ericson2314
Copy link
Member

I like this change. If we ever want to support multi-arch stuff, I would make cc-wrapper more clever by e.g. only adding an -arch if none is passed, not reverting those commits :).

@bobrik
Copy link
Contributor

bobrik commented Mar 19, 2021

#115435 is merged now, should this target some other branch now?

@zowoq
Copy link
Contributor

zowoq commented Mar 19, 2021

/rebase master

Workaround for build failure after adding mandatory -arch
argument. Nixpkgs targets a single architecture, so this saves a small
amount of wasted build effort.

See NixOS#114817 (comment)
@github-actions github-actions bot changed the base branch from staging-next to master March 19, 2021 20:23
@github-actions github-actions bot closed this Mar 19, 2021
@github-actions
Copy link
Contributor

Rebased, please reopen the pull request to restart CI

@zowoq zowoq reopened this Mar 19, 2021
@Ericson2314 Ericson2314 merged commit 097933d into NixOS:master Mar 19, 2021
@thefloweringash thefloweringash deleted the compiler-rt-arch branch March 22, 2021 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants