Merge pull request #54624 from matthewbauer/libcxx

cc-wrapper: add libcxx for libcxxClang

authored by Matthew Bauer and committed by GitHub bb3683d7 92f0f8dd

+12 -5
+9 -5
pkgs/build-support/cc-wrapper/default.nix
··· 13 , extraPackages ? [], extraBuildCommands ? "" 14 , isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null 15 , buildPackages ? {} 16 }: 17 18 with stdenvNoCC.lib; ··· 44 # The wrapper scripts use 'cat' and 'grep', so we may need coreutils. 45 coreutils_bin = if nativeTools then "" else getBin coreutils; 46 47 - default_cxx_stdlib_compile = optionalString (targetPlatform.isLinux && !(cc.isGNU or false) && !nativeTools && cc ? gcc) 48 - "-isystem $(echo -n ${cc.gcc}/include/c++/*) -isystem $(echo -n ${cc.gcc}/include/c++/*)/$(${cc.gcc}/bin/gcc -dumpmachine)"; 49 50 # The "infix salt" is a arbitrary string added in the middle of env vars 51 # defined by cc-wrapper's hooks so that multiple cc-wrappers can be used ··· 256 257 echo "$ccLDFlags" > $out/nix-support/cc-ldflags 258 echo "$ccCFlags" > $out/nix-support/cc-cflags 259 - '' 260 - 261 - + optionalString propagateDoc '' 262 ## 263 ## Man page and info support 264 ##
··· 13 , extraPackages ? [], extraBuildCommands ? "" 14 , isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null 15 , buildPackages ? {} 16 + , libcxx ? null 17 }: 18 19 with stdenvNoCC.lib; ··· 45 # The wrapper scripts use 'cat' and 'grep', so we may need coreutils. 46 coreutils_bin = if nativeTools then "" else getBin coreutils; 47 48 + default_cxx_stdlib_compile = if (targetPlatform.isLinux && !(cc.isGNU or false) && !nativeTools && cc ? gcc) then 49 + "-isystem $(echo -n ${cc.gcc}/include/c++/*) -isystem $(echo -n ${cc.gcc}/include/c++/*)/$(${cc.gcc}/bin/gcc -dumpmachine)" 50 + else if targetPlatform.isDarwin && (libcxx != null) && (cc.isClang or false) then 51 + "-isystem ${libcxx}/include/c++/v1" 52 + else ""; 53 54 # The "infix salt" is a arbitrary string added in the middle of env vars 55 # defined by cc-wrapper's hooks so that multiple cc-wrappers can be used ··· 260 261 echo "$ccLDFlags" > $out/nix-support/cc-ldflags 262 echo "$ccCFlags" > $out/nix-support/cc-cflags 263 + '' + optionalString (targetPlatform.isDarwin && (libcxx != null) && (cc.isClang or false)) '' 264 + echo " -L${libcxx}/lib" >> $out/nix-support/cc-ldflags 265 + '' + optionalString propagateDoc '' 266 ## 267 ## Man page and info support 268 ##
+1
pkgs/development/compilers/llvm/5/default.nix
··· 59 60 libcxxClang = wrapCCWith rec { 61 cc = tools.clang-unwrapped; 62 extraPackages = [ 63 targetLlvmLibraries.libcxx 64 targetLlvmLibraries.libcxxabi
··· 59 60 libcxxClang = wrapCCWith rec { 61 cc = tools.clang-unwrapped; 62 + libcxx = targetLlvmLibraries.libcxx; 63 extraPackages = [ 64 targetLlvmLibraries.libcxx 65 targetLlvmLibraries.libcxxabi
+1
pkgs/development/compilers/llvm/6/default.nix
··· 59 60 libcxxClang = wrapCCWith rec { 61 cc = tools.clang-unwrapped; 62 extraPackages = [ 63 targetLlvmLibraries.libcxx 64 targetLlvmLibraries.libcxxabi
··· 59 60 libcxxClang = wrapCCWith rec { 61 cc = tools.clang-unwrapped; 62 + libcxx = targetLlvmLibraries.libcxx; 63 extraPackages = [ 64 targetLlvmLibraries.libcxx 65 targetLlvmLibraries.libcxxabi
+1
pkgs/development/compilers/llvm/7/default.nix
··· 59 60 libcxxClang = wrapCCWith rec { 61 cc = tools.clang-unwrapped; 62 extraPackages = [ 63 targetLlvmLibraries.libcxx 64 targetLlvmLibraries.libcxxabi
··· 59 60 libcxxClang = wrapCCWith rec { 61 cc = tools.clang-unwrapped; 62 + libcxx = targetLlvmLibraries.libcxx; 63 extraPackages = [ 64 targetLlvmLibraries.libcxx 65 targetLlvmLibraries.libcxxabi