[PATCH] D156095: [Bazel] Introduce `//compiler-rt:profile`

NAKAMURA Takumi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 6 06:11:12 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcd25a50a8f26: [Bazel] Introduce `//compiler-rt:profile` (authored by chapuni).

Changed prior to commit:
  https://reviews.llvm.org/D156095?vs=555718&id=556019#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156095/new/

https://reviews.llvm.org/D156095

Files:
  utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel


Index: utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
===================================================================
--- /dev/null
+++ utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
@@ -0,0 +1,51 @@
+# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+package(
+    default_visibility = ["//visibility:public"],
+    features = ["layering_check"],
+)
+
+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.
+    }),
+)
+
+WIN32_ONLY_FILES = [
+    "lib/profile/WindowsMMap.c",
+]
+
+cc_library(
+    name = "profile",
+    srcs = glob(
+        [
+            "lib/profile/*.c",
+            "lib/profile/*.cpp",
+            "lib/profile/*.h",
+        ],
+        exclude = WIN32_ONLY_FILES,
+    ) + select({
+        "@platforms//os:windows": WIN32_ONLY_FILES,
+        "//conditions:default": []
+    }),
+    hdrs = glob([
+        "include/profile/*.inc",
+    ]),
+    includes = [
+        "include",
+    ],
+    deps = [
+        ":config",
+    ],
+    linkstatic = True,
+)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156095.556019.patch
Type: text/x-patch
Size: 1417 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230906/dfed4e54/attachment.bin>


More information about the llvm-commits mailing list