diff --git a/WORKSPACE b/WORKSPACE index a487a50..c147989 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -26,6 +26,7 @@ http_archive( patches = [ "//:llvm.patch", "//:fix_RISCVGenMacroFusion_build.patch", + "//:fix_compiler_rt.patch", ], strip_prefix = "llvm-project-" + LLVM_COMMIT, urls = ["https://github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT)], diff --git a/fix_compiler_rt.patch b/fix_compiler_rt.patch new file mode 100644 index 0000000..775a071 --- /dev/null +++ b/fix_compiler_rt.patch @@ -0,0 +1,30 @@ +commit 2b7a01e90d9de4ed3a6c1e114361f80acea15b1b +Author: David Zbarsky +Date: Fri Oct 4 16:00:55 2024 -0400 + + patch + +diff --git a/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel b/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel +index bba18bfd387a..c075d5fb3770 100644 +--- a/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel ++++ b/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel +@@ -11,14 +11,11 @@ licenses(["notice"]) + + cc_library( + name = "config", +- defines = select({ +- "@platforms//os:linux": [ +- "COMPILER_RT_HAS_ATOMICS=1", +- "COMPILER_RT_HAS_FCNTL_LCK=1", +- "COMPILER_RT_HAS_UNAME=1", +- ], +- # Will raise error unless supported platforms. +- }), ++ defines = [ ++ "COMPILER_RT_HAS_ATOMICS=1", ++ "COMPILER_RT_HAS_FCNTL_LCK=1", ++ "COMPILER_RT_HAS_UNAME=1", ++ ], + ) + + WIN32_ONLY_FILES = [