Skip to content

Commit

Permalink
Reland remove kernel sdk script (flutter#10814)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahwilliams authored Aug 21, 2019
1 parent a9b4763 commit a5d887c
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 148 deletions.
1 change: 0 additions & 1 deletion ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,6 @@ FILE: ../../../flutter/vulkan/vulkan_utilities.cc
FILE: ../../../flutter/vulkan/vulkan_utilities.h
FILE: ../../../flutter/vulkan/vulkan_window.cc
FILE: ../../../flutter/vulkan/vulkan_window.h
FILE: ../../../flutter/web_sdk/flutter_kernel_sdk.dart
FILE: ../../../flutter/web_sdk/libraries.json
FILE: ../../../flutter/web_sdk/sdk_rewriter.dart
----------------------------------------------------------------------------------------------------
Expand Down
82 changes: 69 additions & 13 deletions web_sdk/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import("//third_party/dart/build/dart/dart_action.gni")
import("//third_party/dart/utils/compile_platform.gni")

sdk_dill = "$root_out_dir/flutter_web_sdk/kernel/flutter_ddc_sdk.dill"
sdk_libraries_json = "$root_out_dir/flutter_web_sdk/libraries.json"

web_ui_sources =
exec_script("//third_party/dart/tools/list_dart_files.py",
Expand All @@ -31,6 +30,7 @@ web_engine_sources += [ "$flutter_root/lib/web_ui/lib/src/engine.dart" ]
group("web_sdk") {
deps = [
":flutter_dartdevc_kernel_sdk",
":flutter_dartdevc_kernel_sdk_outline",
":web_engine_sources",
":web_ui_library",
":web_ui_sources",
Expand Down Expand Up @@ -95,32 +95,88 @@ copy("web_ui_library") {
]
}

prebuilt_dart_action("flutter_dartdevc_kernel_sdk") {
# Compile the DDC SDK's summary.
prebuilt_dart_action("flutter_dartdevc_kernel_sdk_outline") {
deps = [
"//third_party/dart/pkg:pkg_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_sdk_patch_stamp",
]

inputs = [
"//third_party/dart/pkg/dev_compiler/tool/kernel_sdk.dart",
]
inputs = []

outputs = [
sdk_dill,
"$root_out_dir/flutter_web_sdk/lib/_internal/libraries.json",
"$root_out_dir/flutter_web_sdk/kernel/amd/dart_sdk.js",
"$root_out_dir/flutter_web_sdk/kernel/amd/dart_sdk.js.map",
]

script = "flutter_kernel_sdk.dart"
script = "//third_party/dart/utils/bazel/kernel_worker.dart"

args = [
"--summary-only",
"--target",
"ddc",
"--packages-file",
"file:///" + rebase_path("//third_party/dart/.packages"),
"--multi-root-scheme",
"org-dartlang-sdk",
"--multi-root",
rebase_path("../../"),
"--libraries-file",
"file:///" + rebase_path("$root_out_dir/flutter_web_sdk/libraries.json"),
"--output",
rebase_path(sdk_dill),
"--source",
"dart:core",

# Additional Flutter web dart libraries
"--source",
"dart:ui",
"--source",
"dart:_engine",
]
}

# Compiles the DDC SDK's JS code.
prebuilt_dart_action("flutter_dartdevc_kernel_sdk") {
deps = [
"//third_party/dart/pkg:pkg_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_files_stamp",
"//third_party/dart/utils/dartdevc:dartdevc_sdk_patch_stamp",
]

inputs = []

packages = "//third_party/dart/.packages"

output_path = rebase_path(sdk_dill)
libraries_path = rebase_path(sdk_libraries_json)
script = "//third_party/dart/pkg/dev_compiler/bin/dartdevc.dart"

outputs = [
"$root_out_dir/flutter_web_sdk/kernel/amd/dart_sdk.js",
"$root_out_dir/flutter_web_sdk/kernel/amd/dart_sdk.js.map",
]

args = [
"--output=$output_path",
"--libraries=$libraries_path",
"-k",
"--compile-sdk",
"dart:core",

# Additional Flutter web dart libraries
"dart:ui",
"dart:_engine",
"--no-summarize",
"--packages",
"file:///" + rebase_path("//third_party/dart/.packages"),
"--multi-root-scheme",
"org-dartlang-sdk",
"--multi-root",
rebase_path("../../"),
"--multi-root-output-path",
rebase_path("$root_out_dir/"),
"--libraries-file",
"file:///" + rebase_path("$root_out_dir/flutter_web_sdk/libraries.json"),
"--modules",
"amd",
"-o",
rebase_path("$root_out_dir/flutter_web_sdk/kernel/amd/dart_sdk.js"),
]
}
134 changes: 0 additions & 134 deletions web_sdk/flutter_kernel_sdk.dart

This file was deleted.

0 comments on commit a5d887c

Please sign in to comment.