2019-06-17 01:03:25 +02:00
|
|
|
# The bazelrc file for MediaPipe OSS.
|
|
|
|
|
2020-05-21 18:46:31 +02:00
|
|
|
# Tensorflow needs remote repo
|
|
|
|
common --experimental_repo_remote_exec
|
|
|
|
|
2019-06-17 01:03:25 +02:00
|
|
|
# Basic build settings
|
|
|
|
build --jobs 128
|
2021-02-27 09:21:16 +01:00
|
|
|
build --define='absl=1' # for gtest
|
2020-05-21 18:46:31 +02:00
|
|
|
build --enable_platform_specific_config
|
2020-04-07 04:10:12 +02:00
|
|
|
|
2021-02-27 09:21:16 +01:00
|
|
|
# Enable stack traces
|
|
|
|
test --test_env="GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1"
|
|
|
|
|
2020-05-21 18:46:31 +02:00
|
|
|
# Linux
|
2020-12-10 04:13:05 +01:00
|
|
|
build:linux --cxxopt=-std=c++17
|
|
|
|
build:linux --host_cxxopt=-std=c++17
|
2020-05-21 18:46:31 +02:00
|
|
|
build:linux --copt=-w
|
|
|
|
|
|
|
|
# windows
|
2020-12-10 04:13:05 +01:00
|
|
|
build:windows --cxxopt=/std:c++17
|
|
|
|
build:windows --host_cxxopt=/std:c++17
|
2020-05-21 18:46:31 +02:00
|
|
|
build:windows --copt=/w
|
|
|
|
# For using M_* math constants on Windows with MSVC.
|
|
|
|
build:windows --copt=/D_USE_MATH_DEFINES
|
|
|
|
build:windows --host_copt=/D_USE_MATH_DEFINES
|
|
|
|
|
|
|
|
# macOS
|
2020-12-10 04:13:05 +01:00
|
|
|
build:macos --cxxopt=-std=c++17
|
|
|
|
build:macos --host_cxxopt=-std=c++17
|
2020-05-21 18:46:31 +02:00
|
|
|
build:macos --copt=-w
|
2019-06-17 01:03:25 +02:00
|
|
|
|
|
|
|
# Sets the default Apple platform to macOS.
|
|
|
|
build --apple_platform_type=macos
|
|
|
|
|
2022-05-04 00:29:57 +02:00
|
|
|
# Compile ObjC++ files with C++17
|
|
|
|
build --per_file_copt=.*\.mm\$@-std=c++17
|
|
|
|
|
2019-12-07 00:33:11 +01:00
|
|
|
# Allow debugging with XCODE
|
|
|
|
build --apple_generate_dsym
|
|
|
|
|
2019-06-17 01:03:25 +02:00
|
|
|
# Android configs.
|
2020-04-07 04:10:12 +02:00
|
|
|
# Note: the documentation tells us to use @androidndk//:default_crosstool, but
|
|
|
|
# the automatic configuration transition uses //external:android/crosstool.
|
|
|
|
# Using it here works and spares us from having two different config_settings
|
|
|
|
# for Android.
|
2019-06-17 01:03:25 +02:00
|
|
|
build:android --crosstool_top=//external:android/crosstool
|
|
|
|
build:android --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
|
|
|
|
build:android --linkopt=-landroid
|
|
|
|
build:android --linkopt=-ldl
|
|
|
|
build:android --linkopt=-llog
|
|
|
|
build:android --linkopt=-lm
|
|
|
|
build:android --linkopt=-Wl,--gc-sections
|
|
|
|
|
|
|
|
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
|
2019-08-17 03:49:25 +02:00
|
|
|
|
|
|
|
# iOS configs.
|
|
|
|
build:ios --apple_platform_type=ios
|
2021-12-10 23:03:51 +01:00
|
|
|
build:ios --copt=-fno-aligned-allocation
|
2019-08-17 03:49:25 +02:00
|
|
|
|
|
|
|
build:ios_i386 --config=ios
|
|
|
|
build:ios_i386 --cpu=ios_i386
|
|
|
|
build:ios_i386 --watchos_cpus=i386
|
|
|
|
|
|
|
|
build:ios_x86_64 --config=ios
|
|
|
|
build:ios_x86_64 --cpu=ios_x86_64
|
|
|
|
build:ios_x86_64 --watchos_cpus=i386
|
|
|
|
|
|
|
|
build:ios_armv7 --config=ios
|
|
|
|
build:ios_armv7 --cpu=ios_armv7
|
|
|
|
build:ios_armv7 --watchos_cpus=armv7k
|
|
|
|
|
|
|
|
build:ios_arm64 --config=ios
|
|
|
|
build:ios_arm64 --cpu=ios_arm64
|
|
|
|
build:ios_arm64 --watchos_cpus=armv7k
|
|
|
|
|
|
|
|
build:ios_arm64e --config=ios
|
|
|
|
build:ios_arm64e --cpu=ios_arm64e
|
|
|
|
build:ios_arm64e --watchos_cpus=armv7k
|
|
|
|
|
|
|
|
build:ios_fat --config=ios
|
|
|
|
build:ios_fat --ios_multi_cpus=armv7,arm64
|
|
|
|
build:ios_fat --watchos_cpus=armv7k
|
2020-04-24 23:06:05 +02:00
|
|
|
|
2023-04-27 23:43:14 +02:00
|
|
|
build:ios_sim_fat --config=ios
|
|
|
|
build:ios_sim_fat --ios_multi_cpus=x86_64,sim_arm64
|
|
|
|
|
2020-04-24 23:06:05 +02:00
|
|
|
build:darwin_x86_64 --apple_platform_type=macos
|
|
|
|
build:darwin_x86_64 --macos_minimum_os=10.12
|
|
|
|
build:darwin_x86_64 --cpu=darwin_x86_64
|
2020-12-10 04:13:05 +01:00
|
|
|
|
2022-05-04 00:29:57 +02:00
|
|
|
build:darwin_arm64 --apple_platform_type=macos
|
|
|
|
build:darwin_arm64 --macos_minimum_os=10.16
|
|
|
|
build:darwin_arm64 --cpu=darwin_arm64
|
|
|
|
|
2020-12-10 04:13:05 +01:00
|
|
|
# This bazelrc file is meant to be written by a setup script.
|
|
|
|
try-import %workspace%/.configure.bazelrc
|
|
|
|
|
|
|
|
# This bazelrc file can be used for user-specific custom build settings.
|
|
|
|
try-import %workspace%/.user.bazelrc
|