Simplify the parsing of ARCH and Compiler specs.

llvm-svn: 130240
This commit is contained in:
Johnny Chen 2011-04-26 20:45:00 +00:00
parent 0009fcc39e
commit 489b52572c
1 changed files with 2 additions and 10 deletions

View File

@ -325,22 +325,14 @@ def parseOptionsAndInitTestdirs():
index += 1
if index >= len(sys.argv) or sys.argv[index].startswith('-'):
usage()
archSpec = sys.argv[index]
if archSpec.find('^') != -1:
archs = archSpec.split('^')
else:
os.environ["ARCH"] = archSpec
archs = sys.argv[index].split('^')
index += 1
elif sys.argv[index].startswith('-C'):
# Increment by 1 to fetch the CC spec.
index += 1
if index >= len(sys.argv) or sys.argv[index].startswith('-'):
usage()
ccSpec = sys.argv[index]
if ccSpec.find('^') != -1:
compilers = ccSpec.split('^')
else:
os.environ["CC"] = ccSpec
compilers = sys.argv[index].split('^')
index += 1
elif sys.argv[index].startswith('-D'):
dumpSysPath = True