Merge pull request #193636 from crabtw/staging

llvmPackages_{14, git}.clang: add nostdlibinc flag

authored by 7c6f434c and committed by GitHub d89b2002 8a69058a

+38 -8
+18
pkgs/development/compilers/llvm/14/clang/add-nostdlibinc-flag.patch
··· 1 + diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp 2 + index 3bfddeefc7b2..05b11d9e562d 100644 3 + --- a/lib/Driver/Driver.cpp 4 + +++ b/lib/Driver/Driver.cpp 5 + @@ -482,6 +482,13 @@ DerivedArgList *Driver::TranslateInputArgs(const InputArgList &Args) const { 6 + } 7 + #endif 8 + 9 + + { 10 + + Arg *A = DAL->MakeFlagArg(/*BaseArg=*/nullptr, 11 + + Opts.getOption(options::OPT_nostdlibinc)); 12 + + A->claim(); 13 + + DAL->append(A); 14 + + } 15 + + 16 + return DAL; 17 + } 18 +
+1 -4
pkgs/development/compilers/llvm/14/clang/default.nix
··· 45 45 ./purity.patch 46 46 # https://reviews.llvm.org/D51899 47 47 ./gnu-install-dirs.patch 48 + ./add-nostdlibinc-flag.patch 48 49 (substituteAll { 49 50 src = ../../clang-11-12-LLVMgold-path.patch; 50 51 libllvmLibdir = "${libllvm.lib}/lib"; ··· 53 54 54 55 postPatch = '' 55 56 (cd tools && ln -s ../../clang-tools-extra extra) 56 - 57 - sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \ 58 - -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \ 59 - lib/Driver/ToolChains/*.cpp 60 57 61 58 # Patch for standalone doc building 62 59 sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
+18
pkgs/development/compilers/llvm/git/clang/add-nostdlibinc-flag.patch
··· 1 + diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp 2 + index 3f29afd35971..223d2769cdfc 100644 3 + --- a/lib/Driver/Driver.cpp 4 + +++ b/lib/Driver/Driver.cpp 5 + @@ -491,6 +491,13 @@ DerivedArgList *Driver::TranslateInputArgs(const InputArgList &Args) const { 6 + } 7 + #endif 8 + 9 + + { 10 + + Arg *A = DAL->MakeFlagArg(/*BaseArg=*/nullptr, 11 + + Opts.getOption(options::OPT_nostdlibinc)); 12 + + A->claim(); 13 + + DAL->append(A); 14 + + } 15 + + 16 + return DAL; 17 + } 18 +
+1 -4
pkgs/development/compilers/llvm/git/clang/default.nix
··· 46 46 ./purity.patch 47 47 # https://reviews.llvm.org/D51899 48 48 ./gnu-install-dirs.patch 49 + ./add-nostdlibinc-flag.patch 49 50 (substituteAll { 50 51 src = ../../clang-11-12-LLVMgold-path.patch; 51 52 libllvmLibdir = "${libllvm.lib}/lib"; ··· 54 55 55 56 postPatch = '' 56 57 (cd tools && ln -s ../../clang-tools-extra extra) 57 - 58 - sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \ 59 - -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \ 60 - lib/Driver/ToolChains/*.cpp 61 58 62 59 # Patch for standalone doc building 63 60 sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt