blob: f6203eb15aa1c5f291e5e877bd7eb4063339205d [file] [log] [blame]
Brian Silverman660d6092015-11-26 18:41:59 -05001package(default_visibility = ['//visibility:public'])
Brian Silverman12b3fc52015-10-11 19:38:33 -04002
3cc_library(
Brian Silverman63889f92015-11-27 01:33:56 -05004 name = 'empty_main',
5 srcs = [ 'empty_main.c' ],
6)
7
8cc_library(
Brian Silverman660d6092015-11-26 18:41:59 -05009 name = 'malloc',
Brian Silverman63889f92015-11-27 01:33:56 -050010 deps = select({
11 '//tools:has_asan': [],
12 '//tools:has_tsan': [],
13 '//conditions:default': ['//third_party/gperftools:tcmalloc'],
14 }),
Brian Silverman12b3fc52015-10-11 19:38:33 -040015)
16
17cc_library(
Brian Silverman660d6092015-11-26 18:41:59 -050018 name = 'stl',
Brian Silverman12b3fc52015-10-11 19:38:33 -040019)
20
21filegroup(
Brian Silverman660d6092015-11-26 18:41:59 -050022 name = 'empty',
23 srcs = [],
Brian Silverman12b3fc52015-10-11 19:38:33 -040024)
25
26# This is the entry point for --crosstool_top. Toolchains are found
27# by lopping off the name of --crosstool_top and searching for
Brian Silverman660d6092015-11-26 18:41:59 -050028# 'cc-compiler-${CPU}' in this BUILD file, where CPU is the target CPU
Brian Silverman12b3fc52015-10-11 19:38:33 -040029# specified in --cpu.
30#
31# This file group should include
32# * all cc_toolchain targets supported
33# * all file groups that said cc_toolchain might refer to,
34# including the default_grte_top setting in the CROSSTOOL
35# protobuf.
36filegroup(
Brian Silverman660d6092015-11-26 18:41:59 -050037 name = 'toolchain',
38 srcs = [
39 ':cc-compiler-armeabi-v7a',
40 ':cc-compiler-local',
41 ':cc-compiler-k8',
42 ':cc-compiler-roborio',
43 '@arm-frc-linux-gnueabi-repo//:compiler_components',
44 ':roborio-compiler-files',
45 ],
Brian Silverman12b3fc52015-10-11 19:38:33 -040046)
47
48cc_toolchain(
Brian Silverman660d6092015-11-26 18:41:59 -050049 name = 'cc-compiler-local',
50 all_files = ':empty',
51 compiler_files = ':empty',
52 cpu = 'local',
53 dwp_files = ':empty',
54 dynamic_runtime_libs = [':empty'],
55 linker_files = ':empty',
56 objcopy_files = ':empty',
57 static_runtime_libs = [':empty'],
58 strip_files = ':empty',
59 supports_param_files = 1,
Brian Silverman12b3fc52015-10-11 19:38:33 -040060)
61
62cc_toolchain(
Brian Silverman660d6092015-11-26 18:41:59 -050063 name = 'cc-compiler-armeabi-v7a',
64 all_files = ':empty',
65 compiler_files = ':empty',
66 cpu = 'local',
67 dwp_files = ':empty',
68 dynamic_runtime_libs = [':empty'],
69 linker_files = ':empty',
70 objcopy_files = ':empty',
71 static_runtime_libs = [':empty'],
72 strip_files = ':empty',
73 supports_param_files = 1,
Brian Silverman12b3fc52015-10-11 19:38:33 -040074)
75
76cc_toolchain(
Brian Silverman660d6092015-11-26 18:41:59 -050077 name = 'cc-compiler-k8',
78 all_files = ':empty',
79 compiler_files = ':empty',
80 cpu = 'local',
81 dwp_files = ':empty',
82 dynamic_runtime_libs = [':empty'],
83 linker_files = ':empty',
84 objcopy_files = ':empty',
85 static_runtime_libs = [':empty'],
86 strip_files = ':empty',
87 supports_param_files = 1,
Brian Silverman12b3fc52015-10-11 19:38:33 -040088)
Austin Schuh23da18b2015-10-11 20:52:49 -070089
Austin Schuh55139fe2015-10-14 23:55:24 -070090filegroup(
91 name = 'roborio-compiler-files',
92 srcs = [
93 '//tools/cpp/arm-frc-linux-gnueabi:tool-wrappers',
Brian Silvermanb2215d02015-11-23 19:10:15 -050094 '//tools/cpp/arm-frc-linux-gnueabi:as',
Austin Schuh55139fe2015-10-14 23:55:24 -070095 '@arm-frc-linux-gnueabi-repo//:compiler_pieces',
96 ],
97)
98
99filegroup(
100 name = 'roborio_linker_files',
101 srcs = [
102 '//tools/cpp/arm-frc-linux-gnueabi:ld',
103 '//tools/cpp/arm-frc-linux-gnueabi:ar',
Brian Silvermanb2215d02015-11-23 19:10:15 -0500104 '//tools/cpp/arm-frc-linux-gnueabi:gcc',
105 '@arm-frc-linux-gnueabi-repo//:compiler_pieces',
Austin Schuh55139fe2015-10-14 23:55:24 -0700106 ],
107)
108filegroup(
109 name = 'roborio_compiler_files',
110 srcs = [
111 '//tools/cpp/arm-frc-linux-gnueabi:gcc',
112 '//tools/cpp/arm-frc-linux-gnueabi:ld',
113 ],
114)
115
Austin Schuh23da18b2015-10-11 20:52:49 -0700116cc_toolchain(
Brian Silverman660d6092015-11-26 18:41:59 -0500117 name = 'cc-compiler-roborio',
118 all_files = ':roborio-compiler-files',
119 compiler_files = ':roborio_compiler_files',
120 cpu = 'roborio',
121 dwp_files = ':empty',
122 dynamic_runtime_libs = [':empty'],
123 linker_files = ':roborio_linker_files',
124 objcopy_files = '//tools/cpp/arm-frc-linux-gnueabi:objcopy',
125 static_runtime_libs = [':empty'],
126 strip_files = '//tools/cpp/arm-frc-linux-gnueabi:strip',
127 supports_param_files = 1,
Austin Schuh23da18b2015-10-11 20:52:49 -0700128)