Unverified Commit c306d450 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

buildMozillaMach: move env variables into env (#487963)

parents 45cb7500 df0f80bc
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -367,10 +367,6 @@ buildStdenv.mkDerivation {
    "-l"
  ];

  # if not explicitly set, wrong cc from buildStdenv would be used
  HOST_CC = "${llvmPackagesBuildBuild.stdenv.cc}/bin/cc";
  HOST_CXX = "${llvmPackagesBuildBuild.stdenv.cc}/bin/c++";

  nativeBuildInputs = [
    autoconf
    cargo
@@ -643,7 +639,12 @@ buildStdenv.mkDerivation {
  makeFlags = extraMakeFlags;
  separateDebugInfo = enableDebugSymbols;
  enableParallelBuilding = true;
  env = lib.optionalAttrs stdenv.hostPlatform.isMusl {
  env = {
    # if not explicitly set, wrong cc from buildStdenv would be used
    HOST_CC = "${llvmPackagesBuildBuild.stdenv.cc}/bin/cc";
    HOST_CXX = "${llvmPackagesBuildBuild.stdenv.cc}/bin/c++";
  }
  // lib.optionalAttrs stdenv.hostPlatform.isMusl {
    # Firefox relies on nonstandard behavior of the glibc dynamic linker. It re-uses
    # previously loaded libraries even though they are not in the rpath of the newly loaded binary.
    # On musl we have to explicitly set the rpath to include these libraries.