Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: build/copy_tree.gni

Issue 2848943003: [infra] Assembles the SDK using GN rather than create_sdk.py (Closed)
Patch Set: Move copy_dev_compiler_tools out of the default full SDK build Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/config/win/BUILD.gn ('k') | build/toolchain/gcc_toolchain.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file.
4
5 _dart_root = rebase_path("..")
6
7 # copy_tree() copies a directory tree rooted at `source` to `dest`, which should
8 # be somewhere under $root_out_dir.
9 #
10 # Optional parameters:
11 # exclude - A comma separated list that is passed to shutil.ignore_patterns()
12 # in tools/copy_tree.py.
13 template("copy_tree") {
14 assert(defined(invoker.source), "copy_tree must define 'source'")
15 assert(defined(invoker.dest), "copy_tree must define 'dest'")
16 source = invoker.source
17 dest = invoker.dest
18 action(target_name) {
19 if (defined(invoker.visibility)) {
20 visibility = invoker.visibility
21 }
22
23 deps = []
24 if (defined(invoker.deps)) {
25 deps += invoker.deps
26 }
27
28 common_args = [
29 "--from",
30 rebase_path(source),
31 "--to",
32 rebase_path(dest),
33 ]
34 if (defined(invoker.exclude)) {
35 common_args += [
36 "--exclude",
37 invoker.exclude,
38 ]
39 }
40
41 dry_run_args = common_args + [ "--dry-run" ]
42 input_files = exec_script("$_dart_root/tools/copy_tree.py",
43 dry_run_args,
44 "list lines")
45 inputs = input_files
46 relative_files = rebase_path(input_files, rebase_path(source))
47
48 output_files = []
49 foreach(input, relative_files) {
50 output_files += [ "$dest/$input" ]
51 }
52
53 outputs = output_files
54 script = "$_dart_root/tools/copy_tree.py"
55 args = common_args
56 }
57 }
OLDNEW
« no previous file with comments | « build/config/win/BUILD.gn ('k') | build/toolchain/gcc_toolchain.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698