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

Unified Diff: runtime/BUILD.gn

Issue 905753003: Adds dart_debug parameter to GN build. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 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
===================================================================
--- runtime/BUILD.gn (revision 43472)
+++ runtime/BUILD.gn (working copy)
@@ -2,9 +2,20 @@
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
+# TODO(zra): These build arguments should likely be moved to a gni file that is
+# included in BUILD.gn files that care about the values of the flags. For now,
+# since the GN build only happens as part of a Mojo build there is no need for
+# the indirection.
+declare_args() {
+ # Instead of using is_debug, we introduce a different flag for specifying a
+ # Debug build of Dart so that clients can still use a Release build of Dart
+ # while themselves doing a Debug build.
+ dart_debug = false
+}
+
config("dart_config") {
defines = []
- if (is_debug) {
+ if (dart_debug) {
defines += ["DEBUG"]
} else {
defines += ["NDEBUG"]
@@ -24,6 +35,16 @@
"-fno-rtti",
"-fno-exceptions",
]
+
+ if (dart_debug) {
+ cflags += [
+ "-O1",
+ ]
+ } else {
+ cflags += [
+ "-O3",
+ ]
+ }
}
@@ -82,6 +103,7 @@
executable("libdart_dependency_helper") {
+ configs += [":dart_config"]
deps = [
"vm:libdart_lib_withcore",
"vm:libdart_lib",
« 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