Skip to content

Commit

Permalink
Roll dart, remove patched_sdk from flutter now that frontend handles …
Browse files Browse the repository at this point in the history
…patching (flutter#4633)

* Fixes to make https://dart-review.googlesource.com/c/sdk/+/36641 work with Flutter

* Roll dart

* Update license

* Roll dart

* Update license

* Add libraries.json to dependencies
  • Loading branch information
aam authored Feb 5, 2018
1 parent 151bb37 commit 9bc2efd
Show file tree
Hide file tree
Showing 6 changed files with 296 additions and 119 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ vars = {
# Dart is: https://github.com/dart-lang/sdk/blob/master/DEPS.
# You can use //tools/dart/create_updated_flutter_deps.py to produce
# updated revision list of existing dependencies.
'dart_revision': '7078f6be58802c4e274625b8b59b4c855ddc4fb7',
'dart_revision': 'ea91bc9888184d5a2fc309c36656fdd325ef503c',

'dart_args_tag': '0.13.7',
'dart_async_tag': '2.0.2',
Expand Down
124 changes: 7 additions & 117 deletions lib/snapshot/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -290,112 +290,6 @@ template("process_library_source") {
}
}

template("concatenate_patch") {
assert(defined(invoker.libsources), "Need a sources in $target_name")
assert(defined(invoker.output), "Need an output in $target_name")

process_library_source(target_name) {
libsources = invoker.libsources
inputs = []
output = invoker.output
script = "//third_party/dart/runtime/tools/concatenate_patches.py"
args = [
"--output",
rebase_path(output, root_build_dir),
]
}
}

template("generate_vm_patched_sdk") {
assert(defined(invoker.libraries), "Need libraries in $target_name")

concatenation_target_names = []

# Concatenate vm library patches.
foreach(library, invoker.libraries) {
name = library[0]

target_output = "$target_gen_dir/patches/${name}_patch.dart"
concatenate_patch("concatenate_${name}_patch") {
libsources = rebase_path(library[1], ".", library[2])
output = target_output
}
concatenation_target_names += [ ":concatenate_${name}_patch" ]
}

# Build the patched sdk out of the concatenated patches and the special
# libraries.
generate_patched_sdk(target_name) {
mode = "flutter"
deps = concatenation_target_names + ["//third_party/dart/runtime/vm:kernel_platform_files"]
input_patches_dir = "$target_gen_dir/patches"
patched_sdk_dir = "flutter_patched_sdk"
outputs = [
"$root_out_dir/${patched_sdk_dir}/lib/libraries.json",
]
}
}

generate_vm_patched_sdk("flutter_patched_sdk") {
libraries = [
[
"async",
async_runtime_sources,
"//third_party/dart/runtime/lib",
],
[
"collection",
collection_runtime_sources,
"//third_party/dart/runtime/lib",
],
[
"convert",
convert_runtime_sources,
"//third_party/dart/runtime/lib",
],
[
"core",
core_runtime_sources,
"//third_party/dart/runtime/lib",
],
[
"developer",
developer_runtime_sources,
"//third_party/dart/runtime/lib",
],
[
"internal",
internal_runtime_sources,
"//third_party/dart/runtime/lib",
],
[
"io",
io_runtime_sources,
"//third_party/dart/runtime/bin",
],
[
"isolate",
isolate_runtime_sources,
"//third_party/dart/runtime/lib",
],
[
"math",
math_runtime_sources,
"//third_party/dart/runtime/lib",
],
[
"mirrors",
mirrors_runtime_sources,
"//third_party/dart/runtime/lib",
],
[
"typed_data",
typed_data_runtime_sources,
"//third_party/dart/runtime/lib",
],
]
}

action("compile_non_strong_platform") {
script = "//third_party/dart/tools/compile_platform.py"

Expand All @@ -404,18 +298,16 @@ action("compile_non_strong_platform") {
]

sources = [
"$root_out_dir/flutter_patched_sdk/lib/libraries.json",
"libraries.json",
]

outputs = [
"$root_out_dir/flutter_patched_sdk/platform.dill",
"$root_out_dir/flutter_patched_sdk/vm_outline.dill",
]

inputs = []

deps = [
":flutter_patched_sdk",
inputs = [
"libraries.json",
]

depfile = "$root_out_dir/flutter_patched_sdk/platform.dill.d"
Expand All @@ -433,20 +325,18 @@ action("compile_platform") {
visibility = [
":kernel_platform_files"
]

sources = [
"$root_out_dir/flutter_patched_sdk/lib/libraries.json",
"libraries.json",
]

outputs = [
"$root_out_dir/flutter_patched_sdk/platform_strong.dill",
"$root_out_dir/flutter_patched_sdk/vm_outline_strong.dill",
]

inputs = []

deps = [
":flutter_patched_sdk",
inputs = [
"libraries.json",
]

depfile = "$root_out_dir/flutter_patched_sdk/platform_strong.dill.d"
Expand Down
144 changes: 144 additions & 0 deletions lib/snapshot/libraries.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
{
"comment:0": "NOTE: THIS FILE IS GENERATED. DO NOT EDIT.",
"comment:1": "Instead modify 'flutter/lib/snapshot/libraries.yaml' and follow the instructions therein.",
"flutter": {
"libraries": {
"_builtin": {
"uri": "../../../third_party/dart/runtime/bin/builtin.dart"
},
"core": {
"patches": [
"../../../third_party/dart/runtime/lib/core_patch.dart",
"../../../third_party/dart/runtime/lib/array.dart",
"../../../third_party/dart/runtime/lib/array_patch.dart",
"../../../third_party/dart/runtime/lib/bigint.dart",
"../../../third_party/dart/runtime/lib/bool_patch.dart",
"../../../third_party/dart/runtime/lib/date_patch.dart",
"../../../third_party/dart/runtime/lib/double.dart",
"../../../third_party/dart/runtime/lib/double_patch.dart",
"../../../third_party/dart/runtime/lib/errors_patch.dart",
"../../../third_party/dart/runtime/lib/expando_patch.dart",
"../../../third_party/dart/runtime/lib/function.dart",
"../../../third_party/dart/runtime/lib/function_patch.dart",
"../../../third_party/dart/runtime/lib/growable_array.dart",
"../../../third_party/dart/runtime/lib/identical_patch.dart",
"../../../third_party/dart/runtime/lib/immutable_map.dart",
"../../../third_party/dart/runtime/lib/integers.dart",
"../../../third_party/dart/runtime/lib/integers_patch.dart",
"../../../third_party/dart/runtime/lib/invocation_mirror_patch.dart",
"../../../third_party/dart/runtime/lib/lib_prefix.dart",
"../../../third_party/dart/runtime/lib/map_patch.dart",
"../../../third_party/dart/runtime/lib/null_patch.dart",
"../../../third_party/dart/runtime/lib/object_patch.dart",
"../../../third_party/dart/runtime/lib/regexp_patch.dart",
"../../../third_party/dart/runtime/lib/stacktrace.dart",
"../../../third_party/dart/runtime/lib/stopwatch_patch.dart",
"../../../third_party/dart/runtime/lib/string_buffer_patch.dart",
"../../../third_party/dart/runtime/lib/string_patch.dart",
"../../../third_party/dart/runtime/lib/type_patch.dart",
"../../../third_party/dart/runtime/lib/uri_patch.dart",
"../../../third_party/dart/runtime/lib/weak_property.dart"
],
"uri": "../../../third_party/dart/sdk/lib/core/core.dart"
},
"async": {
"patches": [
"../../../third_party/dart/runtime/lib/async_patch.dart",
"../../../third_party/dart/runtime/lib/deferred_load_patch.dart",
"../../../third_party/dart/runtime/lib/schedule_microtask_patch.dart",
"../../../third_party/dart/runtime/lib/timer_patch.dart"
],
"uri": "../../../third_party/dart/sdk/lib/async/async.dart"
},
"collection": {
"patches": [
"../../../third_party/dart/runtime/lib/collection_patch.dart",
"../../../third_party/dart/runtime/lib/compact_hash.dart"
],
"uri": "../../../third_party/dart/sdk/lib/collection/collection.dart"
},
"typed_data": {
"patches": "../../../third_party/dart/runtime/lib/typed_data_patch.dart",
"uri": "../../../third_party/dart/sdk/lib/typed_data/typed_data.dart"
},
"nativewrappers": {
"uri": "../../../third_party/dart/sdk/lib/html/dartium/nativewrappers.dart"
},
"developer": {
"patches": [
"../../../third_party/dart/runtime/lib/developer.dart",
"../../../third_party/dart/runtime/lib/profiler.dart",
"../../../third_party/dart/runtime/lib/timeline.dart"
],
"uri": "../../../third_party/dart/sdk/lib/developer/developer.dart"
},
"isolate": {
"patches": [
"../../../third_party/dart/runtime/lib/isolate_patch.dart",
"../../../third_party/dart/runtime/lib/timer_impl.dart"
],
"uri": "../../../third_party/dart/sdk/lib/isolate/isolate.dart"
},
"mirrors": {
"patches": [
"../../../third_party/dart/runtime/lib/mirrors_patch.dart",
"../../../third_party/dart/runtime/lib/mirrors_impl.dart",
"../../../third_party/dart/runtime/lib/mirror_reference.dart"
],
"uri": "../../../third_party/dart/sdk/lib/mirrors/mirrors.dart"
},
"_vmservice": {
"uri": "../../../third_party/dart/sdk/lib/vmservice/vmservice.dart"
},
"io": {
"patches": [
"../../../third_party/dart/runtime/bin/common_patch.dart",
"../../../third_party/dart/runtime/bin/directory_patch.dart",
"../../../third_party/dart/runtime/bin/eventhandler_patch.dart",
"../../../third_party/dart/runtime/bin/file_patch.dart",
"../../../third_party/dart/runtime/bin/file_system_entity_patch.dart",
"../../../third_party/dart/runtime/bin/filter_patch.dart",
"../../../third_party/dart/runtime/bin/io_service_patch.dart",
"../../../third_party/dart/runtime/bin/namespace_patch.dart",
"../../../third_party/dart/runtime/bin/platform_patch.dart",
"../../../third_party/dart/runtime/bin/process_patch.dart",
"../../../third_party/dart/runtime/bin/socket_patch.dart",
"../../../third_party/dart/runtime/bin/stdio_patch.dart",
"../../../third_party/dart/runtime/bin/secure_socket_patch.dart",
"../../../third_party/dart/runtime/bin/sync_socket_patch.dart"
],
"uri": "../../../third_party/dart/sdk/lib/io/io.dart"
},
"_internal": {
"patches": [
"../../../third_party/dart/runtime/lib/internal_patch.dart",
"../../../third_party/dart/runtime/lib/class_id_fasta.dart",
"../../../third_party/dart/runtime/lib/print_patch.dart",
"../../../third_party/dart/runtime/lib/symbol_patch.dart",
"../../../third_party/dart/sdk/lib/internal/patch.dart"
],
"uri": "../../../third_party/dart/sdk/lib/internal/internal.dart"
},
"convert": {
"patches": "../../../third_party/dart/runtime/lib/convert_patch.dart",
"uri": "../../../third_party/dart/sdk/lib/convert/convert.dart"
},
"profiler": {
"uri": "../../../third_party/dart/sdk/lib/profiler/profiler.dart"
},
"math": {
"patches": "../../../third_party/dart/runtime/lib/math_patch.dart",
"uri": "../../../third_party/dart/sdk/lib/math/math.dart"
},
"_http": {
"uri": "../../../third_party/dart/sdk/lib/_http/http.dart"
},
"ui": {
"uri": "../../lib/ui/ui.dart"
},
"vmservice_io": {
"uri": "../../../third_party/dart/runtime/bin/vmservice/vmservice_io.dart"
}
}
}
}
Loading

0 comments on commit 9bc2efd

Please sign in to comment.