Skip to content

Commit

Permalink
Apply patch to build for darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
dzbarsky committed Oct 4, 2024
1 parent 61e71e1 commit eec0d77
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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)],
Expand Down
30 changes: 30 additions & 0 deletions fix_compiler_rt.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
commit 2b7a01e90d9de4ed3a6c1e114361f80acea15b1b
Author: David Zbarsky <[email protected]>
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 = [

0 comments on commit eec0d77

Please sign in to comment.