Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/pybin/settings.py

    r552f5cb rf3b9efc  
    1 from __future__ import print_function
    2 
    3 import os
    41import sys
    5 
    6 try :
    7         sys.path.append(os.getcwd())
    8         import config
    9 
    10         SRCDIR = os.path.abspath(config.SRCDIR)
    11         BUILDDIR = os.path.abspath(config.BUILDDIR)
    12 except:
    13         print('ERROR: missing config.py, re-run configure script.', file=sys.stderr)
    14         sys.exit(1)
    152
    163class Architecture:
     
    185                'x64'                   : 'x64',
    196                'x86-64'                : 'x64',
    20                 'x86_64'                : 'x64',
    217                'x86'                   : 'x86',
    228                'i386'          : 'x86',
     
    3925                        self.cross_compile = False
    4026                        try:
    41                                 arch = config.HOSTARCH
     27                                arch = machine_default()
    4228                                self.target = Architecture.makeCanonical( arch )
    4329                        except KeyError:
     
    8066        arch       = Architecture(options.arch)
    8167
    82 
    8368def updateMakeCmd(force, jobs):
    8469        global make
    8570
    8671        make = "make" if not force else ("make -j%i" % jobs)
     72
     73
     74def set_machine_default( func ):
     75        global machine_default
     76
     77        machine_default = func
Note: See TracChangeset for help on using the changeset viewer.