Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 1 | package(default_visibility = ['//visibility:public']) |
Brian Silverman | 12b3fc5 | 2015-10-11 19:38:33 -0400 | [diff] [blame] | 2 | |
| 3 | cc_library( |
Brian Silverman | 63889f9 | 2015-11-27 01:33:56 -0500 | [diff] [blame] | 4 | name = 'empty_main', |
| 5 | srcs = [ 'empty_main.c' ], |
| 6 | ) |
| 7 | |
| 8 | cc_library( |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 9 | name = 'malloc', |
Brian Silverman | 63889f9 | 2015-11-27 01:33:56 -0500 | [diff] [blame] | 10 | deps = select({ |
| 11 | '//tools:has_asan': [], |
| 12 | '//tools:has_tsan': [], |
| 13 | '//conditions:default': ['//third_party/gperftools:tcmalloc'], |
| 14 | }), |
Brian Silverman | 12b3fc5 | 2015-10-11 19:38:33 -0400 | [diff] [blame] | 15 | ) |
| 16 | |
| 17 | cc_library( |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 18 | name = 'stl', |
Brian Silverman | 12b3fc5 | 2015-10-11 19:38:33 -0400 | [diff] [blame] | 19 | ) |
| 20 | |
| 21 | filegroup( |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 22 | name = 'empty', |
| 23 | srcs = [], |
Brian Silverman | 12b3fc5 | 2015-10-11 19:38:33 -0400 | [diff] [blame] | 24 | ) |
| 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 Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 28 | # 'cc-compiler-${CPU}' in this BUILD file, where CPU is the target CPU |
Brian Silverman | 12b3fc5 | 2015-10-11 19:38:33 -0400 | [diff] [blame] | 29 | # 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. |
| 36 | filegroup( |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 37 | name = 'toolchain', |
| 38 | srcs = [ |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 39 | ':cc-compiler-k8', |
| 40 | ':cc-compiler-roborio', |
Brian Silverman | 826e1cd | 2016-01-31 18:26:00 -0500 | [diff] [blame] | 41 | '@arm_frc_linux_gnueabi_repo//:compiler_components', |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 42 | ':roborio-compiler-files', |
Brian Silverman | b466eef | 2015-11-28 20:33:44 -0500 | [diff] [blame] | 43 | ':flags_compiler_inputs', |
Austin Schuh | 6166083 | 2016-03-04 21:56:39 -0800 | [diff] [blame^] | 44 | '@linaro_linux_gcc_4_9_repo//:compiler_components', |
Brian Silverman | 0d57fc8 | 2016-01-24 21:02:53 -0500 | [diff] [blame] | 45 | ':linaro-gcc-files', |
Brian Silverman | b466eef | 2015-11-28 20:33:44 -0500 | [diff] [blame] | 46 | ], |
| 47 | ) |
| 48 | |
| 49 | # Compiler inputs given by --copt etc in //tools:bazel.rc. |
| 50 | filegroup( |
| 51 | name = 'flags_compiler_inputs', |
Brian Silverman | 0d57fc8 | 2016-01-24 21:02:53 -0500 | [diff] [blame] | 52 | srcs = select({ |
| 53 | '//tools:has_asan': [ |
| 54 | 'asan-blacklist', |
| 55 | ], |
| 56 | '//tools:has_ubsan': [ |
| 57 | 'ubsan-blacklist', |
| 58 | ], |
| 59 | '//conditions:default': [], |
| 60 | }), |
Brian Silverman | 12b3fc5 | 2015-10-11 19:38:33 -0400 | [diff] [blame] | 61 | ) |
| 62 | |
| 63 | cc_toolchain( |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 64 | name = 'cc-compiler-k8', |
Brian Silverman | b466eef | 2015-11-28 20:33:44 -0500 | [diff] [blame] | 65 | all_files = ':flags_compiler_inputs', |
| 66 | compiler_files = ':flags_compiler_inputs', |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 67 | cpu = 'local', |
| 68 | dwp_files = ':empty', |
| 69 | dynamic_runtime_libs = [':empty'], |
| 70 | linker_files = ':empty', |
| 71 | objcopy_files = ':empty', |
| 72 | static_runtime_libs = [':empty'], |
| 73 | strip_files = ':empty', |
| 74 | supports_param_files = 1, |
Brian Silverman | 12b3fc5 | 2015-10-11 19:38:33 -0400 | [diff] [blame] | 75 | ) |
Austin Schuh | 23da18b | 2015-10-11 20:52:49 -0700 | [diff] [blame] | 76 | |
Austin Schuh | 55139fe | 2015-10-14 23:55:24 -0700 | [diff] [blame] | 77 | filegroup( |
| 78 | name = 'roborio-compiler-files', |
| 79 | srcs = [ |
| 80 | '//tools/cpp/arm-frc-linux-gnueabi:tool-wrappers', |
Brian Silverman | b2215d0 | 2015-11-23 19:10:15 -0500 | [diff] [blame] | 81 | '//tools/cpp/arm-frc-linux-gnueabi:as', |
Brian Silverman | 826e1cd | 2016-01-31 18:26:00 -0500 | [diff] [blame] | 82 | '@arm_frc_linux_gnueabi_repo//:compiler_pieces', |
Brian Silverman | b466eef | 2015-11-28 20:33:44 -0500 | [diff] [blame] | 83 | ':flags_compiler_inputs', |
Austin Schuh | 55139fe | 2015-10-14 23:55:24 -0700 | [diff] [blame] | 84 | ], |
| 85 | ) |
| 86 | |
| 87 | filegroup( |
| 88 | name = 'roborio_linker_files', |
| 89 | srcs = [ |
| 90 | '//tools/cpp/arm-frc-linux-gnueabi:ld', |
| 91 | '//tools/cpp/arm-frc-linux-gnueabi:ar', |
Brian Silverman | b2215d0 | 2015-11-23 19:10:15 -0500 | [diff] [blame] | 92 | '//tools/cpp/arm-frc-linux-gnueabi:gcc', |
Brian Silverman | 826e1cd | 2016-01-31 18:26:00 -0500 | [diff] [blame] | 93 | '@arm_frc_linux_gnueabi_repo//:compiler_pieces', |
Austin Schuh | 55139fe | 2015-10-14 23:55:24 -0700 | [diff] [blame] | 94 | ], |
| 95 | ) |
| 96 | filegroup( |
| 97 | name = 'roborio_compiler_files', |
| 98 | srcs = [ |
| 99 | '//tools/cpp/arm-frc-linux-gnueabi:gcc', |
| 100 | '//tools/cpp/arm-frc-linux-gnueabi:ld', |
| 101 | ], |
| 102 | ) |
| 103 | |
Austin Schuh | 23da18b | 2015-10-11 20:52:49 -0700 | [diff] [blame] | 104 | cc_toolchain( |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 105 | name = 'cc-compiler-roborio', |
| 106 | all_files = ':roborio-compiler-files', |
| 107 | compiler_files = ':roborio_compiler_files', |
| 108 | cpu = 'roborio', |
| 109 | dwp_files = ':empty', |
| 110 | dynamic_runtime_libs = [':empty'], |
| 111 | linker_files = ':roborio_linker_files', |
| 112 | objcopy_files = '//tools/cpp/arm-frc-linux-gnueabi:objcopy', |
| 113 | static_runtime_libs = [':empty'], |
| 114 | strip_files = '//tools/cpp/arm-frc-linux-gnueabi:strip', |
| 115 | supports_param_files = 1, |
Austin Schuh | 23da18b | 2015-10-11 20:52:49 -0700 | [diff] [blame] | 116 | ) |
Brian Silverman | 0d57fc8 | 2016-01-24 21:02:53 -0500 | [diff] [blame] | 117 | |
| 118 | filegroup( |
| 119 | name = 'linaro-gcc-files', |
| 120 | srcs = [ |
| 121 | '//tools/cpp/linaro_linux_gcc:clang-symlinks', |
| 122 | '//tools/cpp/linaro_linux_gcc:tool-wrappers', |
Austin Schuh | 6166083 | 2016-03-04 21:56:39 -0800 | [diff] [blame^] | 123 | '@linaro_linux_gcc_4_9_repo//:compiler_pieces', |
Brian Silverman | 0d57fc8 | 2016-01-24 21:02:53 -0500 | [diff] [blame] | 124 | ], |
| 125 | ) |
| 126 | |
| 127 | filegroup( |
| 128 | name = 'linaro_linux_linker_files', |
| 129 | srcs = [ |
| 130 | '//tools/cpp/linaro_linux_gcc:gcc', |
| 131 | '//tools/cpp/linaro_linux_gcc:ld', |
| 132 | '//tools/cpp/linaro_linux_gcc:ar', |
| 133 | '//tools/cpp/linaro_linux_gcc:clang-ld', |
| 134 | '//tools/cpp/linaro_linux_gcc:clang', |
Austin Schuh | 6166083 | 2016-03-04 21:56:39 -0800 | [diff] [blame^] | 135 | '@linaro_linux_gcc_4_9_repo//:compiler_pieces', |
Brian Silverman | 0d57fc8 | 2016-01-24 21:02:53 -0500 | [diff] [blame] | 136 | ], |
| 137 | ) |
| 138 | |
| 139 | filegroup( |
| 140 | name = 'linaro_linux_compiler_files', |
| 141 | srcs = [ |
| 142 | '//tools/cpp/linaro_linux_gcc:gcc', |
| 143 | '//tools/cpp/linaro_linux_gcc:ld', |
| 144 | '//tools/cpp/linaro_linux_gcc:clang', |
| 145 | '//tools/cpp/linaro_linux_gcc:as', |
| 146 | ], |
| 147 | ) |
| 148 | |
| 149 | cc_toolchain( |
| 150 | name = 'cc-compiler-armhf-debian', |
| 151 | all_files = ':linaro-gcc-files', |
| 152 | compiler_files = ':linaro_linux_compiler_files', |
| 153 | cpu = 'armhf', |
| 154 | dwp_files = ':empty', |
| 155 | dynamic_runtime_libs = [':empty'], |
| 156 | linker_files = ':linaro_linux_linker_files', |
| 157 | objcopy_files = '//tools/cpp/linaro_linux_gcc:objcopy', |
| 158 | static_runtime_libs = [':empty'], |
| 159 | strip_files = '//tools/cpp/linaro_linux_gcc:strip', |
| 160 | supports_param_files = 1, |
| 161 | ) |