mirror of
https://github.com/dart-lang/sdk
synced 2024-07-01 07:14:29 +00:00
[Runtime] Add extra_product_deps and extra_nonproduct_deps params to "library_for_all_configs_with_compiler" template
These are params of the "library_for_all_configs" template, and I believe they should also be params of "library_for_all_configs_with_compiler". Change-Id: I9fe959a98a9a1d0ebd2bea8f0959bcba4fc794ee Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295420 Commit-Queue: Derek Xu <derekx@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
This commit is contained in:
parent
0d6067232b
commit
fd607ba778
|
@ -265,6 +265,14 @@ template("library_for_all_configs_with_compiler") {
|
|||
if (defined(invoker.extra_deps)) {
|
||||
extra_deps += invoker.extra_deps
|
||||
}
|
||||
extra_product_deps = []
|
||||
if (defined(invoker.extra_product_deps)) {
|
||||
extra_product_deps += invoker.extra_product_deps
|
||||
}
|
||||
extra_nonproduct_deps = []
|
||||
if (defined(invoker.extra_nonproduct_deps)) {
|
||||
extra_nonproduct_deps += invoker.extra_nonproduct_deps
|
||||
}
|
||||
foreach(conf, _all_configs) {
|
||||
if (conf.compiler) {
|
||||
target(invoker.target_type, "${target_name}${conf.suffix}") {
|
||||
|
@ -281,6 +289,17 @@ template("library_for_all_configs_with_compiler") {
|
|||
configured_deps += [ "${dep}${conf.suffix}" ]
|
||||
}
|
||||
deps = configured_deps + extra_deps
|
||||
|
||||
# The "dart_maybe_product_config" and "dart_product_config" configs in
|
||||
# runtime/BUILD.gn have logic to avoid building PRODUCT artifacts in
|
||||
# debug builds.
|
||||
if (conf.is_product && !dart_debug) {
|
||||
not_needed([ "extra_nonproduct_deps" ])
|
||||
deps += extra_product_deps
|
||||
} else {
|
||||
not_needed([ "extra_product_deps" ])
|
||||
deps += extra_nonproduct_deps
|
||||
}
|
||||
if (conf.snapshot) {
|
||||
if (defined(snapshot_sources)) {
|
||||
sources += snapshot_sources
|
||||
|
|
Loading…
Reference in New Issue
Block a user