Skip to content

Commit

Permalink
Fix arm64 build (#1900)
Browse files Browse the repository at this point in the history
  • Loading branch information
yongtang authored Dec 18, 2023
1 parent 92b7f03 commit d5de32d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build.bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,20 @@ $PYTHON tools/build/configure.py

cat .bazelrc

if [[ $(uname -m) == "arm64" ]]; then

bazel build \
${BAZEL_OPTIMIZATION} \
-- //tensorflow_io:python/ops/libtensorflow_io.so //tensorflow_io:python/ops/libtensorflow_io_plugins.so //tensorflow_io_gcs_filesystem/...

else

bazel build \
${BAZEL_OPTIMIZATION} \
-- //tensorflow_io/... //tensorflow_io_gcs_filesystem/...

fi

rm -rf build && mkdir -p build

if [[ $(uname) == "Linux" ]]; then
Expand Down
1 change: 1 addition & 0 deletions tools/build/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def write_config():
bazel_rc.write("build --enable_platform_specific_config\n")
# Needed for GRPC build
bazel_rc.write('build:macos --copt="-DGRPC_BAZEL_BUILD"\n')
bazel_rc.write('build:macos --copt="-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION"\n')
# With macOS
bazel_rc.write('build:macos --copt="--target=x86_64-apple-macosx12.1"\n')
bazel_rc.write('build:macos --linkopt="--target=x86_64-apple-macosx12.1"\n')
Expand Down

0 comments on commit d5de32d

Please sign in to comment.