From ded560caff587413a8f51be087fea35f60f9d60c Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Tue, 20 May 2025 19:30:50 -0700 Subject: [PATCH] llvmPackages_{20,21,git}.compiler-rt: no fmv on aarch64 without libc aarch64 FMV (Function MultiVersioning) is not available before the libc is available. This causes issues while building with compiler-rt on aarch64. By disabling FMV before the libc is available resolves missing symbol errors. --- .../development/compilers/llvm/common/compiler-rt/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix index 40ff633527ae..b077b25b7a51 100644 --- a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix @@ -244,6 +244,10 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals (noSanitizers && lib.versionAtLeast release_version "19") [ (lib.cmakeBool "COMPILER_RT_BUILD_CTX_PROFILE" false) ] + ++ + lib.optional (stdenv.hostPlatform.isAarch64 && !haveLibc) + # Fixes https://github.com/NixOS/nixpkgs/issues/393603 + (lib.cmakeBool "COMPILER_RT_DISABLE_AARCH64_FMV" true) ++ devExtraCmakeFlags; outputs = [