From 19adae30c1273843d879a8f5d140597850e02989 Mon Sep 17 00:00:00 2001 From: Kyle Copperfield Date: Tue, 19 Nov 2019 14:48:42 +0000 Subject: [PATCH] llvm/compiler-rt: default to compatible scudo options --- pkgs/development/compilers/llvm/7/compiler-rt.nix | 4 ++++ pkgs/development/compilers/llvm/8/compiler-rt.nix | 4 ++++ pkgs/development/compilers/llvm/9/compiler-rt.nix | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/pkgs/development/compilers/llvm/7/compiler-rt.nix b/pkgs/development/compilers/llvm/7/compiler-rt.nix index 5d7266f39ec..a7d4bcb8696 100644 --- a/pkgs/development/compilers/llvm/7/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/7/compiler-rt.nix @@ -7,6 +7,10 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake python llvm ]; buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi; + NIX_CFLAGS_COMPILE = [ + "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" + ]; + cmakeFlags = stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false || stdenv.isDarwin) [ "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" diff --git a/pkgs/development/compilers/llvm/8/compiler-rt.nix b/pkgs/development/compilers/llvm/8/compiler-rt.nix index 88788852862..344ff725675 100644 --- a/pkgs/development/compilers/llvm/8/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/8/compiler-rt.nix @@ -7,6 +7,10 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake python llvm ]; buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi; + NIX_CFLAGS_COMPILE = [ + "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" + ]; + cmakeFlags = stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false) [ "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" diff --git a/pkgs/development/compilers/llvm/9/compiler-rt.nix b/pkgs/development/compilers/llvm/9/compiler-rt.nix index 9a333ad7c11..5826f0fbb35 100644 --- a/pkgs/development/compilers/llvm/9/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/9/compiler-rt.nix @@ -7,6 +7,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake python llvm ]; buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi; + NIX_CFLAGS_COMPILE = [ + "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" + ]; + cmakeFlags = stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false) [ "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"