blob: 5dd2a8e11bd5fb4ae6c5c1e0e5c1c8350995f06b [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
rosica71bc38f2019-02-04 02:39:30 -080019load("@bazel_tools//tools/cpp:cc_toolchain_config.bzl", "cc_toolchain_config")
20
jcaterf5c8c0b2018-03-27 07:22:35 -070021cc_library(
22 name = "malloc",
23)
24
jcaterf5c8c0b2018-03-27 07:22:35 -070025filegroup(
26 name = "empty",
27 srcs = [],
28)
29
30# Hardcoded toolchain, legacy behaviour.
31cc_toolchain_suite(
32 name = "toolchain",
33 toolchains = {
34 "armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a",
35 "freebsd|compiler": ":cc-compiler-freebsd",
rosica547bf422018-09-06 02:10:02 -070036 "armeabi-v7a": ":cc-compiler-armeabi-v7a",
37 "freebsd": ":cc-compiler-freebsd",
jcaterf5c8c0b2018-03-27 07:22:35 -070038 },
39)
40
41cc_toolchain(
42 name = "cc-compiler-freebsd",
hlopkoc3fb1db2018-10-09 20:40:58 -070043 toolchain_identifier = "local_freebsd",
rosica71bc38f2019-02-04 02:39:30 -080044 toolchain_config = ":local_freebsd",
jcaterf5c8c0b2018-03-27 07:22:35 -070045 all_files = ":empty",
Googler28953cb2018-12-05 10:46:00 -080046 ar_files = ":empty",
47 as_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -070048 compiler_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -070049 dwp_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -070050 linker_files = ":empty",
51 objcopy_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -070052 strip_files = ":empty",
53 supports_param_files = 0,
54)
55
rosica71bc38f2019-02-04 02:39:30 -080056cc_toolchain_config(
57 name = "local_freebsd",
58 cpu = "freebsd",
59 compiler = "compiler",
60)
61
jcaterf5c8c0b2018-03-27 07:22:35 -070062toolchain(
63 name = "cc-toolchain-freebsd",
64 exec_compatible_with = [
65 "@bazel_tools//platforms:x86_64",
66 "@bazel_tools//platforms:freebsd",
67 ],
68 target_compatible_with = [
69 "@bazel_tools//platforms:x86_64",
70 "@bazel_tools//platforms:freebsd",
71 ],
72 toolchain = ":cc-compiler-freebsd",
73 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
74)
75
76cc_toolchain(
77 name = "cc-compiler-armeabi-v7a",
hlopkoc3fb1db2018-10-09 20:40:58 -070078 toolchain_identifier = "stub_armeabi-v7a",
rosica71bc38f2019-02-04 02:39:30 -080079 toolchain_config = ":stub_armeabi-v7a",
jcaterf5c8c0b2018-03-27 07:22:35 -070080 all_files = ":empty",
Googler28953cb2018-12-05 10:46:00 -080081 ar_files = ":empty",
82 as_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -070083 compiler_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -070084 dwp_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -070085 linker_files = ":empty",
86 objcopy_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -070087 strip_files = ":empty",
88 supports_param_files = 0,
89)
90
rosica71bc38f2019-02-04 02:39:30 -080091cc_toolchain_config(
92 name = "stub_armeabi-v7a",
93 cpu = "armeabi-v7a",
94 compiler = "compiler",
95)
96
jcaterf5c8c0b2018-03-27 07:22:35 -070097toolchain(
98 name = "cc-toolchain-armeabi-v7a",
99 exec_compatible_with = [
100 "@bazel_tools//platforms:arm",
101 ],
102 target_compatible_with = [
103 "@bazel_tools//platforms:arm",
104 "@bazel_tools//platforms:android",
105 ],
106 toolchain = ":cc-compiler-armeabi-v7a",
107 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
108)
109
jcaterf5c8c0b2018-03-27 07:22:35 -0700110filegroup(
111 name = "link_dynamic_library",
112 srcs = ["link_dynamic_library.sh"],
113)