[llvm] [compiler-rt][Bazel] Support profile runtime on macOS and iOS (PR #214154)

Karim Alweheshy via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 02:06:12 PDT 2026


https://github.com/karim-alweheshy updated https://github.com/llvm/llvm-project/pull/214154

>From 19f36efa9eb66f13a6807a6564aebea6a5f0c0b2 Mon Sep 17 00:00:00 2001
From: Karim Alweheshy <karim.alweheshy at gmail.com>
Date: Wed, 5 Aug 2026 10:23:34 +0200
Subject: [PATCH] [compiler-rt][Bazel] Support profile runtime on macOS and iOS

---
 .../llvm-project-overlay/compiler-rt/BUILD.bazel | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel b/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
index afa726a14a5b1..c8fd941dd0c8a 100644
--- a/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
@@ -11,18 +11,24 @@ package(
 
 licenses(["notice"])
 
+POSIX_PROFILE_DEFINES = [
+    "COMPILER_RT_HAS_ATOMICS=1",
+    "COMPILER_RT_HAS_FCNTL_LCK=1",
+    "COMPILER_RT_HAS_UNAME=1",
+]
+
 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",
-        ],
+        "@platforms//os:ios": POSIX_PROFILE_DEFINES,
+        "@platforms//os:linux": POSIX_PROFILE_DEFINES,
+        "@platforms//os:macos": POSIX_PROFILE_DEFINES,
         # Will raise error unless supported platforms.
     }),
     target_compatible_with = select({
+        "@platforms//os:ios": [],
         "@platforms//os:linux": [],
+        "@platforms//os:macos": [],
         "//conditions:default": ["@platforms//:incompatible"],
     }),
 )



More information about the llvm-commits mailing list