Revert "cc-wrapper: add optional temporary hack for -B"

This reverts commit ac3acd956f.
This commit is contained in:
Adam Joseph 2023-04-12 08:15:45 -07:00
parent 4549be7eb0
commit 15e2a735f8
4 changed files with 2 additions and 12 deletions

View File

@ -51,7 +51,6 @@
# the derivation at which the `-B` and `-L` flags added by `useCcForLibs` will point
, gccForLibs ? if useCcForLibs then cc else null
, tmpDropB ? false # temporary hack; see PR #225846
}:
with lib;
@ -335,11 +334,9 @@ stdenv.mkDerivation {
##
## GCC libs for non-GCC support
##
+ optionalString (useGccForLibs && !tmpDropB) ''
+ optionalString useGccForLibs ''
echo "-B${gccForLibs}/lib/gcc/${targetPlatform.config}/${gccForLibs.version}" >> $out/nix-support/cc-cflags
''
+ optionalString useGccForLibs ''
echo "-L${gccForLibs}/lib/gcc/${targetPlatform.config}/${gccForLibs.version}" >> $out/nix-support/cc-ldflags
echo "-L${gccForLibs.lib}/${targetPlatform.config}/lib" >> $out/nix-support/cc-ldflags
''

View File

@ -1,5 +1,4 @@
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
, stdenv-tmpDropB
, gccForLibs, preLibcCrossHeaders
, libxml2, python3, isl, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
, buildLlvmTools # tools, but from the previous stage, for cross
@ -244,7 +243,7 @@ let
inherit llvm_meta;
stdenv = if stdenv.hostPlatform.useLLVM or false
then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
else stdenv-tmpDropB;
else stdenv;
};
# N.B. condition is safe because without useLLVM both are the same.

View File

@ -1,6 +1,5 @@
{ lib
, stdenv
, stdenv-tmpDropB
, callPackage
, overrideCC
, wrapCCWith
@ -79,8 +78,6 @@ let
# Runtimes
runtimes = callPackage ./llvm.nix {
stdenv = stdenv-tmpDropB;
buildDocs = false;
buildMan = false;
buildTests = false;

View File

@ -15545,9 +15545,6 @@ with pkgs;
llvmPackages_rocm = recurseIntoAttrs (callPackage ../development/compilers/llvm/rocm { });
# temporary hack; see PR #225846
stdenv-tmpDropB = overrideCC stdenv (wrapCCWith { tmpDropB = true; inherit (stdenv.cc) cc; });
lorri = callPackage ../tools/misc/lorri {
inherit (darwin.apple_sdk.frameworks) CoreServices Security;
};