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

Unified Diff: utils/dartdevc/BUILD.gn

Issue 2889253002: Ship dart2js output for dev_compiler/web in the sdk. (Closed)
Patch Set: Ship dart2js output for dev_compiler/web in the sdk. 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 side-by-side diff with in-line comments
Download patch
« sdk/BUILD.gn ('K') | « sdk/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/dartdevc/BUILD.gn
diff --git a/utils/dartdevc/BUILD.gn b/utils/dartdevc/BUILD.gn
index b67300a461510d0adae125fbc7840e20339d2161..094cd76a717df8cc390d2d9a086c295bd1b20595 100644
--- a/utils/dartdevc/BUILD.gn
+++ b/utils/dartdevc/BUILD.gn
@@ -23,3 +23,58 @@ application_snapshot("dartdevc") {
rebase_path("../../pkg/dev_compiler/bin") ],
"list lines")
}
+
+sdk_lib_files = exec_script(
+ "../../tools/list_dart_files.py",
+ [ "absolute", rebase_path("../../sdk/lib") ],
+ "list lines")
+
+compiler_files = exec_script(
+ "../../tools/list_dart_files.py",
+ [ "absolute", rebase_path("../../pkg/compiler") ],
+ "list lines")
+
+dev_compiler_files = exec_script(
+ "../../tools/list_dart_files.py",
+ [ "absolute", rebase_path("../../pkg/dev_compiler") ],
+ "list lines")
+
+template("dart2js_compile") {
+ assert(defined(invoker.main), "Must specify the main file")
+ main = invoker.main
+ assert(defined(invoker.out), "Must specify the out file")
+ out = invoker.out
+ abs_main = rebase_path(main)
+ abs_output = rebase_path(out)
+
+ compiled_action(target_name) {
+ tool = "../../runtime/bin:dart"
+ inputs = sdk_lib_files + compiler_files + dev_compiler_files
+ outputs = [
+ out,
+ ]
+
+ dot_packages = rebase_path("../../.packages")
+ compiler =
+ rebase_path("../../pkg/compiler/lib/src/dart2js.dart")
+
+ args = [
+ "--packages=$dot_packages",
+ compiler,
+ "--packages=$dot_packages",
+ "$abs_main",
+ "-m",
+ "-o$abs_output",
+ ]
+ }
+}
+
+dart2js_compile("dartdevc_web") {
+ main = rebase_path("../../pkg/dev_compiler/web/main.dart")
+ out = "$root_out_dir/dev_compiler/build/web/ddc_web_compiler.js"
+}
+
+dart2js_compile("stack_trace_mapper") {
+ main = rebase_path("../../pkg/dev_compiler/web/stack_trace_mapper.dart")
+ out = "$root_out_dir/dev_compiler/build/web/dart_stack_trace_mapper.js"
+}
« sdk/BUILD.gn ('K') | « sdk/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698