Clean up .bazelrc for MacOS.

PiperOrigin-RevId: 363494734
Change-Id: Ib45cf82d6d6f45b7089b1250dd4c2547b1a175cb
This commit is contained in:
Mihai Maruseac 2021-03-17 13:29:45 -07:00 committed by TensorFlower Gardener
parent a0f62581b6
commit a88dbe9ade

View File

@ -101,11 +101,6 @@ build:libc++ --action_env=PATH
build:libc++ --define force_libcpp=enabled
build:libc++ --linkopt -fuse-ld=lld
# Trigger --config=<host platform>, except when cross-compiling.
build --enable_platform_specific_config
build:android --noenable_platform_specific_config
build:ios --noenable_platform_specific_config
# Android configs. Bazel needs to have --cpu and --fat_apk_cpu both set to the
# target CPU to build transient dependencies correctly. See
# https://docs.bazel.build/versions/master/user-manual.html#flag--fat_apk_cpu
@ -125,13 +120,7 @@ build:android_x86_64 --cpu=x86_64
build:android_x86_64 --fat_apk_cpu=x86_64
# Sets the default Apple platform to macOS.
build:macos --apple_platform_type=macos
# gRPC on MacOS requires this #define
build:macos --copt=-DGRPC_BAZEL_BUILD
# Settings for MacOS on ARM CPUs.
build:macos_arm64 --cpu=darwin_arm64
build --apple_platform_type=macos
# iOS configs for each architecture and the fat binary builds.
build:ios --apple_platform_type=ios
@ -148,6 +137,11 @@ build:ios_x86_64 --cpu=ios_x86_64
build:ios_fat --config=ios
build:ios_fat --ios_multi_cpus=armv7,arm64,i386,x86_64
# Enables all the macos config options for macos_arm64
build:macos_arm64 --config=macos
build:macos_arm64 --apple_platform_type=macos
build:macos_arm64 --cpu=darwin_arm64
# For projects which use TensorFlow as part of a Bazel build process, putting
# nothing in a bazelrc will default to a monolithic build. The following line
# opts in to modular op registration support by default.
@ -268,6 +262,13 @@ build:c++1z --config=c++17
build:c++17_gcc --cxxopt=-std=c++1z
build:c++1z_gcc --config=c++17_gcc
# Enable using platform specific build settings, except when cross-compiling for
# mobile platforms.
build --enable_platform_specific_config
build:android --noenable_platform_specific_config
build:ios --noenable_platform_specific_config
build:macos_arm64 --noenable_platform_specific_config
# Suppress C++ compiler warnings, otherwise build logs become 10s of MBs.
build:android --copt=-w
build:ios --copt=-w