[compiler-rt] [CompilerRT][ASan] Add new substitutions for tests while using lto to (PR #78523)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 17 15:58:43 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 de423cfe3d5de0110b4f55ff1742988b529be6d2...2590446306d4150aa562b3369694c33118779654 compiler-rt/test/asan/lit.cfg.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- lit.cfg.py 2024-01-17 23:48:00.000000 +0000
+++ lit.cfg.py 2024-01-17 23:58:36.104680 +0000
@@ -99,24 +99,28 @@
else:
win_runtime_feature = "win32-static-asan"
config.available_features.add(win_runtime_feature)
-def build_invocation(compile_flags, with_lto = False):
+def build_invocation(compile_flags, with_lto=False):
lto_flags = []
if with_lto and config.lto_supported:
- lto_flags += config.lto_flags
+ lto_flags += config.lto_flags
return " " + " ".join([config.clang] + lto_flags + compile_flags) + " "
config.substitutions.append(("%clang ", build_invocation(target_cflags)))
config.substitutions.append(("%clangxx ", build_invocation(target_cxxflags)))
config.substitutions.append(("%clang_asan ", build_invocation(clang_asan_cflags)))
config.substitutions.append(("%clangxx_asan ", build_invocation(clang_asan_cxxflags)))
-config.substitutions.append(("%clang_asan_lto ", build_invocation(clang_asan_cflags, True)))
-config.substitutions.append(("%clangxx_asan_lto ", build_invocation(clang_asan_cxxflags, True)))
+config.substitutions.append(
+ ("%clang_asan_lto ", build_invocation(clang_asan_cflags, True))
+)
+config.substitutions.append(
+ ("%clangxx_asan_lto ", build_invocation(clang_asan_cxxflags, True))
+)
if config.asan_dynamic:
if config.host_os in ["Linux", "FreeBSD", "NetBSD", "SunOS"]:
shared_libasan_path = os.path.join(
config.compiler_rt_libdir,
"libclang_rt.asan{}.so".format(config.target_suffix),
``````````
</details>
https://github.com/llvm/llvm-project/pull/78523
More information about the llvm-commits
mailing list