blob: f8387ff2c81f14d548e6230511ebc4a2cf6c4481 [file] [log] [blame]
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main IREE build file.
# Note that project-wide, bazel repo aliases are used:
# "@com_google_absl//absl/python"
# "@com_google_absl//absl"
# "@bazel_skylib//lib"
# "@com_google_benchmark//:benchmark"
# "@llvm-project//mlir"
# "@llvm-project//llvm"
# "@com_github_google_flatbuffers//:flatbuffers"
# "@org_tensorflow//tensorflow"
# "@renderdoc_api//"
# "@com_google_ruy//ruy"
#
# Various scripts and helpers operate on these prefixes textually, so
# avoid doing any systematic construction that would break the matching.
package(
default_visibility = ["//visibility:public"],
features = ["layering_check"],
licenses = ["notice"], # Apache 2.0
)
# Enables the debug service and other profiling features.
# $ bazel build --define=IREE_DEBUG=1 :some_target
config_setting(
name = "debug",
define_values = {"IREE_DEBUG": "1"},
)
# Marker library which can be extended to provide flags for things that
# need to know the platform target.
cc_library(
name = "target_config",
defines = ["IREE_UNSPECIFIED_TARGET=1"],
)
config_setting(
name = "enable_tensorflow",
define_values = {
"iree_tensorflow": "true",
},
)
# Note that the "proper" way to do this is via a query on @bazel_tools,
# but as with so many things bazel, it doesn't work reliably across versions,
# variants, etc. So we just define our own since we also own the config
# setting that activates it.
config_setting(
name = "iree_is_msvc",
define_values = {
"iree_is_msvc": "true",
},
)