blob: 4ec56919bd9803ffdff7f77930f41760436f4690 [file] [log] [blame]
jcaterf5c8c0b2018-03-27 07:22:35 -07001# Copyright 2018 The Bazel Authors. All rights reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# This becomes the BUILD file for @local_config_cc// under FreeBSD.
16
17package(default_visibility = ["//visibility:public"])
18
19cc_library(
20 name = "malloc",
21)
22
23cc_library(
24 name = "stl",
25)
26
27filegroup(
28 name = "empty",
29 srcs = [],
30)
31
32# Hardcoded toolchain, legacy behaviour.
33cc_toolchain_suite(
34 name = "toolchain",
35 toolchains = {
36 "armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a",
37 "freebsd|compiler": ":cc-compiler-freebsd",
38 "ios_x86_64|compiler": ":cc-compiler-ios_x86_64",
39 },
40)
41
42cc_toolchain(
43 name = "cc-compiler-freebsd",
44 all_files = ":empty",
45 compiler_files = ":empty",
46 cpu = "local",
47 dwp_files = ":empty",
48 dynamic_runtime_libs = [":empty"],
49 linker_files = ":empty",
50 objcopy_files = ":empty",
51 static_runtime_libs = [":empty"],
52 strip_files = ":empty",
53 supports_param_files = 0,
54)
55
56toolchain(
57 name = "cc-toolchain-freebsd",
58 exec_compatible_with = [
59 "@bazel_tools//platforms:x86_64",
60 "@bazel_tools//platforms:freebsd",
61 ],
62 target_compatible_with = [
63 "@bazel_tools//platforms:x86_64",
64 "@bazel_tools//platforms:freebsd",
65 ],
66 toolchain = ":cc-compiler-freebsd",
67 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
68)
69
70cc_toolchain(
71 name = "cc-compiler-armeabi-v7a",
72 all_files = ":empty",
73 compiler_files = ":empty",
74 cpu = "local",
75 dwp_files = ":empty",
76 dynamic_runtime_libs = [":empty"],
77 linker_files = ":empty",
78 objcopy_files = ":empty",
79 static_runtime_libs = [":empty"],
80 strip_files = ":empty",
81 supports_param_files = 0,
82)
83
84toolchain(
85 name = "cc-toolchain-armeabi-v7a",
86 exec_compatible_with = [
87 "@bazel_tools//platforms:arm",
88 ],
89 target_compatible_with = [
90 "@bazel_tools//platforms:arm",
91 "@bazel_tools//platforms:android",
92 ],
93 toolchain = ":cc-compiler-armeabi-v7a",
94 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
95)
96
97cc_toolchain(
98 name = "cc-compiler-ios_x86_64",
99 all_files = ":empty",
100 compiler_files = ":empty",
101 cpu = "local",
102 dwp_files = ":empty",
103 dynamic_runtime_libs = [":empty"],
104 linker_files = ":empty",
105 objcopy_files = ":empty",
106 static_runtime_libs = [":empty"],
107 strip_files = ":empty",
108 supports_param_files = 0,
109)
110
111toolchain(
112 name = "cc-toolchain-ios_x86_64",
113 exec_compatible_with = [
114 "@bazel_tools//platforms:x86_64",
115 "@bazel_tools//platforms:osx",
116 ],
117 target_compatible_with = [
118 "@bazel_tools//platforms:x86_64",
119 "@bazel_tools//platforms:ios",
120 ],
121 toolchain = ":cc-compiler-ios_x86_64",
122 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
123)
124
125filegroup(
126 name = "link_dynamic_library",
127 srcs = ["link_dynamic_library.sh"],
128)