mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00

* Update build rules and patches for darwin_arm64 platform. Changes include: Update nelhage/rules_boost package from current version (08/5/2020) to 5/27/2021 version. Remove rules_boost-undefine-boost_fallthrough.patch, since BOOST_FALLTHROUGH seems to be defined now. Minor changes to rules_boost-windows-linkopts.patch to use default condition to add -lpthread flag for all platforms. Add darwin_arm64 config to BUILD files for lib civetweb pulled in via prometheu dependency. * upgrade boost to 1.74.0 from 1.71.0 to match the udpated build file for windows. * Fix ray_cpp_pkg * Use boost/bind/bind.hpp boost/bind.hpp and global namespace placeholders are deprecated. * lint * Use absl::bind_front when possible. Otherwise, NOLINT * lint * lint * lint * lint * more lint * final lint * trigger build
51 lines
1.5 KiB
Diff
51 lines
1.5 KiB
Diff
Target an older version of Windows SDK so that we don't get a conflicting definition of struct pollfd
|
|
|
|
Windows Vista and later SDKs define struct pollfd for WSAPoll(), but it has a permanent bug:
|
|
- https://curl.haxx.se/mail/lib-2012-08/0014.html
|
|
- https://curl.haxx.se/mail/lib-2012-10/0038.html
|
|
civetweb provides its own implementation of poll, but it has a conflicting definition for pollfd.
|
|
Hence we block Windows from defining pollfd (which this project doesn't use).
|
|
---
|
|
bazel/civetweb.BUILD | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
diff --git bazel/civetweb.BUILD bazel/civetweb.BUILD
|
|
--- bazel/civetweb.BUILD
|
|
+++ bazel/civetweb.BUILD
|
|
@@ -9,6 +9,11 @@ config_setting(
|
|
values = {"cpu": "darwin_x86_64"},
|
|
)
|
|
|
|
+config_setting(
|
|
+ name = "darwin_arm64",
|
|
+ values = {"cpu": "darwin_arm64"},
|
|
+)
|
|
+
|
|
config_setting(
|
|
name = "windows",
|
|
values = { "cpu": "x64_windows" },
|
|
@@ -34,6 +39,7 @@ cc_library(
|
|
"-DNO_CACHING",
|
|
"-DNO_SSL",
|
|
"-DNO_FILES",
|
|
+ "-D_WIN32_WINNT=0x0502",
|
|
"-UDEBUG",
|
|
],
|
|
includes = [
|
|
@@ -46,6 +52,7 @@ cc_library(
|
|
}) + select({
|
|
":darwin": [],
|
|
":darwin_x86_64": [],
|
|
+ ":darwin_arm64": [],
|
|
":windows": [],
|
|
":windows_msvc": [],
|
|
"//conditions:default": ["-lrt"],
|
|
@@ -86,6 +93,7 @@ cc_library(
|
|
}) + select({
|
|
":darwin": [],
|
|
":darwin_x86_64": [],
|
|
+ ":darwin_arm64": [],
|
|
":windows": [],
|
|
":windows_msvc": [],
|
|
"//conditions:default": ["-lrt"],
|
|
--
|