Support Siso builds This CL adds Siso build supports: - Install Siso CIPD package. - Generate //build/config/siso/.sisoenv file via DEPS hook. - Generate `gn_logs.txt` GN logs. Bug: 420355454 Change-Id: I6dd33ff12ba29167b00efbbe28712eec8527cc13 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/132390 Auto-Submit: Junji Watanabe <jwata@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/.gitignore b/.gitignore index 87a0a29..76b69be 100644 --- a/.gitignore +++ b/.gitignore
@@ -35,6 +35,7 @@ /third_party/rust /third_party/rust-toolchain /third_party/simdutf +/third_party/siso /third_party/skia /third_party/test_fonts /third_party/zlib
diff --git a/BUILD.gn b/BUILD.gn index 4edba9f..164be17 100644 --- a/BUILD.gn +++ b/BUILD.gn
@@ -441,3 +441,17 @@ deps += [ "//skia" ] } } + +# GN evaluates each .gn file once per toolchain, so restricting to default +# toolchain will ensure write_file() is called only once. +if (current_toolchain == default_toolchain) { + import("//build/gn_logs.gni") + + # Write debug logs to gn_logs.txt. + _lines = [ + "Generated during 'gn gen' by //BUILD.gn.", + "", + ] + build_gn_logs + + write_file("$root_build_dir/gn_logs.txt", _lines) +}
diff --git a/DEPS b/DEPS index b5977ab..a80f340 100644 --- a/DEPS +++ b/DEPS
@@ -210,6 +210,10 @@ # and whatever else without interference from each other. 'simdutf_revision': '9d3e4d7c1afb30ed528443d73afab23f22443434', # Three lines of non-changing comments so that + # the commit queue can handle CLs rolling siso + # and whatever else without interference from each other. + 'siso_version': 'git_revision:d9393c2115244b6e4a797189055e4a2b6769a64d', + # Three lines of non-changing comments so that # the commit queue can handle CLs rolling skia # and whatever else without interference from each other. 'skia_revision': 'b82ac22e2deeae74c390cf735bc0d14d9658ada7', @@ -538,6 +542,16 @@ 'condition': 'checkout_v8', }, + 'third_party/siso/cipd': { + 'packages': [ + { + 'package': 'infra/build/siso/${{platform}}', + 'version': Var('siso_version'), + } + ], + 'dep_type': 'cipd', + }, + 'third_party/skia': { 'url': Var('skia_git') + '/skia.git@' + Var('skia_revision'), 'condition': 'checkout_skia', @@ -808,4 +822,14 @@ '--quiet', ], }, + # Configure Siso for developer builds. + { + 'name': 'configure_siso', + 'pattern': '.', + 'action': ['python3', + 'build/config/siso/configure_siso.py', + '--rbe_instance', + Var('rbe_instance'), + ], + }, ]