Major clean up build files, use flags-per-feature.
These days we support an incredible number of build configurations:
- standalone (GN)
- in chromium (GN)
- in v8 (GN)
- in Fuchsia (GN)
- in Android (soong)
- in Google3
- amalgamated SDK
For each config we want to pick only some components of the
codebase. So far we've been carefully using intersections of
platform flags (e.g. build_standalone && !build_with_android)
but that has become unmaintainable.
This CL mainly introduces one flag per feature. Benefit:
1. All feature flags live in one place (perfetto.gni) and are
easy to reason about.
2. All the GN conditions depend on these feature flags.
Test: manually rolled in chromium and v8 and looked
at diff of .ninja files.
Bug: 132678367
Bug: 140126865
Change-Id: I36c4653f25751654c04ab257bdb7a0756269a813
diff --git a/test/producer_socket_fuzzer.cc b/test/producer_socket_fuzzer.cc
index cb6dc4f..430b2de 100644
--- a/test/producer_socket_fuzzer.cc
+++ b/test/producer_socket_fuzzer.cc
@@ -21,14 +21,7 @@
namespace perfetto {
namespace socket_fuzz {
-// If we're building on Android and starting the daemons ourselves,
-// create the sockets in a world-writable location.
-#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) && \
- PERFETTO_BUILDFLAG(PERFETTO_START_DAEMONS)
-#define TEST_PRODUCER_SOCK_NAME "/data/local/tmp/traced_producer"
-#else
-#define TEST_PRODUCER_SOCK_NAME ::perfetto::GetProducerSocket()
-#endif
+namespace {
class FakeEventListener : public base::UnixSocket::EventListener {
public:
@@ -58,8 +51,6 @@
std::function<void()> data_sent_;
};
-int FuzzSharedMemory(const uint8_t* data, size_t size);
-
int FuzzSharedMemory(const uint8_t* data, size_t size) {
if (!data)
return 0;
@@ -77,6 +68,7 @@
task_runner.RunUntilCheckpoint("data_sent");
return 0;
}
+} // namespace
} // namespace socket_fuzz
} // namespace perfetto