Skip to content

Commit

Permalink
(#14753) (#14752) perfetto: Fix MSVC build for v31.0
Browse files Browse the repository at this point in the history
  • Loading branch information
miklelappo authored Dec 15, 2022
1 parent 98a991e commit 7905d2d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
6 changes: 6 additions & 0 deletions recipes/perfetto/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ sources:
url: "https://github.com/google/perfetto/archive/refs/tags/v20.1.tar.gz"
sha256: "d681bb76e2b73e6ba46db53c1502f31f4f16c36cd6e91d4ae839a3b44272f646"
patches:
"31.0":
- patch_file: "patches/v31.0/0001-tracing-fix-compile-on-MSVC.patch"
patch_description: "Fix compilation on MSVC"
patch_type: "backport"
patch_source: "https://android-review.googlesource.com/c/platform/external/perfetto/+/2355222"
sha256: "ad253a9bba3941bd8d1f206422d60eb1c06cb6d75d60eff5b5b8ae0f2ec7e15c"
"25.0":
- patch_file: "patches/v25.0/0001-MSVC-Fix-narrowing-conversion-error.patch"
"22.1":
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/sdk/perfetto.h b/sdk/perfetto.h
index 175c092..682cea7 100644
--- a/sdk/perfetto.h
+++ b/sdk/perfetto.h
@@ -18090,8 +18090,9 @@ class TrackEventDataSource
} while (false)

// C++17 doesn't like a move constructor being defined for the EventFinalizer
-// class but C++11 doesn't compile without it being defined so support both.
-#if PERFETTO_IS_AT_LEAST_CPP17()
+// class but C++11 and MSVC doesn't compile without it being defined so support
+// both.
+#if PERFETTO_IS_AT_LEAST_CPP17() && !PERFETTO_BUILDFLAG(PERFETTO_COMPILER_MSVC)
#define PERFETTO_INTERNAL_EVENT_FINALIZER_KEYWORD delete
#else
#define PERFETTO_INTERNAL_EVENT_FINALIZER_KEYWORD default
--
2.24.3 (Apple Git-128)

0 comments on commit 7905d2d

Please sign in to comment.