def main(argv): parser = OptionParser() parser.add_option('-t', '--toolchain', dest='toolchains', action='append', type='string', help='NaCl toolchain directory') parser.add_option('--third-party', dest='third_party_dir', type='string', default='third_party', help='location of third_party directory') (options, args) = parser.parse_args(argv) if args: print 'WARNING: unrecognized argument: %s' % str(args) parser.print_help() if not options.toolchains: options.toolchains = [build_utils.TOOLCHAIN_AUTODETECT] options.toolchains = [ build_utils.NormalizeToolchain(tc) for tc in options.toolchains ] print "Installing boost into %s" % str(options.third_party_dir) return InstallBoost(options)
def main(argv): shell_env = os.environ if not build_utils.CheckPatchVersion(shell_env): sys.exit(0) parser = OptionParser() parser.add_option('-t', '--toolchain', dest='toolchain', default=build_utils.TOOLCHAIN_AUTODETECT, help='where to put the testing libraries') parser.add_option( '-b', '--bit-spec', dest='bit_spec', default=BIT_SPEC_DEFAULT, help='comma separated list of instruction set bit-widths') parser.add_option('-w', '--working_dir', dest='working_dir', default=None, help='where to untar and build the test libs.') (options, args) = parser.parse_args(argv) if args: print 'ERROR: invalid argument: %s' % str(args) parser.print_help() sys.exit(1) options.must_clean_up = False options.shell_env = shell_env options.script_dir = os.path.abspath(os.path.dirname(__file__)) options.toolchain = build_utils.NormalizeToolchain(options.toolchain) print "Installing testing libs into toolchain %s" % options.toolchain return InstallTestingLibs(options)
def main(argv): parser = OptionParser() parser.add_option( '-a', '--all-toolchains', dest='all_toolchains', action='store_true', help='Install into all available toolchains.') (options, args) = parser.parse_args(argv) if args: print 'ERROR: invalid argument: %s' % str(args) parser.print_help() sys.exit(1) python_paths = [SCRIPT_DIR, SCONS_DIR] shell_env = os.environ.copy() python_paths += [shell_env.get('PYTHONPATH', '')] shell_env['PYTHONPATH'] = os.pathsep.join(python_paths) # Force NACL_SDK_ROOT to point to the toolchain in this repo. nacl_sdk_root = os.path.dirname(SCRIPT_DIR) shell_env['NACL_SDK_ROOT'] = nacl_sdk_root script_argv = [arg for arg in argv if not arg in ['-a', '--all-toolchains']] if options.all_toolchains: script_argv += [ '--toolchain=%s' % ( build_utils.NormalizeToolchain(base_dir=nacl_sdk_root, arch='x86', variant='glibc')), '--toolchain=%s' % ( build_utils.NormalizeToolchain(base_dir=nacl_sdk_root, arch='x86', variant='newlib')), '--third-party=%s' % THIRD_PARTY_DIR, ] for script in THIRD_PARTY_SCRIPTS: print "Running install script: %s" % os.path.join(SCRIPT_DIR, script) py_command = [sys.executable, os.path.join(SCRIPT_DIR, script)] subprocess.check_call(py_command + script_argv, env=shell_env)