Skip to content

Commit 2e4a78a

Browse files
authored
Configure build mode for LIT tests. (#190)
This change allows us to query the build mode used to build the compiler in LIT tests. This will enable the REQUIRES constraint to disable tests when the compiler is not built with asserts or in debug mode. See https://llvm.org/docs/TestingGuide.html\#constraining-test-execution for more details on constraining test execution.
1 parent 1f4817b commit 2e4a78a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/lit.cfg.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,7 @@
5555
# Add substitutions for all files in QSS compiler tools directory.
5656
tools = os.listdir(config.qss_compiler_tools_dir)
5757
llvm_config.add_tool_substitutions(tools, [config.qss_compiler_tools_dir])
58+
59+
llvm_config.feature_config(
60+
[('--assertion-mode', {'ON': 'asserts'}),
61+
('--build-mode', {'[Dd][Ee][Bb][Uu][Gg]': 'debug'})])

0 commit comments

Comments
 (0)