Skip to content

Commit

Permalink
Add zlib feature test to lit configuration
Browse files Browse the repository at this point in the history
Some new tests in libfuzzer have dependencies on zlib: add a feature test
for zlib so that we can add a REQUIRES field to the relevant tests.

Patch by Matthew Voss.

Differential Revision: https://reviews.llvm.org/D57366

llvm-svn: 352483
  • Loading branch information
jmorse committed Jan 29, 2019
1 parent ff193c4 commit 2601aa5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler-rt/test/lit.common.cfg
Expand Up @@ -98,6 +98,9 @@ config.available_features.add(config.host_os.lower())
if re.match(r'^x86_64.*-linux', config.target_triple):
config.available_features.add("x86_64-linux")

if config.have_zlib == "1":
config.available_features.add("zlib")

# Use ugly construction to explicitly prohibit "clang", "clang++" etc.
# in RUN lines.
config.substitutions.append(
Expand Down
2 changes: 2 additions & 0 deletions compiler-rt/test/lit.common.configured.in
Expand Up @@ -46,6 +46,8 @@ if config.enable_per_target_runtime_dir:
else:
set_default("target_suffix", "-%s" % config.target_arch)

set_default("have_zlib", "@HAVE_LIBZ@")

# LLVM tools dir can be passed in lit parameters, so try to
# apply substitution.
try:
Expand Down

0 comments on commit 2601aa5

Please sign in to comment.