Skip to content

Commit

Permalink
Fix pass params to llvm-config
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-penev committed Nov 30, 2023
1 parent 213de7b commit 14e39c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
25 changes: 1 addition & 24 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import os
import platform
import re
#import subprocess

import lit.formats
import lit.util
Expand Down Expand Up @@ -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')
3 changes: 3 additions & 0 deletions test/lit.site.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 14e39c2

Please sign in to comment.