|
| 1 | +# Copyright (c) Meta Platforms, Inc. and affiliates. |
| 2 | +# All rights reserved. |
| 3 | +# This source code is licensed under the BSD-style license found in the |
| 4 | +# LICENSE file in the root directory of this source tree. |
| 5 | + |
| 6 | +################################################################################ |
| 7 | +# FBGEMM Bazel configuration file |
| 8 | +# |
| 9 | +# Based on MozoLM build options: |
| 10 | +# https://github.com/google-research/mozolm/blob/main/.bazelrc |
| 11 | +# |
| 12 | +# Documentation for Bazel configuration options can be found in: |
| 13 | +# https://bazel.build/reference/command-line-reference |
| 14 | +################################################################################ |
| 15 | + |
| 16 | +# Automatically picks up host-OS-specific config lines from bazelrc files |
| 17 | +# Enabling this is equivalent to auto-calling --config=linux on Linux, --config=windows, etc |
| 18 | +build --enable_platform_specific_config |
| 19 | + |
| 20 | +# Print logs for all tests |
| 21 | +test --test_output=all |
| 22 | + |
| 23 | +# Build with verbose logging |
| 24 | +build --verbose_explanations --verbose_failures |
| 25 | +test --verbose_explanations --verbose_failures |
| 26 | + |
| 27 | +# Build with optimization mode turned on |
| 28 | +build --compilation_mode opt |
| 29 | +test --compilation_mode opt |
| 30 | + |
| 31 | +# Build FBGEMM with C17 and C++17 |
| 32 | +build:linux --cxxopt=-std=c++17 |
| 33 | +build:linux --host_cxxopt=-std=c++17 |
| 34 | +build:linux --conlyopt=-std=c17 |
| 35 | +build:linux --host_conlyopt=-std=c17 |
| 36 | +build:macos --cxxopt=-std=c++17 |
| 37 | +build:macos --host_cxxopt=-std=c++17 |
| 38 | +build:macos --conlyopt=-std=c17 |
| 39 | +build:macos --host_conlyopt=-std=c17 |
| 40 | +build:windows --cxxopt=/std:c++17 |
| 41 | +build:windows --host_cxxopt=/std:c++17 |
| 42 | +build:windows --conlyopt=/std:c17 |
| 43 | +build:windows --host_conlyopt=/std:c17 |
| 44 | + |
| 45 | +# Generation of `runfiles` directories on Windows has to be explicitly enabled. |
| 46 | +# See https://github.com/bazelbuild/bazel/issues/8843. |
| 47 | +build:windows --enable_runfiles |
| 48 | +test:windows --enable_runfiles |
0 commit comments