[libcxx-commits] [libcxx] [libc++] Move compiler-detection Lit features first (PR #73544)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 27 09:02:10 PST 2023


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r d8b8aa3a56611477f93d029a59a0b350fb5166b0..9f9c52904352e88e892257e57ec3fe4eee684890 libcxx/utils/libcxx/test/features.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- features.py	2023-11-27 16:57:46.000000 +0000
+++ features.py	2023-11-27 17:02:02.316774 +0000
@@ -64,28 +64,36 @@
     Feature(
         name=lambda cfg: "apple-clang-{__clang_major__}".format(**compilerMacros(cfg)),
         when=_isAppleClang,
     ),
     Feature(
-        name=lambda cfg: "apple-clang-{__clang_major__}.{__clang_minor__}".format(**compilerMacros(cfg)),
+        name=lambda cfg: "apple-clang-{__clang_major__}.{__clang_minor__}".format(
+            **compilerMacros(cfg)
+        ),
         when=_isAppleClang,
     ),
     Feature(
-        name=lambda cfg: "apple-clang-{__clang_major__}.{__clang_minor__}.{__clang_patchlevel__}".format(**compilerMacros(cfg)),
+        name=lambda cfg: "apple-clang-{__clang_major__}.{__clang_minor__}.{__clang_patchlevel__}".format(
+            **compilerMacros(cfg)
+        ),
         when=_isAppleClang,
     ),
     Feature(name="clang", when=_isClang),
     Feature(
         name=lambda cfg: "clang-{__clang_major__}".format(**compilerMacros(cfg)),
         when=_isClang,
     ),
     Feature(
-        name=lambda cfg: "clang-{__clang_major__}.{__clang_minor__}".format(**compilerMacros(cfg)),
+        name=lambda cfg: "clang-{__clang_major__}.{__clang_minor__}".format(
+            **compilerMacros(cfg)
+        ),
         when=_isClang,
     ),
     Feature(
-        name=lambda cfg: "clang-{__clang_major__}.{__clang_minor__}.{__clang_patchlevel__}".format(**compilerMacros(cfg)),
+        name=lambda cfg: "clang-{__clang_major__}.{__clang_minor__}.{__clang_patchlevel__}".format(
+            **compilerMacros(cfg)
+        ),
         when=_isClang,
     ),
     # Note: Due to a GCC bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104760), we must disable deprecation warnings
     #       on GCC or spurious diagnostics are issued.
     #
@@ -104,21 +112,24 @@
     ),
     Feature(
         name=lambda cfg: "gcc-{__GNUC__}".format(**compilerMacros(cfg)), when=_isGCC
     ),
     Feature(
-        name=lambda cfg: "gcc-{__GNUC__}.{__GNUC_MINOR__}".format(**compilerMacros(cfg)),
+        name=lambda cfg: "gcc-{__GNUC__}.{__GNUC_MINOR__}".format(
+            **compilerMacros(cfg)
+        ),
         when=_isGCC,
     ),
     Feature(
-        name=lambda cfg: "gcc-{__GNUC__}.{__GNUC_MINOR__}.{__GNUC_PATCHLEVEL__}".format(**compilerMacros(cfg)),
+        name=lambda cfg: "gcc-{__GNUC__}.{__GNUC_MINOR__}.{__GNUC_PATCHLEVEL__}".format(
+            **compilerMacros(cfg)
+        ),
         when=_isGCC,
     ),
     Feature(name="msvc", when=_isMSVC),
     Feature(name=lambda cfg: "msvc-{}".format(*_msvcVersion(cfg)), when=_isMSVC),
     Feature(name=lambda cfg: "msvc-{}.{}".format(*_msvcVersion(cfg)), when=_isMSVC),
-
     Feature(
         name="thread-safety",
         when=lambda cfg: hasCompileFlag(cfg, "-Werror=thread-safety"),
         actions=[AddCompileFlag("-Werror=thread-safety")],
     ),

``````````

</details>


https://github.com/llvm/llvm-project/pull/73544


More information about the libcxx-commits mailing list