diff --git a/test/lit.cfg b/test/lit.cfg index 176c0536e..1797ec687 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -5,7 +5,6 @@ import os import platform import re -#import subprocess import lit.formats import lit.util @@ -326,32 +325,10 @@ if libcudart_path is not None: if(config.have_enzyme): config.available_features.add('Enzyme') - -print(type(lit_config)) -print(type(config)) -print(type(llvm_config)) - -# Ask llvm-config about asserts +# Ask llvm-config about asserts and build mode llvm_config.feature_config( [ ("--assertion-mode", {"ON": "asserts"}), ("--build-mode", {"[Dd][Ee][Bb][Uu][Gg]": "debug"}), ] ) - -# Ask llvm-config about assertion mode and build-mode. -#try: -# llvm_config_cmd = subprocess.Popen( -# [os.path.join(llvm_tools_dir, 'llvm-config'), '--assertion-mode', '--build-mode'], -# stdout = subprocess.PIPE, -# env=config.environment) -#except OSError: -# print("Could not find llvm-config in " + llvm_tools_dir) -# exit(42) -#res=llvm_config_cmd.stdout.read().decode('ascii') -#llvm_config_cmd.wait() -# -#if re.search(r'ON', res): -# config.available_features.add('asserts') -#if re.search(r'[Dd][Ee][Bb][Uu][Gg]', res): -# config.available_features.add('debug') diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in index dd865ad9a..a82bd36d7 100644 --- a/test/lit.site.cfg.in +++ b/test/lit.site.cfg.in @@ -22,5 +22,8 @@ except KeyError: key, = e.args lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key)) +import lit.llvm +lit.llvm.initialize(lit_config, config) + # Let the main config do the real work. lit_config.load_config(config, "@CLAD_SOURCE_DIR@/test/lit.cfg")