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

Side by Side Diff: utils/application_snapshot.gni

Issue 2856713003: [GN] Change a filesystem absolute path deps to be source absolute (Closed)
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 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. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 import("../build/compiled_action.gni") 5 import("../build/compiled_action.gni")
6 6
7 _dart_root = rebase_path("..") 7 _dart_root = get_path_info("..", "abspath")
8 8
9 template("application_snapshot") { 9 template("application_snapshot") {
10 assert(defined(invoker.main_dart), "Must specify 'main_dart'") 10 assert(defined(invoker.main_dart), "Must specify 'main_dart'")
11 assert(defined(invoker.training_args), "Must specify 'training_args'") 11 assert(defined(invoker.training_args), "Must specify 'training_args'")
12 main_dart = invoker.main_dart 12 main_dart = invoker.main_dart
13 training_args = invoker.training_args 13 training_args = invoker.training_args
14 name = target_name 14 name = target_name
15 if (defined(invoker.name)) { 15 if (defined(invoker.name)) {
16 name = invoker.name 16 name = invoker.name
17 } 17 }
18 extra_deps = [] 18 extra_deps = []
19 if (defined(invoker.deps)) { 19 if (defined(invoker.deps)) {
20 extra_deps += invoker.deps 20 extra_deps += invoker.deps
21 } 21 }
22 extra_inputs = [] 22 extra_inputs = []
23 if (defined(invoker.inputs)) { 23 if (defined(invoker.inputs)) {
24 extra_inputs += invoker.inputs 24 extra_inputs += invoker.inputs
25 } 25 }
26 compiled_action(target_name) { 26 compiled_action(target_name) {
27 tool = get_path_info("$_dart_root/runtime/bin:dart", "abspath") 27 tool = "$_dart_root/runtime/bin:dart"
28 deps = extra_deps + [ "$_dart_root/pkg:pkg_files_stamp" ] 28 deps = extra_deps + [ "$_dart_root/pkg:pkg_files_stamp" ]
29 29
30 inputs = extra_inputs + [ 30 inputs = extra_inputs + [
31 "$_dart_root/sdk/lib/_internal/sdk_library_metadata/lib/libraries .dart", 31 "$_dart_root/sdk/lib/_internal/sdk_library_metadata/lib/libraries .dart",
32 "$root_gen_dir/pkg_files.stamp", 32 "$root_gen_dir/pkg_files.stamp",
33 ] 33 ]
34 34
35 output = "$root_gen_dir/$name.dart.snapshot" 35 output = "$root_gen_dir/$name.dart.snapshot"
36 outputs = [ 36 outputs = [
37 output, 37 output,
38 ] 38 ]
39 39
40 dot_packages = rebase_path("$_dart_root/.packages") 40 dot_packages = rebase_path("$_dart_root/.packages")
41 abs_output = rebase_path(output) 41 abs_output = rebase_path(output)
42 main_file = rebase_path(main_dart) 42 main_file = rebase_path(main_dart)
43 43
44 args = [ 44 args = [
45 "--packages=$dot_packages", 45 "--packages=$dot_packages",
46 "--snapshot=$abs_output", 46 "--snapshot=$abs_output",
47 "--snapshot-kind=app-jit", 47 "--snapshot-kind=app-jit",
48 main_file, 48 main_file,
49 ] + training_args 49 ] + training_args
50 } 50 }
51 } 51 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698