[compiler-rt] [compiler-rt] Allow running tests without installing first (PR #83088)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 1 19:12:31 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 73dfc7bbadddeb2930b11e4ad07f9a8e8b498cc7...9c8044e53c8757a8f6066521ae7ade15b2951c1c compiler-rt/test/fuzzer/lit.cfg.py compiler-rt/test/lit.common.cfg.py compiler-rt/test/safestack/lit.cfg.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- lit.common.cfg.py 2024-02-27 19:12:27.000000 +0000
+++ lit.common.cfg.py 2024-03-02 03:12:24.672285 +0000
@@ -31,10 +31,11 @@
if allow_failure:
lit_config.warning(msg)
else:
lit_config.fatal(msg)
return path, clang_cmd
+
def find_compiler_libdir():
"""
Returns the path to library resource directory used
by the compiler.
@@ -184,12 +185,14 @@
lit_config.note(f"Resource dir for {config.clang} is {test_cc_resource_dir}")
local_build_resource_dir = os.path.realpath(config.compiler_rt_output_dir)
if test_cc_resource_dir != local_build_resource_dir:
if config.test_standalone_build_libs and config.compiler_id == "Clang":
if lit_config.debug:
- lit_config.note(f'Overriding test compiler resource dir to use '
- f'libraries in "{config.compiler_rt_libdir}"')
+ lit_config.note(
+ f"Overriding test compiler resource dir to use "
+ f'libraries in "{config.compiler_rt_libdir}"'
+ )
# Ensure that we use the just-built static libraries when linking by
# overriding the Clang resource directory. Additionally, we want to use
# the builtin headers shipped with clang (e.g. stdint.h), so we
# explicitly add this as an include path (since the headers are not
# going to be in the current compiler-rt build directory).
--- safestack/lit.cfg.py 2024-02-27 00:59:08.000000 +0000
+++ safestack/lit.cfg.py 2024-03-02 03:12:24.724391 +0000
@@ -11,14 +11,20 @@
# Test suffixes.
config.suffixes = [".c", ".cpp", ".m", ".mm", ".ll", ".test"]
# Add clang substitutions.
config.substitutions.append(
- ("%clang_nosafestack ", config.clang + config.target_cflags + " -O0 -fno-sanitize=safe-stack ")
+ (
+ "%clang_nosafestack ",
+ config.clang + config.target_cflags + " -O0 -fno-sanitize=safe-stack ",
+ )
)
config.substitutions.append(
- ("%clang_safestack ", config.clang + config.target_cflags + " -O0 -fsanitize=safe-stack ")
+ (
+ "%clang_safestack ",
+ config.clang + config.target_cflags + " -O0 -fsanitize=safe-stack ",
+ )
)
if config.lto_supported:
config.substitutions.append(
(
``````````
</details>
https://github.com/llvm/llvm-project/pull/83088
More information about the llvm-commits
mailing list