OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/compiled_action.gni") | 5 import("//build/compiled_action.gni") |
6 | 6 |
7 # Compresses a file with brotli. | 7 # Compresses a file with brotli. |
8 # | 8 # |
9 # Variables | 9 # Variables |
10 # input_file: Path to input file. | 10 # input_file: Path to input file. |
11 # output_file: Path to output file. | 11 # output_file: Path to output file. |
12 # | 12 # |
13 template("compress_file_brotli") { | 13 template("compress_file_brotli") { |
14 compiled_action(target_name) { | 14 compiled_action(target_name) { |
15 forward_variables_from(invoker, | 15 forward_variables_from(invoker, |
16 [ | 16 [ |
17 "deps", | 17 "deps", |
18 "testonly", | 18 "testonly", |
19 ]) | 19 ]) |
20 tool = "//third_party/brotli:bro" | 20 tool = "//third_party/brotli:bro" |
21 inputs = [ | 21 inputs = [ |
22 invoker.input_file, | 22 invoker.input_file, |
23 ] | 23 ] |
24 outputs = [ | 24 outputs = [ |
25 invoker.output_file, | 25 invoker.output_file, |
26 ] | 26 ] |
27 args = [ | 27 args = [ |
28 "--force", | 28 "--force", |
| 29 "--no-copy-stat", |
29 "--input", | 30 "--input", |
30 rebase_path(invoker.input_file, root_build_dir), | 31 rebase_path(invoker.input_file, root_build_dir), |
31 "--output", | 32 "--output", |
32 rebase_path(invoker.output_file, root_build_dir), | 33 rebase_path(invoker.output_file, root_build_dir), |
33 ] | 34 ] |
34 } | 35 } |
35 } | 36 } |
OLD | NEW |