[dart2wasm] Simplify libraries.yaml setup:

Move common libraries of wasm and wasm_js_compatibility to wasm_common,
remove wasm_base.

Change-Id: I0293cfd11b58be3d921413fdb2fff7171f0b3d4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364320
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
diff --git a/sdk/lib/libraries.json b/sdk/lib/libraries.json
index dd990af..56265a2 100644
--- a/sdk/lib/libraries.json
+++ b/sdk/lib/libraries.json
@@ -119,7 +119,7 @@
   "wasm": {
     "include": [
       {
-        "target": "wasm_base"
+        "target": "wasm_common"
       }
     ],
     "libraries": {
@@ -144,6 +144,25 @@
           "_internal/wasm/lib/sync_star_patch.dart",
           "_internal/wasm/lib/weak_patch.dart"
         ]
+      },
+      "convert": {
+        "uri": "convert/convert.dart",
+        "patches": [
+          "_internal/wasm/lib/convert_patch.dart"
+        ]
+      },
+      "typed_data": {
+        "uri": "typed_data/typed_data.dart",
+        "patches": [
+          "_internal/wasm/lib/simd_patch.dart",
+          "_internal/wasm/lib/typed_data_patch.dart"
+        ]
+      },
+      "_string": {
+        "uri": "_internal/wasm/lib/string.dart"
+      },
+      "_typed_data": {
+        "uri": "_internal/wasm/lib/typed_data.dart"
       }
     }
   },
@@ -189,40 +208,6 @@
           "_internal/wasm_js_compatibility/lib/typed_data.dart",
           "_internal/wasm_js_compatibility/lib/typed_data_patch.dart"
         ]
-      },
-      "_simd": {
-        "uri": "_internal/wasm/lib/simd.dart"
-      }
-    }
-  },
-  "wasm_base": {
-    "include": [
-      {
-        "target": "wasm_common"
-      }
-    ],
-    "libraries": {
-      "convert": {
-        "uri": "convert/convert.dart",
-        "patches": [
-          "_internal/wasm/lib/convert_patch.dart"
-        ]
-      },
-      "typed_data": {
-        "uri": "typed_data/typed_data.dart",
-        "patches": [
-          "_internal/wasm/lib/simd_patch.dart",
-          "_internal/wasm/lib/typed_data_patch.dart"
-        ]
-      },
-      "_simd": {
-        "uri": "_internal/wasm/lib/simd.dart"
-      },
-      "_string": {
-        "uri": "_internal/wasm/lib/string.dart"
-      },
-      "_typed_data": {
-        "uri": "_internal/wasm/lib/typed_data.dart"
       }
     }
   },
@@ -263,6 +248,9 @@
       "_object_helper": {
         "uri": "_internal/wasm/lib/object_helper.dart"
       },
+      "_simd": {
+        "uri": "_internal/wasm/lib/simd.dart"
+      },
       "_string_helper": {
         "uri": "_internal/wasm/lib/string_helper.dart"
       },
diff --git a/sdk/lib/libraries.yaml b/sdk/lib/libraries.yaml
index d4ada91..068e1b2 100644
--- a/sdk/lib/libraries.yaml
+++ b/sdk/lib/libraries.yaml
@@ -112,7 +112,7 @@
 
 wasm:
   include:
-    - target: "wasm_base"
+    - target: "wasm_common"
   libraries:
     core:
       uri: core/core.dart
@@ -134,6 +134,19 @@
         - _internal/wasm/lib/string_patch.dart
         - _internal/wasm/lib/sync_star_patch.dart
         - _internal/wasm/lib/weak_patch.dart
+    convert:
+      uri: convert/convert.dart
+      patches:
+      - _internal/wasm/lib/convert_patch.dart
+    typed_data:
+      uri: typed_data/typed_data.dart
+      patches:
+        - _internal/wasm/lib/simd_patch.dart
+        - _internal/wasm/lib/typed_data_patch.dart
+    _string:
+      uri: _internal/wasm/lib/string.dart
+    _typed_data:
+      uri: _internal/wasm/lib/typed_data.dart
 
 wasm_js_compatibility:
   include:
@@ -169,28 +182,6 @@
         - _internal/wasm/lib/simd_patch.dart
         - _internal/wasm_js_compatibility/lib/typed_data.dart
         - _internal/wasm_js_compatibility/lib/typed_data_patch.dart
-    _simd:
-      uri: _internal/wasm/lib/simd.dart
-
-wasm_base:
-  include:
-    - target: "wasm_common"
-  libraries:
-    convert:
-      uri: convert/convert.dart
-      patches:
-      - _internal/wasm/lib/convert_patch.dart
-    typed_data:
-      uri: typed_data/typed_data.dart
-      patches:
-        - _internal/wasm/lib/simd_patch.dart
-        - _internal/wasm/lib/typed_data_patch.dart
-    _simd:
-      uri: _internal/wasm/lib/simd.dart
-    _string:
-      uri: _internal/wasm/lib/string.dart
-    _typed_data:
-      uri: _internal/wasm/lib/typed_data.dart
 
 wasm_common:
   libraries:
@@ -218,6 +209,8 @@
       uri: _internal/wasm/lib/js_types.dart
     _object_helper:
       uri: _internal/wasm/lib/object_helper.dart
+    _simd:
+      uri: _internal/wasm/lib/simd.dart
     _string_helper:
       uri: _internal/wasm/lib/string_helper.dart
     _wasm: