19 compiler = api.vars.builder_cfg.get(
'compiler',
'')
20 configuration = api.vars.builder_cfg.get(
'configuration',
'')
21 extra_tokens = api.vars.extra_tokens
22 extra_tokens.remove(
'Docker')
23 os = api.vars.builder_cfg.get(
'os',
'')
24 target_arch = api.vars.builder_cfg.get(
'target_arch',
'')
29 'target_cpu': target_arch,
33 if configuration ==
'Debug':
34 args[
'extra_cflags'].
append(
'-O1')
36 args[
'is_debug'] =
False
38 if 'NoGPU' in extra_tokens:
39 args[
'skia_enable_ganesh'] =
False
40 extra_tokens.remove(
'NoGPU')
41 if 'Shared' in extra_tokens:
42 args[
'is_component_build'] =
True
43 extra_tokens.remove(
'Shared')
46 if os ==
'Debian11' and compiler ==
'GCC' and not extra_tokens:
52 args[
'extra_cflags'].
append(
'-g1')
53 if target_arch ==
'x86_64':
54 image_name =
'gcc-debian11'
55 elif target_arch ==
'x86':
56 image_name =
'gcc-debian11-x86'
59 raise Exception(
'Not implemented: ' + api.vars.builder_name)
61 image_hash = IMAGES[image_name]
66 args[
'extra_cflags'].
append(
'-DREBUILD_IF_CHANGED_docker_image=%s' % image_hash)
68 script = api.build.resource(
'docker-compile.sh')
69 api.docker.run(
'Run build script in Docker', image_hash,
70 checkout_root, out_dir, script, args=[util.py_to_gn(args)])