[PATCH] D143678: [bazel] Add layering-check

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 05:00:17 PST 2023


gchatelet updated this revision to Diff 503328.
gchatelet added a comment.

- Disable layering check when using mpfr_system
- Remove layering_check on MPRFUtils instead


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143678

Files:
  utils/bazel/.bazelrc
  utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel


Index: utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel
===================================================================
--- utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel
+++ utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel
@@ -27,6 +27,13 @@
     name = "mpfr_wrapper",
     srcs = ["MPFRUtils.cpp"],
     hdrs = ["MPFRUtils.h"],
+    # Disable layering check when using mpfr_system.
+    features = select(
+        {
+            "//conditions:default": [],
+            "//libc:mpfr_system": ["-layering_check"],
+        },
+    ),
     deps = [
         "//libc:__support_common",
         "//libc:__support_cpp_bit",
@@ -36,9 +43,9 @@
         "//libc:__support_fputil_fp_bits",
         "//libc:__support_fputil_platform_defs",
         "//libc:libc_root",
-        "//libc/utils/MPFRWrapper:mpfr_impl",
         "//libc/test/UnitTest:LibcUnitTest",
         "//libc/test/UnitTest:fp_test_helpers",
+        "//libc/utils/MPFRWrapper:mpfr_impl",
         "//libc/utils/testutils:libc_test_utils",
     ],
 )
Index: utils/bazel/.bazelrc
===================================================================
--- utils/bazel/.bazelrc
+++ utils/bazel/.bazelrc
@@ -22,6 +22,9 @@
 # based on compilation_mode.
 build --strip=never
 
+# Add layering check to all projects.
+build --features=layering_check
+
 ###############################################################################
 # Options to select different strategies for linking potential dependent
 # libraries. The default leaves it disabled.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143678.503328.patch
Type: text/x-patch
Size: 1571 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230308/49d67d2b/attachment.bin>


More information about the llvm-commits mailing list