Unified sampling PGO for art

Use a combined sampling PGO profile for ART libraries.

Test: build
Bug: 79161490
Change-Id: I2eeb1ac07971e37ee23848ebfb718b4651b9ac75
diff --git a/build/Android.bp b/build/Android.bp
index 9305bc6..15058d6 100644
--- a/build/Android.bp
+++ b/build/Android.bp
@@ -223,6 +223,36 @@
     ],
 }
 
+cc_defaults {
+    name: "art_pgo_defaults",
+    visibility: ["//art:__subpackages__"],
+    pgo: {
+        sampling: true,
+    },
+    target: {
+        android_arm64: {
+            pgo: {
+                profile_file: "art/art_arm_arm64.profdata",
+            },
+        },
+        android_arm: {
+            pgo: {
+                profile_file: "art/art_arm_arm64.profdata",
+            },
+        },
+        android_x86_64: {
+            pgo: {
+                profile_file: "art/art_x86_x86_64.profdata",
+            },
+        },
+        android_x86: {
+            pgo: {
+                profile_file: "art/art_x86_x86_64.profdata",
+            },
+        },
+    },
+}
+
 art_debug_defaults {
     name: "art_debug_defaults",
     visibility: ["//art:__subpackages__"],
diff --git a/libartbase/Android.bp b/libartbase/Android.bp
index 32f4641..884989e 100644
--- a/libartbase/Android.bp
+++ b/libartbase/Android.bp
@@ -155,6 +155,7 @@
     defaults: [
         "libartbase_defaults",
         "libart_nativeunwind_defaults",
+        "art_pgo_defaults",
     ],
     visibility: [
         // TODO(b/133140750): Clean this up.
diff --git a/runtime/Android.bp b/runtime/Android.bp
index d67ed43..9b37b0f 100644
--- a/runtime/Android.bp
+++ b/runtime/Android.bp
@@ -428,36 +428,6 @@
     export_shared_lib_headers: ["libbase"],
 }
 
-cc_defaults {
-    name: "libart_pgo",
-
-    pgo: {
-        sampling: true,
-    },
-    target: {
-        android_arm64: {
-            pgo: {
-                profile_file: "art/libart_arm_arm64.profdata",
-            },
-        },
-        android_arm: {
-            pgo: {
-                profile_file: "art/libart_arm_arm64.profdata",
-            },
-        },
-        android_x86_64: {
-            pgo: {
-                profile_file: "art/libart_x86_x86_64.profdata",
-            },
-        },
-        android_x86: {
-            pgo: {
-                profile_file: "art/libart_x86_x86_64.profdata",
-            },
-        },
-    },
-}
-
 libart_static_cc_defaults {
     name: "libart_static_base_defaults",
     whole_static_libs: [
@@ -549,7 +519,7 @@
     defaults: [
         "libart_defaults",
         "libart_nativeunwind_defaults",
-        "libart_pgo",
+        "art_pgo_defaults",
     ],
     whole_static_libs: [
     ],