Skip to content

Commit aec240e

Browse files
committed
test: add a local lit configuration for Interop
This adds a local lit configuration for simplifying matching against different ABIs.
1 parent 24a6f37 commit aec240e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/Interop/lit.local.cfg

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Make a local copy of the substitutions.
2+
config.substitutions = list(config.substitutions)
3+
4+
def get_target_os():
5+
import re
6+
(run_cpu, run_vendor, run_os, run_version) = re.match('([^-]+)-([^-]+)-([^0-9]+)(.*)', config.variant_triple).groups()
7+
return run_os
8+
9+
if get_target_os() in ['windows-msvc']:
10+
config.substitutions.insert(0, ('%target-abi', 'WIN'))
11+
else:
12+
# FIXME(compnerd) do all the targets we currently support use SysV ABI?
13+
config.substitutions.insert(0, ('%target-abi', 'SYSV'))
14+

0 commit comments

Comments
 (0)