Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: da0e7f5fabcb
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3af7e984705f
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Apr 18, 2021

  1. llvmPackages_7.libcxxabi: Fix Darwin bootstrap

    In 486e12a cmake flags were added matching
    later compilers use of libunwind for `useLLVM = true`. Unfortunately, `useLLVM`
    on Darwin was not something tested before, and so the other compilers led us
    astray: one of the new flags tried to make libunwind be used when it wasn't a
    dep.
    
    This is now fixed with more conditional code, but I hope things can perhaps be
    made simpler with more insight into why libunwind is skipped. Perhaps it is
    included in libSystem?
    
    Finally, I moved the definition of `cmakeFlags` to match the order in the other
    llvm versions.
    
    CC @sternenseemann and @thefloweringash
    Ericson2314 committed Apr 18, 2021
    2
    Copy the full SHA
    3af7e98 View commit details
Showing with 8 additions and 6 deletions.
  1. +8 −6 pkgs/development/compilers/llvm/7/libc++abi/default.nix
14 changes: 8 additions & 6 deletions pkgs/development/compilers/llvm/7/libc++abi/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ lib, stdenv, cmake, fetch, libcxx, libunwind, llvm, version
, standalone ? stdenv.hostPlatform.useLLVM or false
, withLibunwind ? !stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm
# on musl the shared objects don't build
, enableShared ? !stdenv.hostPlatform.isStatic
}:
@@ -11,7 +12,13 @@ stdenv.mkDerivation {
src = fetch "libcxxabi" "1zcqxsdjhawgz1cvpk07y3jl6fg9p3ay4nl69zsirqb2ghgyhhb2";

nativeBuildInputs = [ cmake ];
buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
buildInputs = lib.optional withLibunwind libunwind;

cmakeFlags = lib.optionals standalone [
"-DLLVM_ENABLE_LIBCXX=ON"
] ++ lib.optionals (standalone && withLibunwind) [
"-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
] ++ lib.optional (!enableShared) "-DLIBCXXABI_ENABLE_SHARED=OFF";

postUnpack = ''
unpackFile ${libcxx.src}
@@ -23,11 +30,6 @@ stdenv.mkDerivation {
patch -p1 -d $(ls -d libcxx-*) -i ${../../libcxx-0001-musl-hacks.patch}
'';

cmakeFlags = lib.optionals standalone [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
] ++ lib.optional (!enableShared) "-DLIBCXXABI_ENABLE_SHARED=OFF";

installPhase = if stdenv.isDarwin
then ''
for file in lib/*.dylib; do