Skip to content

Commit

Permalink
Add alwayslink=1 to //src:flatc to fix Windows build failure.
Browse files Browse the repository at this point in the history
When built on Windows, the main() symbol ends up stripped out of the //:flatc binary unless the library containing main() is tagged alwayslink=1.
  • Loading branch information
hawkinsp committed Sep 7, 2023
1 parent 362dd66 commit 4134eac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ cc_library(
],
strip_include_prefix = "/include",
visibility = ["//:__pkg__"],
alwayslink = 1,
deps = [
":flatc_library",
"//grpc/src/compiler:cpp_generator",
Expand Down

0 comments on commit 4134eac

Please sign in to comment.