Index: scripts/slave/recipes/pdfium.py |
diff --git a/scripts/slave/recipes/pdfium.py b/scripts/slave/recipes/pdfium.py |
index 97ed22bbddc2531323d0eb04121ee35719a11926..bbc9c3f7bdad5073ab861874906435578b94529b 100644 |
--- a/scripts/slave/recipes/pdfium.py |
+++ b/scripts/slave/recipes/pdfium.py |
@@ -5,6 +5,7 @@ |
DEPS = [ |
'depot_tools/gclient', |
'depot_tools/bot_update', |
+ 'goma', |
'recipe_engine/path', |
'recipe_engine/platform', |
'recipe_engine/properties', |
@@ -67,6 +68,7 @@ def _GNGenBuilds(api, memory_tool, skia, xfa, v8, target_cpu, clang, rel, |
'pdf_enable_xfa=%s' % gn_bool[xfa], |
'pdf_use_skia=%s' % gn_bool[skia], |
'pdf_is_standalone=true', |
+ 'use_goma=true', |
] |
if api.platform.is_win and not memory_tool: |
args.append('symbol_level=1') |
@@ -86,10 +88,19 @@ def _GNGenBuilds(api, memory_tool, skia, xfa, v8, target_cpu, clang, rel, |
'--args=' + ' '.join(args)], |
cwd=checkout) |
-def _BuildSteps(api, out_dir): |
+def _BuildSteps(api, clang, out_dir): |
+ api.goma.ensure_goma() |
+ |
# Build sample file using Ninja |
debug_path = api.path['checkout'].join('out', out_dir) |
- api.step('compile with ninja', ['ninja', '-C', debug_path]) |
+ ninja_cmd = ['ninja', '-C', debug_path, |
+ '-j', api.goma.recommended_goma_jobs] |
+ |
+ with api.goma.build_with_goma( |
+ ninja_log_outdir=debug_path, |
+ ninja_log_compiler='clang' if clang else 'unknown', |
+ ninja_log_command=ninja_cmd): |
+ api.step('compile with ninja', ninja_cmd) |
def _RunDrMemoryTests(api, v8): |
@@ -168,7 +179,7 @@ def RunSteps(api, memory_tool, skia, xfa, v8, target_cpu, clang, rel, skip_test, |
_GNGenBuilds(api, memory_tool, skia, xfa, v8, target_cpu, clang, rel, |
target_os, out_dir) |
- _BuildSteps(api, out_dir) |
+ _BuildSteps(api, clang, out_dir) |
if skip_test: |
return |