mirror of
https://github.com/zebrajr/tensorflow.git
synced 2026-01-15 12:15:41 +00:00
This improves build times when using the downloaded clang toolchain. Additionally, remove '-B/usr/bin' flags from the cuda CROSSTOOL when using the downloaded toolchain. It was forcing 'clang' to first search for the linker in '/usr/bin', preventing downloaded LLD from being selected. PiperOrigin-RevId: 211430374
70 lines
3.2 KiB
Plaintext
70 lines
3.2 KiB
Plaintext
# 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
|
|
build:android --crosstool_top=//external:android/crosstool
|
|
build:android --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
|
|
build:android_arm --config=android
|
|
build:android_arm --cpu=armeabi-v7a
|
|
build:android_arm --fat_apk_cpu=armeabi-v7a
|
|
build:android_arm64 --config=android
|
|
build:android_arm64 --cpu=arm64-v8a
|
|
build:android_arm64 --fat_apk_cpu=arm64-v8a
|
|
|
|
# Config to use a mostly-static build and disable modular op registration
|
|
# support (this will revert to loading TensorFlow with RTLD_GLOBAL in Python).
|
|
# By default, TensorFlow will build with a dependence on
|
|
# //tensorflow:libtensorflow_framework.so.
|
|
build:monolithic --define framework_shared_object=false
|
|
|
|
# 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.
|
|
build --define framework_shared_object=true
|
|
|
|
# Please note that MKL on MacOS or windows is still not supported.
|
|
# If you would like to use a local MKL instead of downloading, please set the
|
|
# environment variable "TF_MKL_ROOT" every time before build.
|
|
build:mkl --define=using_mkl=true
|
|
build:mkl -c opt
|
|
|
|
# This config option is used to enable MKL-DNN open source library only,
|
|
# without depending on MKL binary version.
|
|
build:mkl_open_source_only --define=using_mkl_dnn_only=true
|
|
|
|
build:download_clang --crosstool_top=@local_config_download_clang//:toolchain
|
|
build:download_clang --define=using_clang=true
|
|
# Instruct clang to use LLD for linking.
|
|
# This only works with GPU builds currently, since Bazel sets -B/usr/bin in
|
|
# auto-generated CPU crosstool, forcing /usr/bin/ld.lld to be preferred over
|
|
# the downloaded one.
|
|
build:download_clang_use_lld --linkopt='-fuse-ld=lld'
|
|
|
|
build:cuda --crosstool_top=@local_config_cuda//crosstool:toolchain
|
|
build:cuda --define=using_cuda=true --define=using_cuda_nvcc=true
|
|
|
|
build:cuda_clang --crosstool_top=@local_config_cuda//crosstool:toolchain
|
|
build:cuda_clang --define=using_cuda=true --define=using_cuda_clang=true --define=using_clang=true
|
|
|
|
build:sycl --crosstool_top=@local_config_sycl//crosstool:toolchain
|
|
build:sycl --define=using_sycl=true --define=using_trisycl=false
|
|
|
|
build:sycl_nodouble --crosstool_top=@local_config_sycl//crosstool:toolchain
|
|
build:sycl_nodouble --define=using_sycl=true --cxxopt -DTENSORFLOW_SYCL_NO_DOUBLE
|
|
|
|
build:sycl_asan --crosstool_top=@local_config_sycl//crosstool:toolchain
|
|
build:sycl_asan --define=using_sycl=true --define=using_trisycl=false --copt -fno-omit-frame-pointer --copt -fsanitize-coverage=3 --copt -DGPR_NO_DIRECT_SYSCALLS --linkopt -fPIC --linkopt -fsanitize=address
|
|
|
|
build:sycl_trisycl --crosstool_top=@local_config_sycl//crosstool:toolchain
|
|
build:sycl_trisycl --define=using_sycl=true --define=using_trisycl=true
|
|
|
|
build --define=use_fast_cpp_protos=true
|
|
build --define=allow_oversize_protos=true
|
|
build --define=grpc_no_ares=true
|
|
|
|
build --spawn_strategy=standalone
|
|
build --genrule_strategy=standalone
|
|
build -c opt
|
|
|
|
# Modular TF build options
|
|
build:dynamic_kernels --define=dynamic_loaded_kernels=true
|