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

Closed
wants to merge 1 commit into 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 November 18, 2020 14:46
@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 added the 6.topic: darwin Running or building packages on Darwin label Nov 24, 2020
@FRidh FRidh self-assigned this Dec 30, 2020
@FRidh FRidh added this to the 21.03 milestone Jan 1, 2021
@kampka kampka force-pushed the python3-clang branch 3 times, most recently from 96feeb9 to 17dbe02 Compare January 1, 2021 16:53
@kampka kampka requested a review from FRidh January 1, 2021 16:53
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

diff LGTM

@stale
Copy link

stale bot commented Jul 1, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 1, 2021
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 5, 2022
@kampka
Copy link
Contributor Author

kampka commented Jan 5, 2022

I rebased this against latest staging again.
This PR is currently less important, since optimizations are disabled by default now.
@FRidh If you ever want to re-enable them, this PR solves the configure: error: llvm-profdata is required for a --enable-optimizations build but could not be found. issue.
For now, feel free to close this if there is no interest, re-building against staging takes to long even on my machine to actively maintain this off-branch.

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