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

treewide: Clean up multi-arch tools and usage #33087

Merged
merged 3 commits into from Dec 27, 2017

Conversation

Ericson2314
Copy link
Member

Motivation for this change

See the commit messages for more details, but the principles basically are:

  • Prefer custom stdenvs to tools as extra deps
  • Don't needlessly force gcc or clang
  • Dispatch on more appropriate conditions
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Clang stdenvs with either libc++ should work now.
@Ericson2314
Copy link
Member Author

@nixborg build

@nixborg
Copy link

nixborg commented Dec 27, 2017

Jobset created at https://hydra.mayflower.de/jobset/nixos/pr-33087

@Ericson2314 Ericson2314 changed the title treewide: Clean up multii-arch tools and usage treewide: Clean up multi-arch tools and usage Dec 27, 2017
Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

# Include unwrapped binaries like AS, etc. and remove libcxx/libcxxabi
extraBuildInputs = [ stdenv.cc.cc ];
# Remove libcxx/libcxxabi
extraBuildInputs = [ ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks tests.cc-wrapper-gcc on darwin, but there's probably a nicer way to fix it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did the same method, but made it darwin-specific and specifically clang.

 - Dispatch off more appropriate conditions---`stdenv.cc.is*` and
   `hostPlatform.is*` directly---rather than the OS as a proxy.

 - Don't worry about pulling in binutils from normal `stdenv.cc` for
   `gccMultiStdenv`.

 - Defining a `multiStdenv` that uses whatever compiler is default.

 - Define `stdenv_32bit` in terms of `multiStdenv`.
 - Don't needlessly force GCC

 - Prefer using multi-arch stdenvs to using multi-arch tools directly.
@Ericson2314 Ericson2314 merged commit ad1a1ee into NixOS:master Dec 27, 2017
@Ericson2314 Ericson2314 deleted the alt-stdenv branch December 27, 2017 21:45
@Ericson2314 Ericson2314 added this to Needed by the big PR---nice to move pick off pieces of it and move here, rebasing the big PR on top in Cross compilation Dec 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Cross compilation
Needed by the big PR---nice to move p...
Development

Successfully merging this pull request may close these issues.

None yet

4 participants