Changeset 575a6e5 for tests/pybin/settings.py
- Timestamp:
- Aug 9, 2018, 11:07:05 AM (5 years ago)
- Branches:
- aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 7a7ab42
- Parents:
- a5121bf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/pybin/settings.py
ra5121bf r575a6e5 29 29 } 30 30 31 CrossCompileFlags = { 32 'x64' : 'ARCH_FLAGS=-m64', 33 'x86' : 'ARCH_FLAGS=-m32', 34 } 35 31 36 def __init__(self, arch): 37 try: 38 canonical_host = Architecture.makeCanonical( config.HOSTARCH ) 39 except KeyError: 40 print("Unkown host architecture %s" % config.HOSTARCH, file=sys.stderr) 41 sys.exit(1) 42 32 43 if arch: 44 try: 45 arch = Architecture.makeCanonical( arch ) 46 except KeyError: 47 print("Unkown architecture %s" % arch, file=sys.stderr) 48 sys.exit(1) 49 50 if arch and arch != canonical_host: 51 self.target = arch 33 52 self.cross_compile = True 34 try :35 self. target = Architecture.makeCanonical( arch )53 try : 54 self.flags = Architecture.CrossCompileFlags[arch] 36 55 except KeyError: 37 print(" Unkown architecture %s" % arch)56 print("Cross compilation not available for architecture %s" % arch, file=sys.stderr) 38 57 sys.exit(1) 58 39 59 else: 60 self.target = canonical_host 40 61 self.cross_compile = False 41 try: 42 arch = config.HOSTARCH 43 self.target = Architecture.makeCanonical( arch ) 44 except KeyError: 45 print("Running on unkown architecture %s" % arch) 46 sys.exit(1) 62 self.flags = "" 47 63 48 64 self.string = self.target … … 65 81 def __init__(self, value): 66 82 self.string = "debug" if value else "no debug" 67 self.flags = """DEBUG_FLAGS="%s" """ % ("-debug " if value else "-nodebug")83 self.flags = """DEBUG_FLAGS="%s" """ % ("-debug -O0" if value else "-nodebug -O2") 68 84 69 85 class Install: … … 98 114 with open (".validate.err", "r") as myfile: 99 115 error=myfile.read() 100 print( 'ERROR: Invalid configuration', file=sys.stderr)116 print("ERROR: Invalid configuration %s:%s" % (arch.string, debug.string), file=sys.stderr) 101 117 print(" verify returned : \n%s" % error, file=sys.stderr) 102 118 tools.rm("%s/.validate.err" % BUILDDIR)
Note: See TracChangeset
for help on using the changeset viewer.