| # Copyright 2021 The IREE Authors | |
| # | |
| # Licensed under the Apache License v2.0 with LLVM Exceptions. | |
| # See https://llvm.org/LICENSE.txt for license information. | |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| # For now, just import the main IREE bazelrc | |
| try-import %workspace%/../../build_tools/bazel/iree.bazelrc | |
| # TF uses C++17. | |
| build:generic_clang --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 | |
| build:generic_gcc --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 | |
| # Ignore visibility issues in TensorFlow. They are inconsistently applied | |
| # to the OSS codebase. | |
| build --nocheck_visibility | |
| # Clang Flags for working around tensorflow warnings. | |
| build:generic_clang --copt=-Wno-inconsistent-missing-override --host_copt=-Wno-inconsistent-missing-override | |
| build:generic_clang --copt=-Wno-c++11-narrowing --host_copt=-Wno-c++11-narrowing | |
| # Gcc Flags for working around tensorflow warnings. | |
| # We don't generally develop with this configuration, so this is mostly an | |
| # attempt to keep CIs somewhat clean. | |
| build:generic_gcc --copt=-Wno-sign-compare --host_copt=-Wno-sign-compare | |
| build:generic_gcc --copt=-Wno-return-type --host_copt=-Wno-return-type | |
| build:generic_gcc --copt=-Wno-unused-function --host_copt=-Wno-unused-function | |
| build:generic_gcc --copt=-Wno-deprecated-declarations --host_copt=-Wno-deprecated-declarations | |
| build:generic_gcc --copt=-Wno-maybe-uninitialized --host_copt=-Wno-maybe-uninitialized | |
| build:generic_gcc --copt=-Wno-unused-result --host_copt=-Wno-unused-result | |
| build:generic_gcc --copt=-Wno-comment --host_copt=-Wno-comment | |
| build:generic_gcc --cxxopt=-Wno-class-memaccess --host_cxxopt=-Wno-class-memaccess | |
| build:generic_gcc --copt=-Wno-unknown-pragmas --host_copt=-Wno-unknown-pragmas | |
| build:generic_gcc --copt=-Wno-strict-aliasing --host_copt=-Wno-strict-aliasing | |
| build:generic_gcc --copt=-Wno-ignored-attributes --host_copt=-Wno-ignored-attributes | |
| build:generic_gcc --copt=-Wno-unused-but-set-variable --host_copt=-Wno-unused-but-set-variable | |
| build:generic_gcc --copt=-Wno-unused-variable --host_copt=-Wno-unused-variable | |
| build:generic_gcc --copt=-Wno-parentheses --host_copt=-Wno-parentheses | |
| # TensorFlow uses cc_shared_library, which was added behind this experimental | |
| # flag in Bazel 5.1.0. Since we depend TensorFlow, we have to enable it too. | |
| build --experimental_cc_shared_library | |
| # Link protobufs by default. | |
| build --define tsl_link_protobuf=true |