Version 2.19.0-3.0.dev

Merge commit '0f456a845c9180b626a1c1f986d3028d7f4a373e' into 'dev'
diff --git a/DEPS b/DEPS
index a8ed953..d2f035c 100644
--- a/DEPS
+++ b/DEPS
@@ -39,7 +39,7 @@
 
   # Checked-in SDK version. The checked-in SDK is a Dart SDK distribution in a
   # cipd package used to run Dart scripts in the build and test infrastructure.
-  "sdk_tag": "version:2.17.0",
+  "sdk_tag": "version:2.18.0-271.0.dev",
 
   # co19 is a cipd package. Use update.sh in tests/co19[_2] to update these
   # hashes.
diff --git a/build/dart/dart_action.gni b/build/dart/dart_action.gni
index 0643c87..f1e9559 100644
--- a/build/dart/dart_action.gni
+++ b/build/dart/dart_action.gni
@@ -173,7 +173,6 @@
 #    testonly
 #    visibility
 template("prebuilt_dart_action") {
-  assert(defined(invoker.script), "script must be defined for $target_name")
   assert(defined(invoker.outputs), "outputs must be defined for $target_name")
   assert(defined(invoker.args), "args must be defined for $target_name")
   assert(!defined(invoker.sources),
@@ -200,23 +199,6 @@
   }
 }
 
-template("prebuilt_dart2js_action") {
-  assert(defined(invoker.script), "script must be defined for $target_name")
-  assert(defined(invoker.outputs), "outputs must be defined for $target_name")
-  assert(defined(invoker.args), "args must be defined for $target_name")
-
-  _prebuilt_tool_action(target_name) {
-    forward_variables_from(invoker, "*")
-
-    # TODO(zra): On Fuchsia use a prebuilt dart2js, or a prebuilt Observatory.
-    extension = ""
-    if (is_win) {
-      extension = ".bat"
-    }
-    binary = "$_dart_root/tools/sdks/dart-sdk/bin/dart2js${extension}"
-  }
-}
-
 # This template runs the specified tool produced by the in-progress build.
 #
 # Parameters:
diff --git a/pkg/test_runner/lib/src/compiler_configuration.dart b/pkg/test_runner/lib/src/compiler_configuration.dart
index ac15486..17f8aa5 100644
--- a/pkg/test_runner/lib/src/compiler_configuration.dart
+++ b/pkg/test_runner/lib/src/compiler_configuration.dart
@@ -963,12 +963,14 @@
   Command computeAssembleCommand(String tempDir, List arguments,
       Map<String, String> environmentOverrides) {
     late String cc;
-    String? shared, ldFlags;
+    String? shared;
+    var ldFlags = <String>[];
     List<String>? target;
     if (_isAndroid) {
       cc = "$ndkPath/toolchains/$abiTriple-4.9/prebuilt/"
           "$host-x86_64/bin/$abiTriple-gcc";
       shared = '-shared';
+      ldFlags.add('-Wl,--no-undefined');
     } else if (Platform.isLinux) {
       if (_isSimArm || (_isArm && _configuration.useQemu)) {
         cc = 'arm-linux-gnueabihf-gcc';
@@ -982,11 +984,13 @@
         cc = 'gcc';
       }
       shared = '-shared';
+      ldFlags.add('-Wl,--no-undefined');
     } else if (Platform.isMacOS) {
       cc = 'clang';
       shared = '-dynamiclib';
+      ldFlags.add('-Wl,-undefined,error');
       // Tell Mac linker to give up generating eh_frame from dwarf.
-      ldFlags = '-Wl,-no_compact_unwind';
+      ldFlags.add('-Wl,-no_compact_unwind');
       if ({Architecture.arm64, Architecture.arm64c}
           .contains(_configuration.architecture)) {
         target = ['-arch', 'arm64'];
@@ -1022,7 +1026,7 @@
     var args = [
       if (target != null) ...target,
       if (ccFlags != null) ccFlags,
-      if (ldFlags != null) ldFlags,
+      ...ldFlags,
       shared,
       '-o',
       '$tempDir/out.aotsnapshot',
diff --git a/runtime/observatory/BUILD.gn b/runtime/observatory/BUILD.gn
index 86647e8..40a42d8 100644
--- a/runtime/observatory/BUILD.gn
+++ b/runtime/observatory/BUILD.gn
@@ -6,11 +6,9 @@
 import("../../build/dart/dart_action.gni")
 import("observatory_sources.gni")
 
-prebuilt_dart2js_action("build_observatory") {
+prebuilt_dart_action("build_observatory") {
   visibility = [ ":copy_main_dart_js" ]
 
-  script = "web/main.dart"
-
   # dart2js produces a .deps file, but it is not in a format that is understood
   # by ninja, so we explicitly list all the sources here.
   inputs = [ "../../.dart_tool/package_config.json" ] + observatory_sources
@@ -22,10 +20,13 @@
   }
 
   args = [
+    "compile",
+    "js",
     "-o",
     rebase_path(output),
     "--packages=" + rebase_path("../../.dart_tool/package_config.json"),
     "--no-sound-null-safety",
+    rebase_path("web/main.dart"),
   ]
   if (is_debug) {
     args += [ "--enable-asserts" ]
diff --git a/runtime/observatory_2/BUILD.gn b/runtime/observatory_2/BUILD.gn
index b21c2f0..54580f9 100644
--- a/runtime/observatory_2/BUILD.gn
+++ b/runtime/observatory_2/BUILD.gn
@@ -6,11 +6,9 @@
 import("../../build/dart/dart_action.gni")
 import("observatory_sources.gni")
 
-prebuilt_dart2js_action("build_observatory") {
+prebuilt_dart_action("build_observatory") {
   visibility = [ ":copy_main_dart_js" ]
 
-  script = "web/main.dart"
-
   # dart2js produces a .deps file, but it is not in a format that is understood
   # by ninja, so we explicitly list all the sources here.
   inputs = [ "../../.dart_tool/package_config.json" ] + observatory_sources
@@ -22,9 +20,12 @@
   }
 
   args = [
+    "compile",
+    "js",
     "-o",
     rebase_path(output),
     "--packages=" + rebase_path("../../.dart_tool/package_config.json"),
+    rebase_path("web/main.dart"),
   ]
   if (is_debug) {
     args += [ "--enable-asserts" ]
diff --git a/runtime/tests/vm/dart/run_appended_aot_snapshot_test.dart b/runtime/tests/vm/dart/run_appended_aot_snapshot_test.dart
index 48b1b01..3bdf55b 100644
--- a/runtime/tests/vm/dart/run_appended_aot_snapshot_test.dart
+++ b/runtime/tests/vm/dart/run_appended_aot_snapshot_test.dart
@@ -4,7 +4,6 @@
 
 import 'dart:async';
 import 'dart:io';
-import 'dart:typed_data';
 
 import 'package:dart2native/dart2native.dart';
 import 'package:path/path.dart' as path;
diff --git a/runtime/tests/vm/dart_2/run_appended_aot_snapshot_test.dart b/runtime/tests/vm/dart_2/run_appended_aot_snapshot_test.dart
index 608ae3d..c5f1fa2 100644
--- a/runtime/tests/vm/dart_2/run_appended_aot_snapshot_test.dart
+++ b/runtime/tests/vm/dart_2/run_appended_aot_snapshot_test.dart
@@ -6,7 +6,6 @@
 
 import 'dart:async';
 import 'dart:io';
-import 'dart:typed_data';
 
 import 'package:dart2native/dart2native.dart';
 import 'package:path/path.dart' as path;
diff --git a/tests/co19/update.sh b/tests/co19/update.sh
index 610182f..47ecedc 100755
--- a/tests/co19/update.sh
+++ b/tests/co19/update.sh
@@ -1,6 +1,5 @@
 #!/usr/bin/env bash
 # Uploads a new version of the co19 CIPD package.
-# This script requires access to the dart-build-access group, which EngProd has.
 
 set -e
 set -x
@@ -24,26 +23,13 @@
 # Update DEPS:
 gclient setdep --var=co19_rev=$NEW
 
-BUILDERS=$(jq -r '.builder_configurations
-  | map(select(.steps
-    | any(.arguments
-      | select(.!=null)
-        | any(test("co19($|(/.*))")))))
-  | map(.builders)
-  | flatten
-  | sort
-  | .[] += "-try"
-  | join(",")' \
-  tools/bots/test_matrix.json)
-
 # Make a nice commit. Don't include the '#' character to avoid referencing Dart
 # SDK issues.
 git commit DEPS -m \
   "$(printf "[co19] Roll co19 to $NEW\n\n" \
   && cd $CO19 \
   && git log --date='format:%Y-%m-%d' --pretty='format:%ad %ae %s' $OLD..$NEW \
-    | sed 's/\#/dart-lang\/co19\#/g' \
-  && printf "\nCq-Include-Trybots: dart/try:$BUILDERS\n")"
+    | sed 's/\#/dart-lang\/co19\#/g'
 
 rm -rf tests/co19/src.git
 
@@ -51,9 +37,3 @@
 ISSUE=$(git config --get branch.cl-co19-roll-co19-to-$NEW.gerritissue)
 
 git cl web
-
-set +x
-cat << EOF
-
-Wait for the builders to finish. If any failed, pre-approve them.
-EOF
diff --git a/tests/co19_2/update.sh b/tests/co19_2/update.sh
index ca6b486..d7f1540 100755
--- a/tests/co19_2/update.sh
+++ b/tests/co19_2/update.sh
@@ -1,6 +1,5 @@
 #!/usr/bin/env bash
 # Uploads a new version of the co19_2 CIPD package.
-# This script requires access to the dart-build-access group, which EngProd has.
 
 set -e
 set -x
@@ -24,26 +23,13 @@
 # Update DEPS:
 gclient setdep --var=co19_2_rev=$NEW
 
-BUILDERS=$(jq -r '.builder_configurations
-  | map(select(.steps
-    | any(.arguments
-      | select(.!=null)
-        | any(test("co19_2($|(/.*))")))))
-  | map(.builders)
-  | flatten
-  | sort
-  | .[] += "-try"
-  | join(",")' \
-  tools/bots/test_matrix.json)
-
 # Make a nice commit. Don't include the '#' character to avoid referencing Dart
 # SDK issues.
 git commit DEPS -m \
   "$(printf "[co19] Roll co19_2 to $NEW\n\n" \
   && cd $CO19 \
   && git log --date='format:%Y-%m-%d' --pretty='format:%ad %ae %s' $OLD..$NEW \
-    | sed 's/\#/dart-lang\/co19\#/g' \
-  && printf "\nCq-Include-Trybots: dart/try:$BUILDERS\n")"
+    | sed 's/\#/dart-lang\/co19\#/g'
 
 rm -rf tests/co19_2/src.git
 
@@ -51,9 +37,3 @@
 ISSUE=$(git config --get branch.cl-co19-roll-co19-to-$NEW.gerritissue)
 
 git cl web
-
-set +x
-cat << EOF
-
-Wait for the builders to finish. If any failed, pre-approve them.
-EOF
diff --git a/tools/VERSION b/tools/VERSION
index 7e38b09..62109bd 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 19
 PATCH 0
-PRERELEASE 2
+PRERELEASE 3
 PRERELEASE_PATCH 0
\ No newline at end of file