[tracing] Use component for dawn_perfetto in standalone builds

In standalone component builds (is_component_build=true and
build_with_chromium=false), dawn_perfetto must be a component rather
than a group to avoid duplicate symbol errors when linking shared
libraries (such as dawn_native.dll linking against dawn_platform.dll.lib
on Windows).

Bug: 547643932
Change-Id: I01942f80457ed07a258aa2d9d7205aa31ea7a108
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/333075
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Etienne Pierre-doray <etiennep@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/DEPS b/DEPS
index f1f01f3..b90c5c2 100644
--- a/DEPS
+++ b/DEPS
@@ -310,7 +310,7 @@
     'condition': 'dawn_standalone',
   },
   'third_party/perfetto': {
-    'url': '{chromium_git}/external/github.com/google/perfetto.git@502412dfb6c6a70d99faddd8783cdc6ae072d4f2',
+    'url': '{chromium_git}/external/github.com/google/perfetto.git@1743360cb287a0f864a220d2950b2fab2d5771d0',
     'condition': 'dawn_standalone',
   },
 
diff --git a/src/dawn/platform/BUILD.gn b/src/dawn/platform/BUILD.gn
index 2aba382..86674ca 100644
--- a/src/dawn/platform/BUILD.gn
+++ b/src/dawn/platform/BUILD.gn
@@ -37,17 +37,23 @@
   }
 }
 
-group("dawn_perfetto") {
-  if (dawn_enable_perfetto) {
-    # When build_with_chromium=true we need to include the combined target
-    # to avoid multiply defined globals. Otherwise we can use the client API.
-    if (build_with_chromium) {
+if (build_with_chromium) {
+  group("dawn_perfetto") {
+    if (dawn_enable_perfetto) {
+      # When build_with_chromium=true we need to include the combined target
+      # to avoid multiply defined globals.
       public_deps = [ "$dawn_perfetto_dir:libperfetto" ]
-    } else {
-      public_deps = [ "$dawn_perfetto_dir/src/tracing:client_api" ]
+      public_configs = [ ":dawn_perfetto_config" ]
     }
-
-    public_configs = [ ":dawn_perfetto_config" ]
+  }
+} else {
+  component("dawn_perfetto") {
+    if (dawn_enable_perfetto) {
+      # In standalone builds, use the client API. A component is required in
+      # component builds to avoid duplicate symbol errors across Dawn DLLs.
+      public_deps = [ "$dawn_perfetto_dir/src/tracing:client_api" ]
+      public_configs = [ ":dawn_perfetto_config" ]
+    }
   }
 }
 
diff --git a/third_party/perfetto b/third_party/perfetto
index 502412d..1743360 160000
--- a/third_party/perfetto
+++ b/third_party/perfetto
@@ -1 +1 @@
-Subproject commit 502412dfb6c6a70d99faddd8783cdc6ae072d4f2
+Subproject commit 1743360cb287a0f864a220d2950b2fab2d5771d0