Skip to content

compiler-rt: Revert passing COMPILER_RT_OS_DIR and not symlinking libs#122399

Merged
Ericson2314 merged 1 commit intoNixOS:stagingfrom
Ericson2314:compiler-rt-restore-lib-subdir
May 9, 2021
Merged

compiler-rt: Revert passing COMPILER_RT_OS_DIR and not symlinking libs#122399
Ericson2314 merged 1 commit intoNixOS:stagingfrom
Ericson2314:compiler-rt-restore-lib-subdir

Conversation

@Ericson2314
Copy link
Copy Markdown
Member

Motivation for this change

In 7869d16 I got rid of the symlinking
by forcing COMPILER_RT_OS_DIR to always be the empty string. I thought
this was good because it just make compiler-rt be installed in a normal
way.

However, various LLVM tools expect the COMPILER_RT_OS_DIR to be set
normally, and fail to find things when they aren't in the expected lib
subdir.

Maybe it would be best to patch that too in the long term, but for now
we just undo this change.

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.

In 7869d16 I got rid of the symlinking
by forcing `COMPILER_RT_OS_DIR` to always be the empty string. I thought
this was good because it just make compiler-rt be installed in a normal
way.

However, various LLVM tools expect the `COMPILER_RT_OS_DIR` to be set
normally, and fail to find things when they aren't in the expected lib
subdir.

Maybe it would be best to patch that too in the long term, but for now
we just undo this change.
@Ericson2314
Copy link
Copy Markdown
Member Author

I kicked off a build locally to make sure this indeed fixes useLLVM cross compilation.

@ofborg ofborg bot added the 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. label May 9, 2021
@ofborg ofborg bot requested review from 7c6f434c, dtzWill, lovek323 and primeos May 9, 2021 23:05
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. labels May 9, 2021
@Ericson2314
Copy link
Copy Markdown
Member Author

nix-build -E '(import ./. { crossSystem = { config = "x86_64-unknown-linux-musl"; useLLVM = true; }; }).stdenv'

worked just fine!

@Ericson2314 Ericson2314 merged commit 680b33f into NixOS:staging May 9, 2021
@Ericson2314 Ericson2314 deleted the compiler-rt-restore-lib-subdir branch May 9, 2021 23:29
vcunat pushed a commit that referenced this pull request May 12, 2021
compiler-rt: Revert passing `COMPILER_RT_OS_DIR` and not symlinking libs
(cherry picked from commit 680b33f)
#111487 (comment)
@bobrik bobrik mentioned this pull request May 13, 2021
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants