Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[compiler-rt] Allow running tests without installing first #83088

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix python formatting
Created using spr 1.3.6-beta.1
  • Loading branch information
arichardson committed Mar 3, 2024
commit c4cb96509ce30182f4fecdd21bf36f6dd94e8d68
7 changes: 5 additions & 2 deletions compiler-rt/test/lit.common.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def get_path_from_clang(args, allow_failure):
lit_config.fatal(msg)
return path, clang_cmd


def find_compiler_libdir():
"""
Returns the path to library resource directory used
Expand Down Expand Up @@ -186,8 +187,10 @@ def push_dynamic_library_lookup_path(config, new_path):
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
Expand Down
10 changes: 8 additions & 2 deletions compiler-rt/test/safestack/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@

# 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:
Expand Down