diff --git a/BUILD.boost b/BUILD.boost index a008279f3..3a920d794 100644 --- a/BUILD.boost +++ b/BUILD.boost @@ -145,8 +145,8 @@ boost_library( "libs/context/src/untested.cpp", "libs/context/src/continuation.cpp", ], - copts = select({ - ":windows_x86_64": ["/DBOOST_CONTEXT_EXPORT="], + defines = select({ + ":windows_x86_64": ["BOOST_CONTEXT_EXPORT"], "//conditions:default": [], }), visibility = ["//visibility:public"], @@ -187,9 +187,9 @@ boost_library( "libs/fiber/examples/asio/round_robin.hpp", "libs/fiber/examples/asio/yield.hpp", ], - copts = select({ + defines = select({ ":windows_x86_64": [ - "/D_WIN32_WINNT=0x0601", + "_WIN32_WINNT=0x0601", ], "//conditions:default": [], }), @@ -329,7 +329,15 @@ boost_library( ], "//conditions:default": [], }), - linkopts = ["-lpthread"], + linkopts = select({ + ":linux": [ + "-lpthread", + ], + ":osx_x86_64": [ + "-lpthread", + ], + "//conditions:default": [], + }), deps = [ ":bind", ":date_time", @@ -1903,6 +1911,12 @@ boost_library( ":tti", ":type_traits", ], + linkopts = select({ + ":windows": [ + "bcrypt.lib" + ], + "//conditions:default": [], + }), ) boost_library( diff --git a/boost/boost.bzl b/boost/boost.bzl index fd052fa16..5898fdb0a 100644 --- a/boost/boost.bzl +++ b/boost/boost.bzl @@ -25,7 +25,7 @@ default_copts = select({ "//conditions:default": [], }) -default_defines = select({ +default_defines = ["BOOST_USE_VALGRIND"] + select({ ":windows_x86_64": ["BOOST_ALL_NO_LIB"], # Turn auto_link off in MSVC compiler "//conditions:default": [], })