Skip to content
Snippets Groups Projects
Commit 1e76cbae authored by Hans Wennborg's avatar Hans Wennborg
Browse files

lit.cfg: Don't expand %ms_abi_triple to non-X86 triples

This is a follow-up to r199260. On ARM hosts, we were attempting to run
tests with triples such as armv7l-unknown-win32. This expands that fix to
cover all non-x86 targets since we only support MS ABI on x86.

llvm-svn: 199280
parent 8f31e213
No related branches found
No related tags found
No related merge requests found
...@@ -241,17 +241,17 @@ def makeMSABITriple(triple): ...@@ -241,17 +241,17 @@ def makeMSABITriple(triple):
m = re.match(r'(\w+)-(\w+)-(\w+)', triple) m = re.match(r'(\w+)-(\w+)-(\w+)', triple)
if not m: if not m:
lit_config.fatal("Could not turn '%s' into MS ABI triple" % triple) lit_config.fatal("Could not turn '%s' into MS ABI triple" % triple)
isa = m.group(1) isa = m.group(1).lower()
vendor = m.group(2) vendor = m.group(2).lower()
os = m.group(3) os = m.group(3).lower()
if os.lower() == 'win32': if os == 'win32':
# If the OS is win32, we're done. # If the OS is win32, we're done.
return triple return triple
if "arm" in isa.lower(): if isa.startswith('x86') or isa == 'amd64' or re.match(r'i\d86', isa):
# FIXME: Fix failures with arm*-*-win32. # For x86 ISAs, adjust the OS.
isa = "i686" return isa + '-' + vendor + '-win32'
# Otherwise, replace the OS part with Win32. # -win32 is not supported for non-x86 targets; use a default.
return isa + '-' + vendor + '-win32' return 'i686-pc-win32'
config.substitutions.append( ('%clang_cc1', '%s -cc1 -internal-isystem %s' config.substitutions.append( ('%clang_cc1', '%s -cc1 -internal-isystem %s'
% (config.clang, % (config.clang,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment