blob: 6a09e7f19ab13178ee68250bf5aac5841ed95e66 [file] [log] [blame]
Geoffrey Martin-Noble552d3f82021-05-25 17:56:09 -07001# Copyright 2020 The IREE Authors
Scott Todd69655bc2020-11-30 16:28:52 -08002#
Geoffrey Martin-Noble552d3f82021-05-25 17:56:09 -07003# Licensed under the Apache License v2.0 with LLVM Exceptions.
4# See https://llvm.org/LICENSE.txt for license information.
5# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Scott Todd69655bc2020-11-30 16:28:52 -08006
7package(
8 default_visibility = ["//visibility:public"],
9 features = ["layering_check"],
10 licenses = ["notice"], # Apache 2.0
11)
12
13# Helper for getting linkopts into libraries in a way we can easily spot and
14# rewrite from bazel-to-cmake and copybara.
15cc_library(
16 name = "default_linkopts",
17 linkopts = select({
Scott Todde32cc762022-05-23 12:07:34 -070018 "//build_tools/bazel:iree_is_msvc": [],
19 "//build_tools/bazel:iree_is_android": [
Copybara-Service73061802020-12-02 17:13:07 -080020 # Android provides its own pthreads support with no linking required.
21 ],
Scott Todd69655bc2020-11-30 16:28:52 -080022 "//conditions:default": [
23 # Just include libraries that should be presumed in 2020.
Scott Todd69655bc2020-11-30 16:28:52 -080024 "-lpthread",
25 ],
26 }),
27)
Marius Kintel79cf1542021-06-22 13:46:21 -040028
29cc_library(
30 name = "dl",
31 linkopts = select({
Scott Todde32cc762022-05-23 12:07:34 -070032 "//build_tools/bazel:iree_is_msvc": [],
33 "//build_tools/bazel:iree_is_android": [
Marius Kintel79cf1542021-06-22 13:46:21 -040034 "-ldl",
35 ],
36 "//conditions:default": [
37 "-ldl",
38 ],
39 }),
40)