[compiler-rt] [compiler-rt] Partially enable building compiler-rt unit tests for spirv64 target (PR #215717)

via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 21:50:46 PDT 2026


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 origin/main...HEAD compiler-rt/test/builtins/Unit/lit.cfg.py
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
--- lit.cfg.py	2026-08-12 04:48:40.000000 +0000
+++ lit.cfg.py	2026-08-12 04:50:11.770871 +0000
@@ -85,16 +85,27 @@
         )
         # Check if the linker supports --start-group and --end-group
         # For nvptx64 target, it falls back to the default.
         if "spirv" in config.target_arch:
             builtins_bitcode_library = os.path.join(
-                config.compiler_rt_libdir, "libclang_rt.builtins%s.bc" % config.target_suffix)
-            librt_flags = "-Xclang -mlink-builtin-bitcode -Xclang " + builtins_bitcode_library + " "
+                config.compiler_rt_libdir,
+                "libclang_rt.builtins%s.bc" % config.target_suffix,
+            )
+            librt_flags = (
+                "-Xclang -mlink-builtin-bitcode -Xclang "
+                + builtins_bitcode_library
+                + " "
+            )
             libc_bitcode_library = os.path.join(
-                config.llvm_shlib_dir, config.target_triple, "libcbitcode.bc")
-            if (os.path.exists(libc_bitcode_library)):
-                librt_flags += "-Xclang -mlink-builtin-bitcode -Xclang " + libc_bitcode_library + " "
+                config.llvm_shlib_dir, config.target_triple, "libcbitcode.bc"
+            )
+            if os.path.exists(libc_bitcode_library):
+                librt_flags += (
+                    "-Xclang -mlink-builtin-bitcode -Xclang "
+                    + libc_bitcode_library
+                    + " "
+                )
             config.substitutions.append(("%librt ", librt_flags))
         elif linker_supports_start_group and "nvptx" not in config.target_arch:
             config.substitutions.append(
                 (
                     "%librt ",

``````````

</details>


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


More information about the llvm-commits mailing list