Light refactoring of the build script
This commit is contained in:
Родитель
ebc51d8854
Коммит
64fd40b2b6
31
script/build
31
script/build
|
@ -52,20 +52,23 @@ def main():
|
|||
|
||||
os.chdir(SOURCE_ROOT)
|
||||
|
||||
for component in COMPONENTS:
|
||||
if args.component == None or component in args.component:
|
||||
if component == 'shared_library' and args.no_shared_library:
|
||||
continue
|
||||
elif component == 'static_library' and args.no_static_library:
|
||||
continue
|
||||
out_dir = get_output_dir(SOURCE_ROOT, target_arch, component)
|
||||
target = 'chromiumcontent:chromiumcontent'
|
||||
subprocess.check_call([NINJA, '-C', os.path.relpath(out_dir), target], env=env)
|
||||
if component == 'static_library':
|
||||
subenv = env.copy()
|
||||
subenv['CHROMIUMCONTENT_2ND_PASS'] = '1'
|
||||
target = 'chromiumcontent:libs'
|
||||
subprocess.check_call([NINJA, '-C', os.path.relpath(out_dir), target], env=subenv)
|
||||
# Build everything if a components list is non provided.
|
||||
components_to_build = args.component if args.component is not None else COMPONENTS
|
||||
|
||||
if 'static_library' in components_to_build and args.no_static_library:
|
||||
components_to_build.remove('static_library')
|
||||
if 'shared_library' in components_to_build and args.no_shared_library:
|
||||
components_to_build.remove('shared_library')
|
||||
|
||||
for component in components_to_build:
|
||||
out_dir = get_output_dir(SOURCE_ROOT, target_arch, component)
|
||||
target = 'chromiumcontent:chromiumcontent'
|
||||
subprocess.check_call([NINJA, '-C', os.path.relpath(out_dir), target], env=env)
|
||||
if component == 'static_library':
|
||||
subenv = env.copy()
|
||||
subenv['CHROMIUMCONTENT_2ND_PASS'] = '1'
|
||||
target = 'chromiumcontent:libs'
|
||||
subprocess.check_call([NINJA, '-C', os.path.relpath(out_dir), target], env=subenv)
|
||||
|
||||
|
||||
def parse_args():
|
||||
|
|
Загрузка…
Ссылка в новой задаче