llvmPackages_git.compiler-rt: fix Glibc build

Copied from LLVM 15.

Changed files
+3 -1
pkgs
development
compilers
llvm
git
compiler-rt
+3 -1
pkgs/development/compilers/llvm/git/compiler-rt/default.nix
···
{ lib, stdenv, llvm_meta, version
, monorepoSrc, runCommand
-
, cmake, python3, xcbuild, libllvm, libcxxabi
, doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD
}:
···
"-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) [
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=OFF"
···
{ lib, stdenv, llvm_meta, version
, monorepoSrc, runCommand
+
, cmake, python3, xcbuild, libllvm, libcxxabi, libxcrypt
, doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD
}:
···
"-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"