blob: 535ab0a689348ffd9817471d8670b8bdbc87bf55 [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 = [
Brian Silverman660d6092015-11-26 18:41:59 -050039 ':cc-compiler-k8',
40 ':cc-compiler-roborio',
41 '@arm-frc-linux-gnueabi-repo//:compiler_components',
42 ':roborio-compiler-files',
43 ],
Brian Silverman12b3fc52015-10-11 19:38:33 -040044)
45
46cc_toolchain(
Brian Silverman660d6092015-11-26 18:41:59 -050047 name = 'cc-compiler-k8',
48 all_files = ':empty',
49 compiler_files = ':empty',
50 cpu = 'local',
51 dwp_files = ':empty',
52 dynamic_runtime_libs = [':empty'],
53 linker_files = ':empty',
54 objcopy_files = ':empty',
55 static_runtime_libs = [':empty'],
56 strip_files = ':empty',
57 supports_param_files = 1,
Brian Silverman12b3fc52015-10-11 19:38:33 -040058)
Austin Schuh23da18b2015-10-11 20:52:49 -070059
Austin Schuh55139fe2015-10-14 23:55:24 -070060filegroup(
61 name = 'roborio-compiler-files',
62 srcs = [
63 '//tools/cpp/arm-frc-linux-gnueabi:tool-wrappers',
Brian Silvermanb2215d02015-11-23 19:10:15 -050064 '//tools/cpp/arm-frc-linux-gnueabi:as',
Austin Schuh55139fe2015-10-14 23:55:24 -070065 '@arm-frc-linux-gnueabi-repo//:compiler_pieces',
66 ],
67)
68
69filegroup(
70 name = 'roborio_linker_files',
71 srcs = [
72 '//tools/cpp/arm-frc-linux-gnueabi:ld',
73 '//tools/cpp/arm-frc-linux-gnueabi:ar',
Brian Silvermanb2215d02015-11-23 19:10:15 -050074 '//tools/cpp/arm-frc-linux-gnueabi:gcc',
75 '@arm-frc-linux-gnueabi-repo//:compiler_pieces',
Austin Schuh55139fe2015-10-14 23:55:24 -070076 ],
77)
78filegroup(
79 name = 'roborio_compiler_files',
80 srcs = [
81 '//tools/cpp/arm-frc-linux-gnueabi:gcc',
82 '//tools/cpp/arm-frc-linux-gnueabi:ld',
83 ],
84)
85
Austin Schuh23da18b2015-10-11 20:52:49 -070086cc_toolchain(
Brian Silverman660d6092015-11-26 18:41:59 -050087 name = 'cc-compiler-roborio',
88 all_files = ':roborio-compiler-files',
89 compiler_files = ':roborio_compiler_files',
90 cpu = 'roborio',
91 dwp_files = ':empty',
92 dynamic_runtime_libs = [':empty'],
93 linker_files = ':roborio_linker_files',
94 objcopy_files = '//tools/cpp/arm-frc-linux-gnueabi:objcopy',
95 static_runtime_libs = [':empty'],
96 strip_files = '//tools/cpp/arm-frc-linux-gnueabi:strip',
97 supports_param_files = 1,
Austin Schuh23da18b2015-10-11 20:52:49 -070098)