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

Use the default for NIX_CXXSTDLIB_COMPILE even if defined (but empty). #44221

Merged
merged 1 commit into from Jul 30, 2018

Conversation

eddyb
Copy link
Contributor

@eddyb eddyb commented Jul 30, 2018

Motivation for this change

See #27672 (comment) - it appears that now the variable being used with a default is defined but empty, so ${VAR-default} won't ever use the default, only ${VAR:-default} will.

In this case VAR is the (salted) NIX_CXXSTDLIB_COMPILE, and this PR should unbreak standalone clang++ (e.g. through nix run nixpkgs.clang).
NIX_CXXSTDLIB_LINK probably needs to have a default too, to enable linking as well?

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@matthewbauer
Copy link
Member

Looks good to me. This definitely was a bug where the default was not getting pulled in correctly.

Credits to @uri-canva as well for catching this in #41589. I meant to mention to split this out to another PR but forgot about that part.

@matthewbauer matthewbauer requested review from Ericson2314 and removed request for Ericson2314 July 30, 2018 19:48
@matthewbauer matthewbauer merged commit 034c981 into NixOS:master Jul 30, 2018
@FRidh
Copy link
Member

FRidh commented Jul 31, 2018

@matthewbauer again, this is a mass rebuild and should not go into master. Please be more cautious when merging.

vcunat added a commit that referenced this pull request Jul 31, 2018
This reverts commit fd81a2e.
Moved from master to staging.
@vcunat
Copy link
Member

vcunat commented Jul 31, 2018

Moved to staging.

vcunat added a commit that referenced this pull request Jul 31, 2018
This reverts commit 034c981, reversing
changes made to 5afe87e.
Huge rebuild, moving to staging.
@eddyb eddyb deleted the cxxstdlib-var branch July 31, 2018 12:53
@matthewbauer
Copy link
Member

Sorry about that!

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

5 participants