Skip to content

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

Merged
Ericson2314 merged 2 commits intoNixOS:masterfrom
thefloweringash:compiler-rt-arch
Mar 19, 2021
Merged

llvmPackages_{10,11}.compiler-rt: restrict build to current arch#116833
Ericson2314 merged 2 commits intoNixOS:masterfrom
thefloweringash:compiler-rt-arch

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.

@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Mar 19, 2021
@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
@rrbutani rrbutani added the 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants