mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
Revert "[vm/build] Expose is_release/is_profile so they are available in third_party gn scripts." and different fix.
Patchset 1 reverts commit f3aaf8a770
as it will
present problems in other embedders which will have to deal with is_profile argument.
Patchset 2 fixes the build by switching from is_product to dart_runtime_mode
Change-Id: I167e6f531af3b0fb0f3e006b074ebdf1b69f3fe5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98601
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
This commit is contained in:
parent
e64bd9a01a
commit
1dd72d4309
|
@ -109,6 +109,12 @@ declare_args() {
|
||||||
# Debug build.
|
# Debug build.
|
||||||
is_debug = true
|
is_debug = true
|
||||||
|
|
||||||
|
# Release build.
|
||||||
|
is_release = false
|
||||||
|
|
||||||
|
# Product build.
|
||||||
|
is_product = false
|
||||||
|
|
||||||
# Set to true when compiling with the Clang compiler. Typically this is used
|
# Set to true when compiling with the Clang compiler. Typically this is used
|
||||||
# to configure warnings.
|
# to configure warnings.
|
||||||
is_clang = current_os == "mac" || current_os == "linux"
|
is_clang = current_os == "mac" || current_os == "linux"
|
||||||
|
@ -196,8 +202,6 @@ if (!is_clang && (is_asan || is_lsan || is_tsan || is_msan)) {
|
||||||
is_clang = true
|
is_clang = true
|
||||||
}
|
}
|
||||||
|
|
||||||
import("runtime/runtime_args.gni")
|
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# TARGET DEFAULTS
|
# TARGET DEFAULTS
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
|
@ -3,12 +3,6 @@
|
||||||
# BSD-style license that can be found in the LICENSE file.
|
# BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
declare_args() {
|
declare_args() {
|
||||||
# Release build.
|
|
||||||
is_release = false
|
|
||||||
|
|
||||||
# Product build.
|
|
||||||
is_product = false
|
|
||||||
|
|
||||||
# Instead of using is_debug, we introduce a different flag for specifying a
|
# 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
|
# Debug build of Dart so that clients can still use a Release build of Dart
|
||||||
# while themselves doing a Debug build.
|
# while themselves doing a Debug build.
|
||||||
|
|
|
@ -119,9 +119,10 @@ template("gen_vm_platform") {
|
||||||
"$root_out_dir/vm_outline" + output_postfix + ".dill",
|
"$root_out_dir/vm_outline" + output_postfix + ".dill",
|
||||||
]
|
]
|
||||||
args = [ "dart:core" ]
|
args = [ "dart:core" ]
|
||||||
allow_causal_async_stacks = !is_product
|
is_product_flag = dart_runtime_mode == "release"
|
||||||
|
allow_causal_async_stacks = !is_product_flag
|
||||||
args += [
|
args += [
|
||||||
"-Ddart.vm.product=$is_product",
|
"-Ddart.vm.product=$is_product_flag",
|
||||||
"-Ddart.developer.causal_async_stacks=$allow_causal_async_stacks",
|
"-Ddart.developer.causal_async_stacks=$allow_causal_async_stacks",
|
||||||
"-Ddart.isVM=true",
|
"-Ddart.isVM=true",
|
||||||
]
|
]
|
||||||
|
|
|
@ -76,17 +76,3 @@ index aed4d561d..ca6f1c3fe 100644
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
} else if (is_win) {
|
} else if (is_win) {
|
||||||
diff --git a/tools/gn b/tools/gn
|
|
||||||
index 7dacacf06..83bd7d9da 100755
|
|
||||||
--- a/tools/gn
|
|
||||||
+++ b/tools/gn
|
|
||||||
@@ -134,6 +134,9 @@ def to_gn_args(args):
|
|
||||||
else:
|
|
||||||
gn_args['dart_runtime_mode'] = runtime_mode
|
|
||||||
|
|
||||||
+ gn_args['is_release'] = gn_args['dart_runtime_mode'] == 'profile'
|
|
||||||
+ gn_args['is_product'] = gn_args['dart_runtime_mode'] == 'release'
|
|
||||||
+
|
|
||||||
if args.dart_debug:
|
|
||||||
gn_args['dart_debug'] = True
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue