commit | 2dc7679cc1b5caa9bb943d0994faa6e0267414f2 | [log] [tgz] |
---|---|---|
author | Joshua Haberman <[email protected]> | Mon May 23 20:59:31 2022 +0000 |
committer | Joshua Haberman <[email protected]> | Mon May 23 20:59:31 2022 +0000 |
tree | 16cb509a513b8f9c43cdb62fdba947af8fd4d8a7 | |
parent | 6d2827b3774ea350526a2a9f1cdb1ba8dafeafb6 [diff] [blame] |
Fixed the Windows build of protoc by statically linking deps.
diff --git a/build_defs/cpp_opts.bzl b/build_defs/cpp_opts.bzl index f868c4a..1d5594d 100644 --- a/build_defs/cpp_opts.bzl +++ b/build_defs/cpp_opts.bzl
@@ -38,3 +38,10 @@ "-lm", ], }) + +# When cross-compiling for Windows we need to statically link pthread and the C++ library. +PROTOC_LINK_OPTS = select({ + "//build_defs:config_win32": ["-static"], + "//build_defs:config_win64": ["-static"], + "//conditions:default": [], +})