From 248936ea5700b25cfa9b7eaf8abe13a11fe15617 Mon Sep 17 00:00:00 2001 From: Emil Karlson Date: Mon, 4 Oct 2021 09:26:00 +0300 Subject: [PATCH] llvmPackages_13.compiler-rt: disable libfuzzer for aarch64 Libfuzzer fails to compile for aarch64 #140441. This change allows us to have sufficient functionality to build latest chromium. --- pkgs/development/compilers/llvm/13/compiler-rt/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix index 8fc32bbd0aec..403924547bfa 100644 --- a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix @@ -5,7 +5,7 @@ let useLLVM = stdenv.hostPlatform.useLLVM or false; bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none"; haveLibc = stdenv.cc.libc != null; - inherit (stdenv.hostPlatform) isMusl; + inherit (stdenv.hostPlatform) isMusl isAarch64; in @@ -27,10 +27,11 @@ stdenv.mkDerivation { "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}" + ] ++ lib.optionals (useLLVM || bareMetal || isMusl || isAarch64) [ + "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF" ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" "-DCOMPILER_RT_BUILD_XRAY=OFF" - "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF" "-DCOMPILER_RT_BUILD_PROFILE=OFF" ] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [ "-DCMAKE_C_COMPILER_WORKS=ON" @@ -110,7 +111,5 @@ stdenv.mkDerivation { # "All of the code in the compiler-rt project is dual licensed under the MIT # license and the UIUC License (a BSD-like license)": license = with lib.licenses; [ mit ncsa ]; - # TODO/FIXME: Build fails on Hydra: - broken = stdenv.isAarch64; }; }