diff options
Diffstat (limited to 'include/perfetto/base/build_config.h')
-rw-r--r-- | include/perfetto/base/build_config.h | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/include/perfetto/base/build_config.h b/include/perfetto/base/build_config.h index bb641f501..5f0108830 100644 --- a/include/perfetto/base/build_config.h +++ b/include/perfetto/base/build_config.h @@ -88,22 +88,45 @@ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_COMPILER_MSVC() 0 #endif +#if defined(PERFETTO_BUILD_WITH_ANDROID) +#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_ANDROID_BUILD() 1 +#else +#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_ANDROID_BUILD() 0 +#endif + +#if defined(PERFETTO_BUILD_WITH_EMBEDDER) +#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_EMBEDDER_BUILD() 1 +#else +#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_EMBEDDER_BUILD() 0 +#endif + +#if defined(PERFETTO_BUILD_WITH_CHROMIUM) +#if !defined(PERFETTO_BUILD_WITH_EMBEDDER) +#error PERFETTO_BUILD_WITH_EMBEDDER must be defined when \ + PERFETTO_BUILD_WITH_CHROMIUM is defined +#endif +#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_CHROMIUM_BUILD() 1 +#else +#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_CHROMIUM_BUILD() 0 +#endif + +#if !defined(PERFETTO_BUILD_WITH_EMBEDDER) && \ + !defined(PERFETTO_BUILD_WITH_ANDROID) +#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_STANDALONE_BUILD() 1 +#else +#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_STANDALONE_BUILD() 0 +#endif + +#if defined(PERFETTO_START_DAEMONS_FOR_TESTING) +#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_START_DAEMONS() 1 +#else +#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_START_DAEMONS() 0 +#endif + #if defined(PERFETTO_BUILD_WITH_ANDROID_USERDEBUG) #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_ANDROID_USERDEBUG_BUILD() 1 #else #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_ANDROID_USERDEBUG_BUILD() 0 #endif -// perfetto_build_flags.h contains the tweakable build flags defined via GN. -// - In GN builds (e.g., standalone, chromium, v8) this file is generated at -// build time via the gen_rule //gn/gen_buildflags. -// - In Android in-tree builds, this file is generated by tools/gen_android_bp -// and checked in into include/perfetto/base/build_configs/android_tree/. The -// default cflags add this path to the default include path. -// - Similarly, in bazel builds, this file is generated by tools/gen_bazel and -// checked in into include/perfetto/base/build_configs/bazel/. -// - In amaglamated builds, this file is generated by tools/gen_amalgamated and -// added to the amalgamated headers. -#include "perfetto_build_flags.h" // no-include-violation-check - #endif // INCLUDE_PERFETTO_BASE_BUILD_CONFIG_H_ |