| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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/executable_suffix.gni") | 5 import("../../build/executable_suffix.gni") |
| 6 import("../../build/prebuilt_dart_sdk.gni") | 6 import("../../build/prebuilt_dart_sdk.gni") |
| 7 | 7 |
| 8 # Currently paths here are hard coded for convenience in building Mojo/Flutter. | 8 # Currently paths here are hard coded for convenience in building Mojo/Flutter. |
| 9 declare_args() { | 9 declare_args() { |
| 10 # Specify the path to a host compatible version of the Dart SDK. | 10 # Specify the path to a host compatible version of the Dart SDK. |
| 11 # This SDK is used to compile the Observatory frontend sources. | 11 # This SDK is used to compile the Observatory frontend sources. |
| 12 dart_host_sdk = rebase_path("//third_party/dart-sdk/dart-sdk") | 12 dart_host_sdk = rebase_path("//third_party/dart-sdk/dart-sdk") |
| 13 | 13 |
| 14 # Specify the path to a host compatible version of pub. | 14 # Specify the path to a host compatible version of pub. |
| 15 # This is used to compile the Observatory frontend sources. | 15 # This is used to compile the Observatory frontend sources. |
| 16 # | 16 # |
| 17 # The observatory build tool searches for pub first using this GN arg, then | 17 # The observatory build tool searches for pub first using this GN arg, then |
| 18 # for the checked-in SDK, and if that doesn't work, it uses the dart_bootstrap | 18 # for the checked-in SDK, and if that doesn't work, it uses the dart_bootstrap |
| 19 # built as part of the build to invoke pub. If this arg is set to a non-empty | 19 # built as part of the build to invoke pub. If this arg is set to a non-empty |
| 20 # string, we assume that there is no need for dart_bootstrap. If it is set to | 20 # string, we assume that there is no need for dart_bootstrap. If it is set to |
| 21 # "", then we assume that there may be a need for dart_bootstrap. | 21 # "", then we assume that there may be a need for dart_bootstrap. |
| 22 if (defined(is_win) && is_win) { | 22 if (defined(is_win) && is_win) { |
| 23 dart_host_pub_exe = rebase_path("$dart_host_sdk/bin/pub.bat") | 23 dart_host_pub_exe = rebase_path("$dart_host_sdk/bin/pub.bat") |
| 24 } else { | 24 } else { |
| 25 dart_host_pub_exe = rebase_path("$dart_host_sdk/bin/pub") | 25 dart_host_pub_exe = rebase_path("$dart_host_sdk/bin/pub") |
| 26 } | 26 } |
| 27 } | 27 } |
| 28 | 28 |
| 29 # We set this to "" in the Fuchsia build to force building with dart_bootstrap. | 29 # We set this to "" in the Fuchsia build to force building with dart_bootstrap. |
| 30 if (defined(is_fuchsia) && defined(is_fuchsia_host) && | 30 if (is_fuchsia || is_fuchsia_host) { |
| 31 (is_fuchsia || is_fuchsia_host)) { | |
| 32 dart_host_pub_exe = "" | 31 dart_host_pub_exe = "" |
| 33 } | 32 } |
| 34 | 33 |
| 35 # Construct arguments to the observatory tool for finding pub. | 34 # Construct arguments to the observatory tool for finding pub. |
| 36 pub_build_deps = [] | 35 pub_build_deps = [] |
| 37 pub_build_args = [] | 36 pub_build_args = [] |
| 38 if (dart_host_pub_exe != "") { | 37 if (dart_host_pub_exe != "") { |
| 39 pub_build_args = [ | 38 pub_build_args = [ |
| 40 "--pub-executable", | 39 "--pub-executable", |
| 41 dart_host_pub_exe, | 40 dart_host_pub_exe, |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 243 |
| 245 source_set("standalone_observatory_archive") { | 244 source_set("standalone_observatory_archive") { |
| 246 deps = [ | 245 deps = [ |
| 247 ":standalone_archive_observatory", | 246 ":standalone_archive_observatory", |
| 248 ] | 247 ] |
| 249 | 248 |
| 250 sources = [ | 249 sources = [ |
| 251 rebase_path("$root_gen_dir/observatory/standalone_archive_observatory.cc"), | 250 rebase_path("$root_gen_dir/observatory/standalone_archive_observatory.cc"), |
| 252 ] | 251 ] |
| 253 } | 252 } |
| OLD | NEW |