Index: compiler-rt/test/fuzzer/lit.cfg =================================================================== --- compiler-rt/test/fuzzer/lit.cfg +++ compiler-rt/test/fuzzer/lit.cfg @@ -24,9 +24,6 @@ # the test runner updated. config.test_format = lit.formats.ShTest(execute_external) -if config.have_zlib == "1": - config.available_features.add("zlib") - # LeakSanitizer is not supported on OSX or Windows right now. if (sys.platform.startswith('darwin') or sys.platform.startswith('freebsd') or Index: compiler-rt/test/fuzzer/lit.site.cfg.in =================================================================== --- compiler-rt/test/fuzzer/lit.site.cfg.in +++ compiler-rt/test/fuzzer/lit.site.cfg.in @@ -12,8 +12,6 @@ config.llvm_library_dir = "@LLVM_LIBRARY_DIR@" config.target_triple = "@TARGET_TRIPLE@" -config.have_zlib = "@HAVE_LIBZ@" - # Load common config for all compiler-rt lit tests. lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured") Index: compiler-rt/test/lit.common.cfg =================================================================== --- compiler-rt/test/lit.common.cfg +++ compiler-rt/test/lit.common.cfg @@ -98,6 +98,9 @@ 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( Index: compiler-rt/test/lit.common.configured.in =================================================================== --- compiler-rt/test/lit.common.configured.in +++ compiler-rt/test/lit.common.configured.in @@ -46,6 +46,8 @@ else: set_default("target_suffix", "-%s" % config.target_arch) +config.have_zlib = "@HAVE_LIBZ" + # LLVM tools dir can be passed in lit parameters, so try to # apply substitution. try: