bb8d145616
This reverts commit edde575dcd.
Reason for revert: Breaks the Dart to Flutter roll and golem
Original change's description:
> [SDK] Adds an SDK hash to kernels and the VM.
>
> Adds a new SDK hash to kernels and the VM which is optionally checked
> to verify kernels are built for the same SDK as the VM.
> This helps catch incompatibilities that are currently causing
> subtle bugs and (not so subtle) crashes.
>
> The SDK hash is encoded in kernels as a new field in components.
> The hash is derived from the 10 byte git short hash.
>
> This new check can be disabled via:
> tools/gn.py ... --no-verify-sdk-hash
>
> This CL bumps the min. (and max.) supported kernel format version,
> making the VM backwards incompatible from this point back.
>
> Bug: https://github.com/dart-lang/sdk/issues/41802
> Change-Id: I3cbb2d481239ee64dafdaa0e4aac36c80281931b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150343
> Commit-Queue: Clement Skau <cskau@google.com>
> Reviewed-by: Jens Johansen <jensj@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
TBR=kustermann@google.com,jensj@google.com,cskau@google.com
Change-Id: I34cc7d378e2babdaaca4d932d19c19d0f35422fc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/41802
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152703
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
83 lines
2.8 KiB
Plaintext
83 lines
2.8 KiB
Plaintext
# Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
import("../build/dart/dart_action.gni")
|
|
|
|
_dart_root = get_path_info("..", "abspath")
|
|
|
|
template("compile_platform") {
|
|
assert(defined(invoker.libraries_specification_uri),
|
|
"Need 'libraries_specification_uri' in $target_name")
|
|
assert(defined(invoker.outputs), "Need 'outputs' in $target_name")
|
|
assert(defined(invoker.args), "Need 'args' in $target_name")
|
|
if (defined(invoker.single_root_scheme)) {
|
|
assert(defined(invoker.single_root_base),
|
|
"Need 'single_root_base' in $target_name")
|
|
}
|
|
if (defined(invoker.single_root_base)) {
|
|
assert(defined(invoker.single_root_scheme),
|
|
"Need 'single_root_scheme' in $target_name")
|
|
}
|
|
assert(!defined(invoker.script), "Remove 'script' from $target_name")
|
|
assert(!defined(invoker.depfile), "Remove 'depfile' from $target_name")
|
|
|
|
# In order to automatically compute dependencies, we need to add a dependency
|
|
# on vm_outline.dill. This is used to include the source code of Fasta itself
|
|
# in the dependency file. Without this, a change to Fasta wouldn't cause the
|
|
# platform dill files to be rebuilt. However, when building
|
|
# vm_outline_strong.dill, we shouldn't list it as a dependency as this would
|
|
# lead to cyclic dependencies.
|
|
add_implicit_vm_platform_dependency = true
|
|
if (defined(invoker.add_implicit_vm_platform_dependency)) {
|
|
add_implicit_vm_platform_dependency =
|
|
invoker.add_implicit_vm_platform_dependency
|
|
}
|
|
|
|
outline = "vm_outline_strong.dill"
|
|
if (defined(invoker.outline)) {
|
|
outline = invoker.outline
|
|
}
|
|
|
|
prebuilt_dart_action(target_name) {
|
|
script = "$_dart_root/pkg/front_end/tool/_fasta/compile_platform.dart"
|
|
|
|
packages = "$_dart_root/.packages"
|
|
|
|
outputs = invoker.outputs
|
|
|
|
inputs = []
|
|
deps = []
|
|
args = []
|
|
if (defined(invoker.deps)) {
|
|
deps += invoker.deps
|
|
}
|
|
|
|
if (defined(invoker.inputs)) {
|
|
inputs += invoker.inputs
|
|
}
|
|
|
|
if (add_implicit_vm_platform_dependency) {
|
|
inputs += [ "$root_out_dir/$outline" ]
|
|
deps += [ "$_dart_root/runtime/vm:vm_platform" ]
|
|
}
|
|
depfile = outputs[0] + ".d"
|
|
|
|
args += invoker.args
|
|
if (defined(invoker.single_root_scheme)) {
|
|
args += [ "--single-root-scheme=" + invoker.single_root_scheme ]
|
|
}
|
|
if (defined(invoker.single_root_base)) {
|
|
args += [ "--single-root-base=" + invoker.single_root_base ]
|
|
}
|
|
if (defined(invoker.single_root_scheme)) {
|
|
args += [ invoker.libraries_specification_uri ]
|
|
} else {
|
|
args +=
|
|
[ rebase_path(invoker.libraries_specification_uri, root_build_dir) ]
|
|
}
|
|
args += [ rebase_path("$root_out_dir/$outline", root_build_dir) ]
|
|
args += rebase_path(outputs, root_build_dir)
|
|
}
|
|
}
|