Commit 18e21ae1 authored by Takuto Ikuta's avatar Takuto Ikuta Committed by Commit Bot

Update timestmap of file only when content is changed

This can reduce build steps in incremental build.

Bug: 810298
Change-Id: I8ef6c3aa908f5d6e2e8c57edf8d29ed80a0d1993
Reviewed-on: https://chromium-review.googlesource.com/1126892Reviewed-by: default avatarBo <boliu@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573483}
parent 1112e023
......@@ -42,11 +42,12 @@ def DoMain(argv):
number = int(number)
path_template = "org/chromium/content/app/SandboxedProcessService{0}.java"
with zipfile.ZipFile(output, 'w', zipfile.ZIP_STORED) as srcjar:
for i in xrange(number):
build_utils.AddToZipHermetic(srcjar,
path_template.format(i),
data=GenerateService(i))
with build_utils.AtomicOutput(output) as f:
with zipfile.ZipFile(f, 'w', zipfile.ZIP_STORED) as srcjar:
for i in xrange(number):
build_utils.AddToZipHermetic(srcjar,
path_template.format(i),
data=GenerateService(i))
if options.depfile:
build_utils.WriteDepfile(options.depfile, output)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment