diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index 887fab3bad..c2afca65cb 100644 --- a/bench/nanobench.cpp +++ b/bench/nanobench.cpp @@ -1361,7 +1361,7 @@ int nanobench_main() { return 0; } -#if !defined SK_BUILD_FOR_IOS +#if !defined(SK_BUILD_FOR_IOS) || defined(NANOBENCH_DEFINE_MAIN) int main(int argc, char** argv) { SkCommandLineFlags::Parse(argc, argv); return nanobench_main(); diff --git a/gn/BUILD.gn b/gn/BUILD.gn index 11ab560a2e..cd7f8f74cf 100644 --- a/gn/BUILD.gn +++ b/gn/BUILD.gn @@ -212,7 +212,7 @@ config("default") { # our clever hack to give each tool back its own main(). cflags += [ "-DDM_DEFINE_MAIN", - "-Dnanobench_main=main", + "-DNANOBENCH_DEFINE_MAIN", "-Dtool_main=main", "-Dtest_main=main", ]