def ConfigureAndBuildTests(clobber=False): for arch in ARCHES: workpath = os.path.join(TOOLCHAIN_BUILD_OUT, ReplaceArch('bionic_$GCC_test_work', arch)) inspath = os.path.join(TOOLCHAIN_BUILD_OUT, ReplaceArch('bionic_$GCC_test_install', arch)) if clobber: print 'Clobbering' Rmdir(workpath) Rmdir(inspath) Mkdir(workpath) Mkdir(inspath) ConfigureAndBuild(arch, 'bionic/tests', workpath, inspath)
def Clobber(fast=False): if not fast: Rmdir(os.path.join(TOOLCHAIN_BUILD, 'cache')) Rmdir(os.path.join(TOOLCHAIN_BUILD_OUT, 'gcc_arm_work')) BUILD_DIRS = [ 'linux_%s_bionic', 'bionic_%s_work', ] for arch in ARCHES: Rmdir(GetToolchainPath(arch, 'bionic')) for workdir in BUILD_DIRS: Rmdir(os.path.join(TOOLCHAIN_BUILD_OUT, workdir % arch))
def CreateProject(arch, project, clobber=False): paths = GetProjectPaths(arch, project) MAKEFILE_TEMPLATE = """ # Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # GNU Makefile based on shared rules provided by the Native Client SDK. # See README.Makefiles for more details. NATIVE_CLIENT_PATH?=$(nacl_path) TOOLCHAIN_PATH?=$(tc_path) TOOLCHAIN_PREFIX:=$(TOOLCHAIN_PATH)/bin/$GCC-nacl- CC:=$(TOOLCHAIN_PREFIX)gcc CXX:=$(TOOLCHAIN_PREFIX)g++ AR:=$(TOOLCHAIN_PREFIX)ar SRC_ROOT=$(src_path) DST_ROOT=$(dst_path) INS_ROOT=$(ins_path) NACL_ARCH=$NACL GCC_ARCH=$GCC MAKEFILE_DEPS:=$(build_tc_path)/tc_bionic.mk MAKEFILE_DEPS+=$(src_path)/Makefile include $(build_tc_path)/tc_bionic.mk include $(src_path)/Makefile """ remap = { '$(src_path)': paths['src'], '$(dst_path)': paths['work'], '$(ins_path)': paths['ins'], '$(tc_path)': GetBionicBuildPath(arch), '$(build_tc_path)': TOOLCHAIN_BUILD, '$(nacl_path)': NATIVE_CLIENT, } text = ReplaceText(MAKEFILE_TEMPLATE, [remap]) text = ReplaceArch(text, arch) if clobber: print 'Clobbering Bionic project directory: ' + paths['work'] Rmdir(paths['work']) Mkdir(paths['work']) Mkdir(paths['ins']) UpdateText(os.path.join(paths['work'], 'Makefile'), text)
def Clobber(): Rmdir(os.path.join(TOOLCHAIN_BUILD, 'cache')) for arch in ARCHES: Rmdir(GetToolchainPath(arch, 'bionic')) for workdir in PROJECTS: Rmdir(os.path.join(TOOLCHAIN_BUILD_OUT, workdir % arch))
def Clobber(): for arch in ARCHES: Rmdir(os.path.join(TOOLCHAIN, 'linux_%s_bionic' % arch)) for workdir in PROJECTS: Rmdir(os.path.join(TOOLCHAIN_BUILD_OUT, workdir % arch))