[clang] [compiler-rt] [asan][windows] Eliminate the static asan runtime on windows (PR #81677)

via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 13 14:20:36 PST 2024


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 4af24d4ab76539706bfbceec4b3923426fb1b9e7...c7eaa51d14fca4fac23ad8e5a937a8494f031eeb compiler-rt/test/asan/lit.cfg.py
``````````

</details>

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

``````````diff
--- lit.cfg.py	2024-02-13 05:31:14.000000 +0000
+++ lit.cfg.py	2024-02-13 22:20:23.086777 +0000
@@ -131,11 +131,11 @@
             "libclang_rt.asan_{}_dynamic.dylib".format(config.apple_platform),
         )
     elif config.host_os == "Windows":
         shared_libasan_path = os.path.join(
             config.compiler_rt_libdir,
-            "clang_rt.asan_dynamic-{}.lib".format(config.target_suffix)
+            "clang_rt.asan_dynamic-{}.lib".format(config.target_suffix),
         )
     else:
         lit_config.warning(
             "%shared_libasan substitution not set but dynamic ASan is available."
         )
@@ -183,16 +183,24 @@
         base_lib = os.path.join(
             config.compiler_rt_libdir, "clang_rt.asan%%s%s.lib" % config.target_suffix
         )
         config.substitutions.append(("%asan_lib", base_lib % "_dynamic"))
         if config.asan_dynamic:
-            config.substitutions.append(("%asan_thunk", base_lib % "_dynamic_runtime_thunk"))
+            config.substitutions.append(
+                ("%asan_thunk", base_lib % "_dynamic_runtime_thunk")
+            )
         else:
-            config.substitutions.append(("%asan_thunk", base_lib % "_static_runtime_thunk"))
+            config.substitutions.append(
+                ("%asan_thunk", base_lib % "_static_runtime_thunk")
+            )
         config.substitutions.append(("%asan_cxx_lib", base_lib % "_cxx"))
-        config.substitutions.append(("%asan_dynamic_runtime_thunk", base_lib % "_dynamic_runtime_thunk"))
-        config.substitutions.append(("%asan_static_runtime_thunk", base_lib % "_static_runtime_thunk"))
+        config.substitutions.append(
+            ("%asan_dynamic_runtime_thunk", base_lib % "_dynamic_runtime_thunk")
+        )
+        config.substitutions.append(
+            ("%asan_static_runtime_thunk", base_lib % "_static_runtime_thunk")
+        )
         config.substitutions.append(("%asan_dll_thunk", base_lib % "_dll_thunk"))
     else:
         # To make some of these tests work on MinGW target without changing their
         # behaviour for MSVC target, substitute clang-cl flags with gcc-like ones.
         config.substitutions.append(("%clang_cl ", build_invocation(target_cxxflags)))

``````````

</details>


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


More information about the cfe-commits mailing list