[build] Remove the platform/full SDK distinction.
This was originally for Flutter, but Flutter now uses a prebuilt Dart SDK. Change-Id: I134048ccbfea2670759f47490cc1c7f9eff12460 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510240 Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
committed by
dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
ab0f7d309c
commit
354a997abe
@@ -125,10 +125,6 @@ group("create_sdk") {
|
|||||||
public_deps = [ "sdk:create_sdk" ]
|
public_deps = [ "sdk:create_sdk" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
group("create_platform_sdk") {
|
|
||||||
public_deps = [ "sdk:create_platform_sdk" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
group("dart2js") {
|
group("dart2js") {
|
||||||
import("runtime/runtime_args.gni")
|
import("runtime/runtime_args.gni")
|
||||||
if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
|
if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
|
||||||
|
|||||||
+66
-201
@@ -26,9 +26,6 @@ if (get_path_info(".", "abspath") == "//sdk/") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare_args() {
|
declare_args() {
|
||||||
# Build a SDK with less stuff. It excludes dart2js, ddc, and web libraries.
|
|
||||||
dart_platform_sdk = true
|
|
||||||
|
|
||||||
# Path to stripped dart binaries relative to build output directory.
|
# Path to stripped dart binaries relative to build output directory.
|
||||||
dartvm_stripped_binary = "dartvm"
|
dartvm_stripped_binary = "dartvm"
|
||||||
dart_stripped_binary = "dart"
|
dart_stripped_binary = "dart"
|
||||||
@@ -112,19 +109,14 @@ declare_args() {
|
|||||||
# ......typed_data/
|
# ......typed_data/
|
||||||
# ......api_readme.md
|
# ......api_readme.md
|
||||||
|
|
||||||
# Scripts that go under bin/
|
|
||||||
_platform_sdk_scripts = []
|
|
||||||
|
|
||||||
_full_sdk_scripts = []
|
|
||||||
|
|
||||||
# Snapshots that go under bin/snapshots
|
# Snapshots that go under bin/snapshots
|
||||||
_platform_sdk_snapshots = [ [
|
_sdk_snapshots = [ [
|
||||||
"analysis_server",
|
"analysis_server",
|
||||||
"../utils/analysis_server",
|
"../utils/analysis_server",
|
||||||
"analysis_server",
|
"analysis_server",
|
||||||
] ]
|
] ]
|
||||||
if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
|
if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
|
||||||
_platform_sdk_snapshots += [
|
_sdk_snapshots += [
|
||||||
[
|
[
|
||||||
"analysis_server_aot_product",
|
"analysis_server_aot_product",
|
||||||
"../utils/analysis_server:analysis_server_aot_product",
|
"../utils/analysis_server:analysis_server_aot_product",
|
||||||
@@ -152,14 +144,14 @@ if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
|
|||||||
],
|
],
|
||||||
]
|
]
|
||||||
if (include_experimental_vm_service) {
|
if (include_experimental_vm_service) {
|
||||||
_platform_sdk_snapshots += [ [
|
_sdk_snapshots += [ [
|
||||||
"dart_runtime_service_vm_aot",
|
"dart_runtime_service_vm_aot",
|
||||||
"../utils/dart_runtime_service_vm:dart_runtime_service_vm_aot",
|
"../utils/dart_runtime_service_vm:dart_runtime_service_vm_aot",
|
||||||
"dart_runtime_service_vm_aot",
|
"dart_runtime_service_vm_aot",
|
||||||
] ]
|
] ]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_platform_sdk_snapshots += [ [
|
_sdk_snapshots += [ [
|
||||||
"dds",
|
"dds",
|
||||||
"../utils/dds:dds",
|
"../utils/dds:dds",
|
||||||
"dds",
|
"dds",
|
||||||
@@ -167,13 +159,13 @@ if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dart_snapshot_kind == "app-jit") {
|
if (dart_snapshot_kind == "app-jit") {
|
||||||
_platform_sdk_snapshots += [ [
|
_sdk_snapshots += [ [
|
||||||
"kernel-service",
|
"kernel-service",
|
||||||
"../utils/kernel-service:kernel-service_snapshot",
|
"../utils/kernel-service:kernel-service_snapshot",
|
||||||
"kernel-service",
|
"kernel-service",
|
||||||
] ]
|
] ]
|
||||||
if (include_experimental_vm_service) {
|
if (include_experimental_vm_service) {
|
||||||
_platform_sdk_snapshots += [ [
|
_sdk_snapshots += [ [
|
||||||
"dart_runtime_service_vm",
|
"dart_runtime_service_vm",
|
||||||
"../utils/dart_runtime_service_vm:dart_runtime_service_vm",
|
"../utils/dart_runtime_service_vm:dart_runtime_service_vm",
|
||||||
"dart_runtime_service_vm",
|
"dart_runtime_service_vm",
|
||||||
@@ -185,7 +177,7 @@ if (dart_snapshot_kind == "app-jit") {
|
|||||||
# architecture. It is only included as needed on a subset of OS targets.
|
# architecture. It is only included as needed on a subset of OS targets.
|
||||||
if ((dart_target_arch == "x64" || dart_target_arch == "arm64") &&
|
if ((dart_target_arch == "x64" || dart_target_arch == "arm64") &&
|
||||||
(dart_dynamic_modules || target_os == "linux" || target_os == "mac")) {
|
(dart_dynamic_modules || target_os == "linux" || target_os == "mac")) {
|
||||||
_platform_sdk_snapshots += [ [
|
_sdk_snapshots += [ [
|
||||||
"dart2bytecode",
|
"dart2bytecode",
|
||||||
"../utils/dart2bytecode:dart2bytecode",
|
"../utils/dart2bytecode:dart2bytecode",
|
||||||
"dart2bytecode",
|
"dart2bytecode",
|
||||||
@@ -193,38 +185,35 @@ if ((dart_target_arch == "x64" || dart_target_arch == "arm64") &&
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
|
if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
|
||||||
_full_sdk_snapshots =
|
_sdk_snapshots += [
|
||||||
_platform_sdk_snapshots + [
|
[
|
||||||
[
|
"dart2js_aot_product",
|
||||||
"dart2js_aot_product",
|
"../utils/compiler:dart2js_sdk_aot_product",
|
||||||
"../utils/compiler:dart2js_sdk_aot_product",
|
"dart2js_aot",
|
||||||
"dart2js_aot",
|
],
|
||||||
],
|
[
|
||||||
[
|
"dartdevc_aot_product",
|
||||||
"dartdevc_aot_product",
|
"../utils/ddc:dartdevc_aot_product",
|
||||||
"../utils/ddc:dartdevc_aot_product",
|
"dartdevc_aot",
|
||||||
"dartdevc_aot",
|
],
|
||||||
],
|
[
|
||||||
[
|
"kernel_worker_aot_product",
|
||||||
"kernel_worker_aot_product",
|
"../utils/bazel:kernel_worker_aot_product",
|
||||||
"../utils/bazel:kernel_worker_aot_product",
|
"kernel_worker_aot",
|
||||||
"kernel_worker_aot",
|
],
|
||||||
],
|
|
||||||
|
|
||||||
# Remove these JIT snapshot in Dart SDK version 3.7
|
# Remove these JIT snapshot in Dart SDK version 3.7
|
||||||
# Please see https://github.com/dart-lang/build/pull/3742 for details.
|
# Please see https://github.com/dart-lang/build/pull/3742 for details.
|
||||||
[
|
[
|
||||||
"dartdevc",
|
"dartdevc",
|
||||||
"../utils/ddc:dartdevc",
|
"../utils/ddc:dartdevc",
|
||||||
"dartdevc",
|
"dartdevc",
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
} else {
|
|
||||||
_full_sdk_snapshots = _platform_sdk_snapshots
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Libraries that go under lib/
|
# Libraries that go under lib/
|
||||||
_full_sdk_libraries = [
|
_sdk_libraries = [
|
||||||
"_internal",
|
"_internal",
|
||||||
"async",
|
"async",
|
||||||
"cli",
|
"cli",
|
||||||
@@ -256,28 +245,6 @@ _full_sdk_libraries = [
|
|||||||
"web_sql",
|
"web_sql",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Apps running on the platform SDK shouldn't be using Dart4Web libraries, but
|
|
||||||
# the analyzer and dartdoc expect all the library sources to be present.
|
|
||||||
#
|
|
||||||
# _platform_sdk_libraries = [
|
|
||||||
# "_internal",
|
|
||||||
# "async",
|
|
||||||
# "cli",
|
|
||||||
# "collection",
|
|
||||||
# "convert",
|
|
||||||
# "core",
|
|
||||||
# "developer",
|
|
||||||
# "html",
|
|
||||||
# "_http",
|
|
||||||
# "internal",
|
|
||||||
# "io",
|
|
||||||
# "isolate",
|
|
||||||
# "math",
|
|
||||||
# "mirrors",
|
|
||||||
# "typed_data",
|
|
||||||
# ]
|
|
||||||
_platform_sdk_libraries = _full_sdk_libraries
|
|
||||||
|
|
||||||
# This rule copies dartdoc templates to
|
# This rule copies dartdoc templates to
|
||||||
# bin/resources/dartdoc/templates
|
# bin/resources/dartdoc/templates
|
||||||
copy_tree("copy_dartdoc_templates") {
|
copy_tree("copy_dartdoc_templates") {
|
||||||
@@ -320,12 +287,12 @@ if (defined(build_devtools_from_sources) && build_devtools_from_sources) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# This loop generates rules to copy libraries to lib/
|
# This loop generates rules to copy libraries to lib/
|
||||||
foreach(library, _full_sdk_libraries) {
|
foreach(library, _sdk_libraries) {
|
||||||
copy_tree("copy_${library}_library") {
|
copy_tree("copy_${library}_library") {
|
||||||
visibility = [ ":*" ]
|
visibility = [ ":*" ]
|
||||||
source = "lib/$library"
|
source = "lib/$library"
|
||||||
dest = "$root_out_dir/$dart_sdk_output/lib/$library"
|
dest = "$root_out_dir/$dart_sdk_output/lib/$library"
|
||||||
exclude = "*.svn,doc,*.py,*.gypi,*.sh,.git*,*.gn,*.gni"
|
exclude = "doc,*.py,*.sh,.git*,*.gn,*.gni"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,7 +328,7 @@ if (target_os != current_os && target_os == "fuchsia") {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
copy("copy_dartvm") {
|
copy("copy_dartvm") {
|
||||||
visibility = [ ":create_common_sdk" ]
|
visibility = [ ":*" ]
|
||||||
deps = [ "../runtime/bin:dartvm" ]
|
deps = [ "../runtime/bin:dartvm" ]
|
||||||
dart_out = get_label_info("../runtime/bin:dartvm", "root_out_dir")
|
dart_out = get_label_info("../runtime/bin:dartvm", "root_out_dir")
|
||||||
sources = [ "$dart_out/${dartvm_stripped_binary}${executable_suffix}" ]
|
sources = [ "$dart_out/${dartvm_stripped_binary}${executable_suffix}" ]
|
||||||
@@ -518,49 +485,9 @@ group("group_dart2native") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# A template for copying the things in _platform_sdk_scripts and
|
|
||||||
# _full_sdk_scripts into bin/
|
|
||||||
template("copy_sdk_script") {
|
|
||||||
assert(defined(invoker.name), "copy_sdk_script must define 'name'")
|
|
||||||
name = invoker.name
|
|
||||||
ext = ""
|
|
||||||
if (is_win) {
|
|
||||||
ext = ".bat"
|
|
||||||
}
|
|
||||||
copy(target_name) {
|
|
||||||
visibility = [ ":*" ]
|
|
||||||
sources = [ "bin/${name}_sdk$ext" ]
|
|
||||||
outputs = [ "$root_out_dir/$dart_sdk_output/bin/$name$ext" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach(sdk_script, _full_sdk_scripts) {
|
|
||||||
copy_sdk_script("copy_${sdk_script}_script") {
|
|
||||||
name = sdk_script
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# This is the main target for copying scripts in _platform_sdk_scripts to bin/
|
|
||||||
group("copy_platform_sdk_scripts") {
|
|
||||||
visibility = [ ":_create_platform_sdk" ]
|
|
||||||
public_deps = []
|
|
||||||
foreach(sdk_script, _platform_sdk_scripts) {
|
|
||||||
public_deps += [ ":copy_${sdk_script}_script" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# This is the main target for copying scripts in _full_sdk_scripts to bin/
|
|
||||||
group("copy_full_sdk_scripts") {
|
|
||||||
visibility = [ ":*" ]
|
|
||||||
public_deps = []
|
|
||||||
foreach(sdk_script, _full_sdk_scripts) {
|
|
||||||
public_deps += [ ":copy_${sdk_script}_script" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# This loop generates "copy" targets that put snapshots into
|
# This loop generates "copy" targets that put snapshots into
|
||||||
# bin/snapshots
|
# bin/snapshots
|
||||||
foreach(snapshot, _full_sdk_snapshots) {
|
foreach(snapshot, _sdk_snapshots) {
|
||||||
root = root_gen_dir
|
root = root_gen_dir
|
||||||
|
|
||||||
# The frontend_server is output to root_out_dir so that it doesn't conflict
|
# The frontend_server is output to root_out_dir so that it doesn't conflict
|
||||||
@@ -586,22 +513,12 @@ foreach(snapshot, _full_sdk_snapshots) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# This is the main rule for copying snapshots from _platform_sdk_snapshots to
|
# This is the main rule for copying snapshots from _sdk_snapshots to
|
||||||
# bin/snapshots
|
# bin/snapshots
|
||||||
group("copy_platform_sdk_snapshots") {
|
group("copy_sdk_snapshots") {
|
||||||
visibility = [ ":_create_platform_sdk" ]
|
|
||||||
public_deps = []
|
|
||||||
foreach(snapshot, _platform_sdk_snapshots) {
|
|
||||||
public_deps += [ ":copy_${snapshot[0]}_snapshot" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# This is the main rule for copying snapshots from _full_sdk_snapshots to
|
|
||||||
# bin/snapshots
|
|
||||||
group("copy_full_sdk_snapshots") {
|
|
||||||
visibility = [ ":*" ]
|
visibility = [ ":*" ]
|
||||||
public_deps = []
|
public_deps = []
|
||||||
foreach(snapshot, _full_sdk_snapshots) {
|
foreach(snapshot, _sdk_snapshots) {
|
||||||
public_deps += [ ":copy_${snapshot[0]}_snapshot" ]
|
public_deps += [ ":copy_${snapshot[0]}_snapshot" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -616,7 +533,7 @@ group("copy_dartdoc_files") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# This rule copies dill files to lib/_internal.
|
# This rule copies dill files to lib/_internal.
|
||||||
copy("copy_vm_dill_files") {
|
copy("copy_vm_platform") {
|
||||||
visibility = [ ":*" ]
|
visibility = [ ":*" ]
|
||||||
deps = [
|
deps = [
|
||||||
":copy_libraries",
|
":copy_libraries",
|
||||||
@@ -628,7 +545,7 @@ copy("copy_vm_dill_files") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Delete this after external packages are migrated to vm_platform.dill.
|
# Delete this after external packages are migrated to vm_platform.dill.
|
||||||
copy("copy_vm_strong_dill_files") {
|
copy("copy_vm_platform_strong") {
|
||||||
visibility = [ ":*" ]
|
visibility = [ ":*" ]
|
||||||
deps = [
|
deps = [
|
||||||
":copy_libraries",
|
":copy_libraries",
|
||||||
@@ -639,7 +556,7 @@ copy("copy_vm_strong_dill_files") {
|
|||||||
[ "$root_out_dir/$dart_sdk_output/lib/_internal/vm_platform_strong.dill" ]
|
[ "$root_out_dir/$dart_sdk_output/lib/_internal/vm_platform_strong.dill" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
copy("copy_dart2js_dill_files") {
|
copy("copy_dart2js_platform") {
|
||||||
visibility = [ ":*" ]
|
visibility = [ ":*" ]
|
||||||
deps = [
|
deps = [
|
||||||
":copy_libraries",
|
":copy_libraries",
|
||||||
@@ -769,29 +686,12 @@ copy("copy_libraries_specification") {
|
|||||||
outputs = [ "$root_out_dir/$dart_sdk_output/lib/{{source_file_part}}" ]
|
outputs = [ "$root_out_dir/$dart_sdk_output/lib/{{source_file_part}}" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# This is the main rule to copy libraries in _platform_sdk_libraries to lib/
|
# This is the main rule to copy libraries in _sdk_libraries to lib/
|
||||||
group("copy_platform_sdk_libraries") {
|
|
||||||
visibility = [ ":*" ]
|
|
||||||
public_deps = []
|
|
||||||
foreach(library, _platform_sdk_libraries) {
|
|
||||||
public_deps += [ ":copy_${library}_library" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# This is the main rule to copy libraries in _full_sdk_libraries to lib/
|
|
||||||
group("copy_full_sdk_libraries") {
|
|
||||||
visibility = [ ":*" ]
|
|
||||||
public_deps = []
|
|
||||||
foreach(library, _full_sdk_libraries) {
|
|
||||||
public_deps += [ ":copy_${library}_library" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
group("copy_libraries") {
|
group("copy_libraries") {
|
||||||
if (dart_platform_sdk) {
|
visibility = [ ":*" ]
|
||||||
public_deps = [ ":copy_platform_sdk_libraries" ]
|
public_deps = []
|
||||||
} else {
|
foreach(library, _sdk_libraries) {
|
||||||
public_deps = [ ":copy_full_sdk_libraries" ]
|
public_deps += [ ":copy_${library}_library" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -873,21 +773,25 @@ copy("copy_sdk_packages_yaml") {
|
|||||||
outputs = [ "$root_out_dir/$dart_sdk_output/sdk_packages.yaml" ]
|
outputs = [ "$root_out_dir/$dart_sdk_output/sdk_packages.yaml" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# Parts common to both platform and full SDKs.
|
# The SDK, excluding cross-compilation and sanitizer support, which are not
|
||||||
group("create_common_sdk") {
|
# needed for front-end, dart2js, dart2wasm, ddc and analyzer testing.
|
||||||
visibility = [ ":*" ]
|
group("create_most_sdk") {
|
||||||
public_deps = [
|
public_deps = [
|
||||||
":copy_api_readme",
|
":copy_api_readme",
|
||||||
":copy_dart",
|
":copy_dart",
|
||||||
|
":copy_dart2js_platform",
|
||||||
":copy_dartdoc_files",
|
":copy_dartdoc_files",
|
||||||
":copy_dartvm",
|
":copy_dartvm",
|
||||||
|
":copy_dev_compiler_sdk",
|
||||||
":copy_headers",
|
":copy_headers",
|
||||||
|
":copy_libraries",
|
||||||
":copy_libraries_specification",
|
":copy_libraries_specification",
|
||||||
":copy_license",
|
":copy_license",
|
||||||
":copy_readme",
|
":copy_readme",
|
||||||
":copy_sdk_packages_yaml",
|
":copy_sdk_packages_yaml",
|
||||||
":copy_vm_dill_files",
|
":copy_sdk_snapshots",
|
||||||
":copy_vm_strong_dill_files",
|
":copy_vm_platform",
|
||||||
|
":copy_vm_platform_strong",
|
||||||
":write_dartdoc_options",
|
":write_dartdoc_options",
|
||||||
":write_revision_file",
|
":write_revision_file",
|
||||||
":write_version_file",
|
":write_version_file",
|
||||||
@@ -902,51 +806,30 @@ group("create_common_sdk") {
|
|||||||
# We do not support AOT on ia32 and should therefore not add the
|
# We do not support AOT on ia32 and should therefore not add the
|
||||||
# dart native compilation files since there is no AOT compiler/runtime
|
# dart native compilation files since there is no AOT compiler/runtime
|
||||||
# available.
|
# available.
|
||||||
if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
|
|
||||||
public_deps += [ ":group_dart2native" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Parts specific to the platform SDK.
|
|
||||||
group("_create_platform_sdk") {
|
|
||||||
visibility = [ ":*" ]
|
|
||||||
public_deps = [
|
|
||||||
":copy_platform_sdk_libraries",
|
|
||||||
":copy_platform_sdk_scripts",
|
|
||||||
":copy_platform_sdk_snapshots",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
# Parts specific to the full SDK.
|
|
||||||
group("create_most_sdk") {
|
|
||||||
public_deps = [
|
|
||||||
":copy_dart2js_dill_files",
|
|
||||||
":copy_dev_compiler_sdk",
|
|
||||||
":copy_full_sdk_libraries",
|
|
||||||
":copy_full_sdk_scripts",
|
|
||||||
":copy_full_sdk_snapshots",
|
|
||||||
":create_common_sdk",
|
|
||||||
]
|
|
||||||
|
|
||||||
if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
|
if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
|
||||||
public_deps += [
|
public_deps += [
|
||||||
":copy_dart2wasm_platform",
|
":copy_dart2wasm_platform",
|
||||||
":copy_dart2wasm_snapshot",
|
":copy_dart2wasm_snapshot",
|
||||||
|
":group_dart2native",
|
||||||
]
|
]
|
||||||
if (dart_include_wasm_opt) {
|
if (dart_include_wasm_opt) {
|
||||||
public_deps += [ ":copy_wasm_opt" ]
|
public_deps += [ ":copy_wasm_opt" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
group("create_full_sdk") {
|
|
||||||
visibility = [ ":*" ]
|
|
||||||
|
|
||||||
public_deps = [ ":create_most_sdk" ] + copy_sanitizer_deps
|
# The main target to depend on from ../BUILD.gn
|
||||||
|
group("create_sdk") {
|
||||||
|
public_deps = [ ":create_most_sdk" ]
|
||||||
|
|
||||||
|
# The AOT sanitizer runtimes go into the SDK itself.
|
||||||
|
public_deps += copy_sanitizer_deps
|
||||||
|
|
||||||
|
# The cross-compilation gen_snapshot binaries do not go into the SDK itself,
|
||||||
|
# but are included here as dependencies for the SDK builders, which will
|
||||||
|
# upload them separately.
|
||||||
if (dart_target_arch != "ia32" && dart_target_arch != "x86" &&
|
if (dart_target_arch != "ia32" && dart_target_arch != "x86" &&
|
||||||
dart_target_arch != "arm") {
|
dart_target_arch != "arm") {
|
||||||
# Do not include gen_snapshot binaries for cross-compilation into
|
|
||||||
# SDK, but add them as a dependency, so that they are built.
|
|
||||||
public_deps += [
|
public_deps += [
|
||||||
"../runtime/bin:gen_snapshot_product_linux_arm",
|
"../runtime/bin:gen_snapshot_product_linux_arm",
|
||||||
"../runtime/bin:gen_snapshot_product_linux_arm64",
|
"../runtime/bin:gen_snapshot_product_linux_arm64",
|
||||||
@@ -955,21 +838,3 @@ group("create_full_sdk") {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build a SDK with less stuff. It excludes dart2js, ddc, and web libraries.
|
|
||||||
group("create_platform_sdk") {
|
|
||||||
public_deps = [
|
|
||||||
":_create_platform_sdk",
|
|
||||||
":create_common_sdk",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
# The main target to depend on from ../BUILD.gn
|
|
||||||
group("create_sdk") {
|
|
||||||
public_deps = [ ":create_common_sdk" ]
|
|
||||||
if (dart_platform_sdk) {
|
|
||||||
public_deps += [ ":_create_platform_sdk" ]
|
|
||||||
} else {
|
|
||||||
public_deps += [ ":create_full_sdk" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
-19
@@ -22,8 +22,6 @@ AVAILABLE_ARCHS = utils.ARCH_FAMILY.keys()
|
|||||||
DART_USE_TOOLCHAIN = "DART_USE_TOOLCHAIN" # Use instead of --toolchain-prefix
|
DART_USE_TOOLCHAIN = "DART_USE_TOOLCHAIN" # Use instead of --toolchain-prefix
|
||||||
DART_USE_SYSROOT = "DART_USE_SYSROOT" # Use instead of --target-sysroot
|
DART_USE_SYSROOT = "DART_USE_SYSROOT" # Use instead of --target-sysroot
|
||||||
DART_USE_CRASHPAD = "DART_USE_CRASHPAD" # Use instead of --use-crashpad
|
DART_USE_CRASHPAD = "DART_USE_CRASHPAD" # Use instead of --use-crashpad
|
||||||
# use instead of --platform-sdk
|
|
||||||
DART_MAKE_PLATFORM_SDK = "DART_MAKE_PLATFORM_SDK"
|
|
||||||
|
|
||||||
DART_GN_ARGS = "DART_GN_ARGS"
|
DART_GN_ARGS = "DART_GN_ARGS"
|
||||||
|
|
||||||
@@ -40,10 +38,6 @@ def TargetSysroot(args):
|
|||||||
return os.environ.get(DART_USE_SYSROOT)
|
return os.environ.get(DART_USE_SYSROOT)
|
||||||
|
|
||||||
|
|
||||||
def MakePlatformSDK():
|
|
||||||
return DART_MAKE_PLATFORM_SDK in os.environ
|
|
||||||
|
|
||||||
|
|
||||||
def GetGNArgs(args):
|
def GetGNArgs(args):
|
||||||
if args.gn_args != None:
|
if args.gn_args != None:
|
||||||
return args.gn_args
|
return args.gn_args
|
||||||
@@ -272,9 +266,6 @@ def ToGnArgs(args, mode, arch, target_os, sanitizer, verify_sdk_hash,
|
|||||||
gn_args['is_hwasan'] = sanitizer == 'hwasan'
|
gn_args['is_hwasan'] = sanitizer == 'hwasan'
|
||||||
gn_args['is_qemu'] = args.use_qemu
|
gn_args['is_qemu'] = args.use_qemu
|
||||||
|
|
||||||
if not args.platform_sdk:
|
|
||||||
gn_args['dart_platform_sdk'] = args.platform_sdk
|
|
||||||
|
|
||||||
if args.include_experimental_vm_service:
|
if args.include_experimental_vm_service:
|
||||||
gn_args[
|
gn_args[
|
||||||
'include_experimental_vm_service'] = args.include_experimental_vm_service
|
'include_experimental_vm_service'] = args.include_experimental_vm_service
|
||||||
@@ -493,11 +484,6 @@ def AddCommonGnOptionArgs(parser):
|
|||||||
action='store_false')
|
action='store_false')
|
||||||
parser.set_defaults(clang=True)
|
parser.set_defaults(clang=True)
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--platform-sdk',
|
|
||||||
help='Directs the create_sdk target to create a smaller "Platform" SDK',
|
|
||||||
default=MakePlatformSDK(),
|
|
||||||
action='store_true')
|
|
||||||
parser.add_argument('--use-crashpad',
|
parser.add_argument('--use-crashpad',
|
||||||
default=False,
|
default=False,
|
||||||
dest='use_crashpad',
|
dest='use_crashpad',
|
||||||
@@ -553,11 +539,6 @@ def AddCommonGnOptionArgs(parser):
|
|||||||
'-s',
|
'-s',
|
||||||
type=str,
|
type=str,
|
||||||
help='Comma-separated list of arch=/path/to/sysroot mappings')
|
help='Comma-separated list of arch=/path/to/sysroot mappings')
|
||||||
parser.add_argument('--use-mallinfo2',
|
|
||||||
help='Use mallinfo2 to collect malloc stats.',
|
|
||||||
default=False,
|
|
||||||
dest='use_mallinfo2',
|
|
||||||
action='store_true')
|
|
||||||
parser.add_argument('--codesigning-identity',
|
parser.add_argument('--codesigning-identity',
|
||||||
help='Sign executables using the given identity.',
|
help='Sign executables using the given identity.',
|
||||||
type=str)
|
type=str)
|
||||||
|
|||||||
Reference in New Issue
Block a user