blob: 3481f91f1c39d1753bca203f70825d835f75e9d7 [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({
18 "//iree:iree_is_msvc": [],
Copybara-Service73061802020-12-02 17:13:07 -080019 "//iree: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({
32 "//iree:iree_is_msvc": [],
33 "//iree:iree_is_android": [
34 "-ldl",
35 ],
36 "//conditions:default": [
37 "-ldl",
38 ],
39 }),
40)