示例#1
0
def _SetupLinuxHostDir(env, nacl_dir):
    # Use the 32-bit path by default, but fall back to 64-bit if the 32-bit does
    # not exist.
    dir_template = os.path.join(nacl_dir, 'toolchain', 'pnacl_linux_x86',
                                'host_%s')
    dir_32 = dir_template % 'x86_32'
    dir_64 = dir_template % 'x86_64'
    driver_tools.AddHostBinarySearchPath(
        dir_32 if os.path.exists(dir_32) else dir_64)
示例#2
0
def SetupHostDir(env):
    # Some of the tools end up running one of the host binaries. Find the host
    # dir on the test system and inject it into the search path using the
    # implementation of -B
    test_dir = os.path.abspath(dirname(__file__))
    nacl_dir = dirname(dirname(dirname(test_dir)))

    os_shortname = driver_tools.GetOSName()
    host_dir = os.path.join(nacl_dir, 'toolchain', '%s_x86' % os_shortname,
                            'pnacl_newlib_raw')
    driver_tools.AddHostBinarySearchPath(host_dir)
示例#3
0
def SetupHostDir(env):
    # Some of the tools end up running one of the host binaries. Find the host
    # dir on the test system and inject it into the search path using the
    # implementation of -B
    test_dir = os.path.abspath(dirname(__file__))
    nacl_dir = dirname(dirname(dirname(test_dir)))
    if sys.platform == 'darwin':
        host_arch = 'x86_64'
    elif sys.platform.startswith('linux'):
        _SetupLinuxHostDir(env, nacl_dir)
        return
    elif sys.platform in ('cygwin', 'win32'):
        host_arch = 'x86_32'

    os_shortname = driver_tools.GetOSName()
    host_dir = os.path.join(nacl_dir, 'toolchain', '%s_x86' % os_shortname,
                            'pnacl_newlib', 'host_%s' % host_arch)
    driver_tools.AddHostBinarySearchPath(host_dir)