| # Copyright 2022 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 |
| |
| ############################################################################### |
| # Project specific globals. |
| ############################################################################### |
| |
| # We want everything built with visibility hidden, because we use explicit |
| # visibility project wide for exports. There is no better way to do this |
| # in bazel. If building with hidden visibility, then we must also disable |
| # Bazel's built-in shared-library-for-tests feature, since it implies that |
| # we are explicitly controlling library creation. Further, force PIC code |
| # since we are using all artifacts in as part of shared libraries. |
| build --copt="-fvisibility=hidden" |
| build --dynamic_mode=off |
| build --force_pic |
| build --copt="-fno-exceptions" |
| |
| # Required by OpenXLA |
| # https://github.com/openxla/xla/issues/1323 |
| build --nocheck_visibility |
| |
| # TODO: File issue against XLA team: for deprecations in |
| # external/xla/xla/comparison_util.h |
| build --copt="-Wno-deprecated-declarations" |
| |
| ############################################################################### |
| # Configurations affecting the build. |
| ############################################################################### |
| |
| build:bloaty --compilation_mode=opt --strip=never --copt=-g |
| build:lto --copt "-flto" |