From d2649cea8b4e61f7dbd4a8a7dfcc204f689cc25f Mon Sep 17 00:00:00 2001 From: Peter Hawkins Date: Thu, 7 Sep 2023 13:56:50 -0400 Subject: [PATCH] Add alwayslink=1 to //src:flatc to fix Windows build failure. When built on Windows, the main() symbol ends up stripped out of the //:flatc binary unless the library containing main() is tagged alwayslink=1. --- src/BUILD.bazel | 1 + 1 file changed, 1 insertion(+) diff --git a/src/BUILD.bazel b/src/BUILD.bazel index 679b10f787d..9a5f16b2fa3 100644 --- a/src/BUILD.bazel +++ b/src/BUILD.bazel @@ -147,6 +147,7 @@ cc_library( ], strip_include_prefix = "/include", visibility = ["//:__pkg__"], + alwayslink = 1, deps = [ ":flatc_library", "//grpc/src/compiler:cpp_generator",