blob: 7c0a8432131a9023ae7e7bd30816ba09981df054 [file] [log] [blame]
# Copyright 2020 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.
load("//iree:build_defs.oss.bzl", "iree_cmake_extra_content")
package(
default_visibility = ["//visibility:public"],
features = ["layering_check"],
licenses = ["notice"], # Apache 2.0
)
# TODO(scotttodd): also return if IREE_TARGET_BACKEND_DYLIB-LLVM-AOT is false
iree_cmake_extra_content(
content = """
if(NOT ${IREE_TARGET_BACKEND_LLVM-IR})
return()
endif()
""",
)
cc_library(
name = "LLVMIRPasses",
srcs = [
"LLVMIRPasses.cpp",
],
hdrs = [
"LLVMIRPasses.h",
],
deps = [
":LLVMTargetOptions",
"@llvm-project//llvm:Core",
"@llvm-project//llvm:Passes",
"@llvm-project//llvm:Support",
"@llvm-project//llvm:Target",
"@llvm-project//mlir:Support",
],
)
cc_library(
name = "LLVMTargetOptions",
srcs = [
"LLVMTargetOptions.cpp",
],
hdrs = [
"LLVMTargetOptions.h",
],
deps = [
"@llvm-project//llvm:Passes",
"@llvm-project//llvm:Support",
"@llvm-project//llvm:Target",
],
)