diff --git a/test/lit.cfg b/test/lit.cfg index a20cfeea9..4dd440702 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -327,17 +327,16 @@ if(config.have_enzyme): # 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'], + [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') - -llvm_config_cmd.wait()