mirror of
https://github.com/wassname/ray.git
synced 2026-07-28 11:25:04 +08:00
Compatibility issues (#6071)
* Pass -f - to tar to force stdin on Windows * Quote paths that may contain spaces (causes issues on Windows) * Copy over Windows code from Arrow for glog signal handle uninstall * Add missing COPTS to build rules since we'll need them for Windows compatibility * Begin adding COPTS for Windows compatibility * Disable glog on Arrow until we change WIN32 to _WIN32 there * Missing header files that cause problems on Windows * WORD typedef conflicts with Windows; remove it * uint -> unsigned int wherever we're dealing with milliseconds (signed version is already int) * uint -> unsigned int for enums * uint -> size_t, wherever we're dealing with sizes or indices into arrays * Work around Boost 1.68 bug in detecting clang-cl (revert this after upgrading) * Missing #include <unistd.h> * Add check for signal handler uninstallation failure * Linting issue
This commit is contained in:
+9
-1
@@ -1,6 +1,12 @@
|
||||
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
|
||||
|
||||
COPTS = ["-DARROW_USE_GLOG"]
|
||||
COPTS = [] + select({
|
||||
"@bazel_tools//src/conditions:windows": [
|
||||
],
|
||||
"//conditions:default": [
|
||||
"-DARROW_USE_GLOG",
|
||||
],
|
||||
})
|
||||
|
||||
cc_library(
|
||||
name = "arrow",
|
||||
@@ -20,6 +26,7 @@ cc_library(
|
||||
"cpp/src/arrow/buffer.h",
|
||||
"cpp/src/arrow/io/concurrency.h",
|
||||
"cpp/src/arrow/io/interfaces.h",
|
||||
"cpp/src/arrow/io/mman.h",
|
||||
"cpp/src/arrow/io/util_internal.h",
|
||||
"cpp/src/arrow/memory_pool.h",
|
||||
"cpp/src/arrow/result.h",
|
||||
@@ -41,6 +48,7 @@ cc_library(
|
||||
"cpp/src/arrow/util/thread_pool.h",
|
||||
"cpp/src/arrow/util/type_traits.h",
|
||||
"cpp/src/arrow/util/ubsan.h",
|
||||
"cpp/src/arrow/util/utf8.h",
|
||||
"cpp/src/arrow/util/variant.h",
|
||||
"cpp/src/arrow/util/visibility.h",
|
||||
"cpp/src/arrow/util/windows_compatibility.h",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# been written at cython/cython and tensorflow/tensorflow. We branch from
|
||||
# Tensorflow's version as it is more actively maintained and works for gRPC
|
||||
# Python's needs.
|
||||
def pyx_library(name, deps=[], py_deps=[], srcs=[], **kwargs):
|
||||
def pyx_library(name, deps=[], py_deps=[], srcs=[], copts=[], **kwargs):
|
||||
"""Compiles a group of .pyx / .pxd / .py files.
|
||||
First runs Cython to create .cpp files for each input .pyx or .py + .pxd
|
||||
pair. Then builds a shared object for each, passing "deps" to each cc_binary
|
||||
@@ -46,7 +46,7 @@ def pyx_library(name, deps=[], py_deps=[], srcs=[], **kwargs):
|
||||
# Optionally use PYTHON_BIN_PATH on Linux platforms so that python 3
|
||||
# works. Windows has issues with cython_binary so skip PYTHON_BIN_PATH.
|
||||
cmd=
|
||||
"PYTHONHASHSEED=0 $${PYTHON_BIN_PATH} $(location @cython//:cython_binary) --cplus $(SRCS) --output-file $(OUTS)",
|
||||
'PYTHONHASHSEED=0 "$${PYTHON_BIN_PATH}" "$(location @cython//:cython_binary)" --cplus $(SRCS) --output-file $(OUTS)',
|
||||
tools=["@cython//:cython_binary"] + pxd_srcs,
|
||||
)
|
||||
|
||||
@@ -57,6 +57,7 @@ def pyx_library(name, deps=[], py_deps=[], srcs=[], **kwargs):
|
||||
native.cc_binary(
|
||||
name=shared_object_name,
|
||||
srcs=[stem + ".cpp"],
|
||||
copts=copts,
|
||||
deps=deps + ["@local_config_python//:python_headers"],
|
||||
linkshared=1,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user