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

LLVM: fix cross compilation (llvm_6 & llvm_7) #52031

Merged
merged 2 commits into from Dec 14, 2018

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Dec 14, 2018

Motivation for this change

road to gtk

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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

, debugVersion ? false
, enableManpages ? false
, enableSharedLibraries ? true
, targets ? [ stdenv.hostPlatform stdenv.targetPlatform ]
Copy link
Member Author

Choose a reason for hiding this comment

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

@Ericson2314 changed the name as it might be ambiguous when somebody adds a targets package.

, debugVersion ? false
, enableManpages ? false
, enableSharedLibraries ? true
, targets ? [ stdenv.hostPlatform stdenv.targetPlatform ]
, enableWasm ? true # TODO fold this into `targets` somehow
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 not want to have this as an API, because it should be in targets once it leaves the experimental stage.

Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

Looks great!

@Ericson2314 Ericson2314 merged commit 4ccba8b into NixOS:staging Dec 14, 2018
@Mic92 Mic92 deleted the cross-llvm branch December 14, 2018 15:15
@jtojnar jtojnar mentioned this pull request Dec 24, 2018
10 tasks
jtojnar added a commit to jtojnar/nixpkgs that referenced this pull request Dec 24, 2018
LLVM’s `LLVM_TARGETS_TO_BUILD` build flag defauls to `all`, which contains
`AMDGPU` among others. [1] Changes in llvm [2] switched to explicitly listing
host and target platforms, excluding the AMDGPU target, which is required
for Mesa to build.

[1]: https://github.com/llvm-mirror/llvm/blob/db50b6fe399b8ad8caef80fd8ee77607fb051fa5/CMakeLists.txt#L286-L302
[2]: NixOS#52031
@dtzWill
Copy link
Member

dtzWill commented Jan 14, 2019

cc #53920 -- thoughts? :)

@orivej
Copy link
Contributor

orivej commented Jan 14, 2019

Is there a reason not to build all targets by default?

@Mic92
Copy link
Member Author

Mic92 commented Jan 14, 2019

@orivej closure size maybe? My intention was that it is also used for jit-compiling like in mesa and for cross-compiling we would have to rebuild it anyway as the default target changes. I have not measured the size difference though.

@andrewrk
Copy link
Member

andrewrk commented Feb 7, 2019

This commit broke Zig, which depends on all LLVM targets being enabled. LLVM should include all default targets by default.

@andrewrk
Copy link
Member

andrewrk commented Feb 7, 2019

Never mind, I think this was fixed. Sorry for the noise.

@corngood
Copy link
Contributor

corngood commented Jan 3, 2020

@Mic92 @Ericson2314 looks like _8 and _9 have been broken since they were added. Could you take a look at #76887?

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

7 participants