Merge branch 'master' into staging-next

This commit is contained in:
Jan Tojnar
2020-04-16 10:09:43 +02:00
277 changed files with 8102 additions and 4662 deletions
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
"-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
];
cmakeFlags = stdenv.lib.optionals (useLLVM || stdenv.isDarwin) [
cmakeFlags = [
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
@@ -1,4 +1,4 @@
{ lowPrio, newScope, pkgs, stdenv, cmake, libstdcxxHook
{ lowPrio, newScope, pkgs, stdenv, cmake, gcc, libstdcxxHook
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
, buildLlvmTools # tools, but from the previous stage, for cross
, targetLlvmLibraries # libraries, but from the next stage, for cross
@@ -7,6 +7,7 @@
let
release_version = "8.0.1";
version = release_version; # differentiating these is important for rc's
targetConfig = stdenv.targetPlatform.config;
fetch = name: sha256: fetchurl {
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${release_version}/${name}-${version}.src.tar.xz";
@@ -63,7 +64,12 @@ let
extraPackages = [
targetLlvmLibraries.compiler-rt
];
extraBuildCommands = mkExtraBuildCommands cc;
extraBuildCommands = ''
echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
echo "-L${gcc.cc.lib}/${targetConfig}/lib" >> $out/nix-support/cc-ldflags
'' + mkExtraBuildCommands cc;
};
libcxxClang = wrapCCWith rec {