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

[staging] python3: Fix clang / llvm build with optimizations #103715

Open
wants to merge 1 commit into
base: staging
from

Conversation

@kampka
Copy link
Contributor

@kampka kampka commented Nov 13, 2020

Motivation for this change

When building python3 with clang, the build errors out because optimizations are enabled (disabled by default on Darwin for I assume the very same reason) because python requires llvm-profdata to be available to build in that case.

I am not sure if the way I figure out how to choose the matching version of llvm to the clang version provided by the stdenv is ideal. Please feel free to suggest a better approach.

@NixOS/darwin-maintainers maybe you could verify if this also applies to Darwin builds? Then we can get rid of the enableOptimizations flag I think.

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.
@FRidh FRidh requested review from LnL7 and removed request for matthewbauer, cdepillabout, stigtsp, ttuegel, Ericson2314, nbp and alyssais Nov 18, 2020
@jonringer jonringer changed the title python3: Fix clang / llvm build with optimizations [staging] python3: Fix clang / llvm build with optimizations Nov 24, 2020
@FRidh FRidh self-assigned this Dec 30, 2020
@FRidh FRidh added this to the 21.03 milestone Jan 1, 2021
@FRidh FRidh mentioned this pull request Jan 1, 2021
0 of 12 tasks complete
@kampka kampka force-pushed the kampka:python3-clang branch 2 times, most recently from bce0eaa to 96feeb9 Jan 1, 2021
@kampka kampka force-pushed the kampka:python3-clang branch from 96feeb9 to 17dbe02 Jan 1, 2021
@kampka kampka requested a review from FRidh Jan 1, 2021
Copy link
Contributor

@jonringer jonringer left a comment

diff LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.