Enable enable_perfetto_trace_processor_httpd on Windows
Now that we have both a Windows port of the socket
class (aosp/1539388) AND a getopt (aosp/1539391)
replacement, we can enable the --httpd mode on
trace_processor_shell.exe
Bug: 174454879
Test: manual on Windows: open https://ui.perfetto.dev
and check that the RPC interop works.
Change-Id: I34be367a1f75f6e2b4d065e48254180b1dee5706
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index 9c63051..31c73b6 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -60,14 +60,6 @@
} else {
perfetto_local_symbolizer = "0"
}
- if (enable_perfetto_trace_processor_httpd) {
- perfetto_tp_httpd = "PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() || " +
- "PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() || " +
- "PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_MAC()"
- } else {
- perfetto_tp_httpd = "0"
- }
-
response_file_contents = [
"--flags", # Keep this marker first.
"PERFETTO_ANDROID_BUILD=$perfetto_build_with_android",
@@ -83,7 +75,7 @@
"PERFETTO_VERSION_GEN=$enable_perfetto_version_gen",
"PERFETTO_TP_PERCENTILE=$enable_perfetto_trace_processor_percentile",
"PERFETTO_TP_LINENOISE=$enable_perfetto_trace_processor_linenoise",
- "PERFETTO_TP_HTTPD=$perfetto_tp_httpd",
+ "PERFETTO_TP_HTTPD=$enable_perfetto_trace_processor_httpd",
"PERFETTO_TP_JSON=$enable_perfetto_trace_processor_json",
"PERFETTO_LOCAL_SYMBOLIZER=$perfetto_local_symbolizer",
"PERFETTO_ZLIB=$enable_perfetto_zlib",
diff --git a/gn/perfetto.gni b/gn/perfetto.gni
index 2b3bf02..13831a0 100644
--- a/gn/perfetto.gni
+++ b/gn/perfetto.gni
@@ -257,7 +257,7 @@
# Enables httpd RPC support in the trace processor.
# Further per-OS conditionals are applied in gn/BUILD.gn.
enable_perfetto_trace_processor_httpd =
- enable_perfetto_trace_processor && perfetto_build_standalone && !is_win
+ enable_perfetto_trace_processor && perfetto_build_standalone
# Enables Zlib support. This is used both by the "perfetto" cmdline client
# (for compressing traces) and by trace processor (for compressed traces).
diff --git a/include/perfetto/base/build_configs/bazel/perfetto_build_flags.h b/include/perfetto/base/build_configs/bazel/perfetto_build_flags.h
index ae45e29..ada8006 100644
--- a/include/perfetto/base/build_configs/bazel/perfetto_build_flags.h
+++ b/include/perfetto/base/build_configs/bazel/perfetto_build_flags.h
@@ -34,7 +34,7 @@
#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_VERSION_GEN() (1)
#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_TP_PERCENTILE() (1)
#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_TP_LINENOISE() (1)
-#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_TP_HTTPD() (PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() || PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() || PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_MAC())
+#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_TP_HTTPD() (1)
#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_TP_JSON() (1)
#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_LOCAL_SYMBOLIZER() (PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() || PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_MAC() ||PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN())
#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_ZLIB() (1)