Skip to content

Commit d5de32d

Browse files
authored
Fix arm64 build (#1900)
1 parent 92b7f03 commit d5de32d

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/workflows/build.bazel.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,20 @@ $PYTHON tools/build/configure.py
4949

5050
cat .bazelrc
5151

52+
if [[ $(uname -m) == "arm64" ]]; then
53+
54+
bazel build \
55+
${BAZEL_OPTIMIZATION} \
56+
-- //tensorflow_io:python/ops/libtensorflow_io.so //tensorflow_io:python/ops/libtensorflow_io_plugins.so //tensorflow_io_gcs_filesystem/...
57+
58+
else
59+
5260
bazel build \
5361
${BAZEL_OPTIMIZATION} \
5462
-- //tensorflow_io/... //tensorflow_io_gcs_filesystem/...
5563

64+
fi
65+
5666
rm -rf build && mkdir -p build
5767

5868
if [[ $(uname) == "Linux" ]]; then

tools/build/configure.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def write_config():
119119
bazel_rc.write("build --enable_platform_specific_config\n")
120120
# Needed for GRPC build
121121
bazel_rc.write('build:macos --copt="-DGRPC_BAZEL_BUILD"\n')
122+
bazel_rc.write('build:macos --copt="-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION"\n')
122123
# With macOS
123124
bazel_rc.write('build:macos --copt="--target=x86_64-apple-macosx12.1"\n')
124125
bazel_rc.write('build:macos --linkopt="--target=x86_64-apple-macosx12.1"\n')

0 commit comments

Comments
 (0)