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

Unified Diff: utils/compiler/BUILD.gn

Issue 2832353002: Add support for building patched_sdk and platform.dill for dart2js: (Closed)
Patch Set: rebase Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« tools/patch_sdk.dart ('K') | « tools/patch_sdk.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/compiler/BUILD.gn
diff --git a/utils/compiler/BUILD.gn b/utils/compiler/BUILD.gn
index 19d7beac87b6567f2e1c6681e8544f33782e5426..13e2ef17a62571c6b9f96206ef7e62eecb5e887d 100644
--- a/utils/compiler/BUILD.gn
+++ b/utils/compiler/BUILD.gn
@@ -3,6 +3,7 @@
# BSD-style license that can be found in the LICENSE file.
import("../../build/compiled_action.gni")
+import("../../build/prebuilt_dart_sdk.gni")
import("../create_timestamp.gni")
import("../application_snapshot.gni")
@@ -75,3 +76,46 @@ application_snapshot("utils_wrapper") {
main_dart = "$target_gen_dir/utils_wrapper.dart"
training_args = [ "--help" ]
}
+
+action("patched_dart2js_sdk") {
Vyacheslav Egorov (Google) 2017/04/27 14:07:23 It might be a good idea to move all shared GN rule
Siggi Cherem (dart-lang) 2017/04/28 21:37:21 Done.
+ deps = ["../../runtime/vm:patched_sdk"]
+ if (!prebuilt_dart_exe_works) {
+ deps += ["../../runtime/bin:dart_bootstrap($host_toolchain)"]
+ }
+
+ patches_dir = "../../sdk/lib/_internal/js_runtime/lib"
+ patched_sdk_dir = "$root_out_dir/patched_dart2js_sdk"
+
+ script = "../../tools/patch_sdk.py"
+
+ # We list the `patch_sdk.dart` tool here because the [script] (which is
+ # implicitly an input) will call it.
+ inputs = [
+ "../../tools/patch_sdk.dart",
+ ]
+ depfile = "$root_out_dir/patched_dart2js_sdk.d"
+
+ outputs = [
+ # Instead of listing all outputs we list a single well-known one.
+ "${patched_sdk_dir}/platform.dill",
+ ]
+
+ args = [ "--quiet" ]
+ if (!prebuilt_dart_exe_works) {
+ dart_out_dir = get_label_info(
+ "../../runtime/bin:dart_bootstrap($host_toolchain)", "root_out_dir")
+ dart_bootstrap =
+ rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix")
+ args += [
+ "--dart-executable",
+ dart_bootstrap,
+ ]
+ }
+ args += [
+ "dart2js",
+ rebase_path("../../sdk"),
+ rebase_path(patches_dir),
+ rebase_path(patched_sdk_dir, root_build_dir),
+ rebase_path("../../.packages"),
+ ]
+}
« tools/patch_sdk.dart ('K') | « tools/patch_sdk.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698