lol

Merge pull request #153963 from crabtw/clang13

llvmPackages_13.clang: add nostdlibinc flag

authored by

John Ericson and committed by
GitHub
71c7eb26 b039dad7

+19 -4
+18
pkgs/development/compilers/llvm/13/clang/add-nostdlibinc-flag.patch
··· 1 + diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp 2 + index 94a7553e273b..8a1d455950b2 100644 3 + --- a/lib/Driver/Driver.cpp 4 + +++ b/lib/Driver/Driver.cpp 5 + @@ -412,6 +412,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/13/clang/default.nix
··· 42 42 # mis-compilation in firefox. 43 43 # See: https://bugzilla.mozilla.org/show_bug.cgi?id=1741454 44 44 ./revert-malloc-alignment-assumption.patch 45 + ./add-nostdlibinc-flag.patch 45 46 (substituteAll { 46 47 src = ../../clang-11-12-LLVMgold-path.patch; 47 48 libllvmLibdir = "${libllvm.lib}/lib"; ··· 50 51 51 52 postPatch = '' 52 53 (cd tools && ln -s ../../clang-tools-extra extra) 53 - 54 - sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \ 55 - -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \ 56 - lib/Driver/ToolChains/*.cpp 57 54 58 55 # Patch for standalone doc building 59 56 sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt