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

Unified Diff: runtime/BUILD.gn

Issue 1885593002: Add dart_product GN build argument (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/BUILD.gn
diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn
index 6e987c46f0718069d52bb1a95f3f7a11b6c2d6a8..5a3ee25b4d085243660665b1b80e379349d2a3d0 100644
--- a/runtime/BUILD.gn
+++ b/runtime/BUILD.gn
@@ -12,6 +12,10 @@ declare_args() {
# while themselves doing a Debug build.
dart_debug = false
+ # Product mode drops many features (e.g. debugger, profiler, etc) in order to
+ # shrink download size and decrease memory and cpu usage.
+ dart_product = false
+
# Explicitly set the target architecture in case of precompilation. Leaving
# this unspecified results in automatic target architecture detection.
# Available options are: arm, arm64, mips, x64 and ia32
@@ -50,6 +54,15 @@ config("dart_config") {
defines += ["NDEBUG"]
}
+ if (dart_product) {
+ if (dart_debug) {
+ print("Debug and product mode are mutually exclusive.")
+ }
+ assert(!dart_debug)
+ defines += ["PRODUCT"]
+ }
+
+
if (is_ios || is_mac) {
defines += ["DART_PRECOMPILER"]
}
@@ -113,6 +126,14 @@ config("dart_config_no_precompiler") {
defines += ["NDEBUG"]
}
+ if (dart_product) {
+ if (dart_debug) {
+ print("Debug and product mode are mutually exclusive.")
+ }
+ assert(!dart_debug)
+ defines += ["PRODUCT"]
+ }
+
cflags = [
"-Werror",
"-Wall",
« 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