Skip to content

Commit 13d3506

Browse files
committed
test: define expansion macro always
If `%target-cc-options` was used but the substitution was not defined, we would end up substituting it as `%t`arget-cc-options which is rather confusing. Always define the macro, even if it is expanded to the empty string.
1 parent 5182104 commit 13d3506

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/lit.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,8 @@ config.substitutions.append(('%target-clang', config.target_clang))
12751275
config.substitutions.append(('%target-ld', config.target_ld))
12761276
if hasattr(config, 'target_cc_options'):
12771277
config.substitutions.append(('%target-cc-options', config.target_cc_options))
1278+
else:
1279+
config.substitutions.append(('%target-cc-options', ''))
12781280

12791281
config.substitutions.append(
12801282
(r'%hardlink-or-copy\(from: *(.*), *to: *(.*)\)',

0 commit comments

Comments
 (0)