From 4040a6d1314b770a4c38cd7979e6dd8fd779e3ad Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 23 Feb 2023 13:44:01 +0000 Subject: [PATCH] llvmPackages_git.compiler-rt: fix Glibc build Copied from LLVM 15. --- pkgs/development/compilers/llvm/git/compiler-rt/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/git/compiler-rt/default.nix b/pkgs/development/compilers/llvm/git/compiler-rt/default.nix index cac41e6014d6..29509afbfdf2 100644 --- a/pkgs/development/compilers/llvm/git/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/git/compiler-rt/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, llvm_meta, version , monorepoSrc, runCommand -, cmake, python3, xcbuild, libllvm, libcxxabi +, cmake, python3, xcbuild, libllvm, libcxxabi, libxcrypt , doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD }: @@ -39,6 +39,8 @@ stdenv.mkDerivation { "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}" + ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.libc == "glibc") [ + "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" "-DCOMPILER_RT_BUILD_XRAY=OFF"