@@ -38,7 +38,10 @@ filegroup(
3838
3939filegroup (
4040 name = "compiler_deps" ,
41- srcs = glob (["extra_tools/**" ], allow_empty = True ) + [":builtin_include_directory_paths" ],
41+ srcs = glob (
42+ ["extra_tools/**" ],
43+ allow_empty = True ,
44+ ) + [":builtin_include_directory_paths" ],
4245)
4346
4447# This is the entry point for --crosstool_top. Toolchains are found
@@ -56,40 +59,75 @@ cc_toolchain_suite(
5659
5760cc_toolchain (
5861 name = "cc-compiler-k8" ,
59- toolchain_identifier = "linux_gnu_x86" ,
60- toolchain_config = ":linux_gnu_x86" ,
6162 all_files = ":compiler_deps" ,
6263 ar_files = ":compiler_deps" ,
6364 as_files = ":compiler_deps" ,
6465 compiler_files = ":compiler_deps" ,
6566 dwp_files = ":empty" ,
6667 linker_files = ":compiler_deps" ,
68+ module_map = ":module.modulemap" ,
6769 objcopy_files = ":empty" ,
6870 strip_files = ":empty" ,
6971 supports_param_files = 1 ,
70- module_map = ":module.modulemap" ,
72+ toolchain_config = ":linux_gnu_x86" ,
73+ toolchain_identifier = "linux_gnu_x86" ,
7174)
7275
7376cc_toolchain_config (
7477 name = "linux_gnu_x86" ,
75- cpu = "k8" ,
78+ abi_libc_version = "glibc_2.19" ,
79+ abi_version = "clang" ,
80+ compile_flags = [
81+ "-U_FORTIFY_SOURCE" ,
82+ "-fstack-protector" ,
83+ "-Wall" ,
84+ "-Wthread-safety" ,
85+ "-Wself-assign" ,
86+ "-fcolor-diagnostics" ,
87+ "-fno-omit-frame-pointer" ,
88+ ],
7689 compiler = "clang" ,
77- toolchain_identifier = "linux_gnu_x86" ,
90+ coverage_compile_flags = ["--coverage" ],
91+ coverage_link_flags = ["--coverage" ],
92+ cpu = "k8" ,
93+ cxx_builtin_include_directories = [
94+ "/usr/local/include" ,
95+ "/usr/lib/llvm-10/lib/clang/10.0.0/include" ,
96+ "/usr/include/x86_64-linux-gnu" ,
97+ "/usr/include" ,
98+ "/usr/lib/llvm-10/lib/clang/10.0.0/share" ,
99+ "/usr/include/c++/9" ,
100+ "/usr/include/x86_64-linux-gnu/c++/9" ,
101+ "/usr/include/c++/9/backward" ,
102+ "/usr/lib/llvm-10/include/c++/v1" ,
103+ ],
104+ cxx_flags = ["-std=c++0x" ],
105+ dbg_compile_flags = ["-g" ],
78106 host_system_name = "i686-unknown-linux-gnu" ,
79- target_system_name = "x86_64-unknown-linux-gnu" ,
107+ link_flags = [
108+ "-fuse-ld=/usr/bin/ld.gold" ,
109+ "-Wl,-no-as-needed" ,
110+ "-Wl,-z,relro,-z,now" ,
111+ "-B/usr/lib/llvm-10/bin" ,
112+ ],
113+ link_libs = [
114+ "-lstdc++" ,
115+ "-lm" ,
116+ ],
117+ opt_compile_flags = [
118+ "-g0" ,
119+ "-O2" ,
120+ "-D_FORTIFY_SOURCE=1" ,
121+ "-DNDEBUG" ,
122+ "-ffunction-sections" ,
123+ "-fdata-sections" ,
124+ ],
125+ opt_link_flags = ["-Wl,--gc-sections" ],
126+ supports_start_end_lib = True ,
80127 target_libc = "glibc_2.19" ,
81- abi_version = "clang" ,
82- abi_libc_version = "glibc_2.19" ,
83- cxx_builtin_include_directories = ["/usr/local/include" ,
84- "/usr/lib/llvm-10/lib/clang/10.0.0/include" ,
85- "/usr/include/x86_64-linux-gnu" ,
86- "/usr/include" ,
87- "/usr/lib/llvm-10/lib/clang/10.0.0/share" ,
88- "/usr/include/c++/9" ,
89- "/usr/include/x86_64-linux-gnu/c++/9" ,
90- "/usr/include/c++/9/backward" ,
91- "/usr/lib/llvm-10/include/c++/v1" ],
92- tool_paths = {"ar" : "/usr/bin/ar" ,
128+ target_system_name = "x86_64-unknown-linux-gnu" ,
129+ tool_paths = {
130+ "ar" : "/usr/bin/ar" ,
93131 "ld" : "/usr/bin/ld" ,
94132 "llvm-cov" : "/usr/bin/llvm-cov" ,
95133 "cpp" : "/usr/bin/cpp" ,
@@ -99,44 +137,21 @@ cc_toolchain_config(
99137 "nm" : "/usr/bin/nm" ,
100138 "objcopy" : "/usr/bin/objcopy" ,
101139 "objdump" : "/usr/bin/objdump" ,
102- "strip" : "/usr/bin/strip" },
103- compile_flags = ["-U_FORTIFY_SOURCE" ,
104- "-fstack-protector" ,
105- "-Wall" ,
106- "-Wthread-safety" ,
107- "-Wself-assign" ,
108- "-fcolor-diagnostics" ,
109- "-fno-omit-frame-pointer" ],
110- opt_compile_flags = ["-g0" ,
111- "-O2" ,
112- "-D_FORTIFY_SOURCE=1" ,
113- "-DNDEBUG" ,
114- "-ffunction-sections" ,
115- "-fdata-sections" ],
116- dbg_compile_flags = ["-g" ],
117- cxx_flags = ["-std=c++0x" ],
118- link_flags = ["-fuse-ld=/usr/bin/ld.gold" ,
119- "-Wl,-no-as-needed" ,
120- "-Wl,-z,relro,-z,now" ,
121- "-B/usr/lib/llvm-10/bin" ],
122- link_libs = ["-lstdc++" ,
123- "-lm" ],
124- opt_link_flags = ["-Wl,--gc-sections" ],
125- unfiltered_compile_flags = ["-no-canonical-prefixes" ,
126- "-Wno-builtin-macro-redefined" ,
127- "-D__DATE__=\" redacted\" " ,
128- "-D__TIMESTAMP__=\" redacted\" " ,
129- "-D__TIME__=\" redacted\" " ],
130- coverage_compile_flags = ["--coverage" ],
131- coverage_link_flags = ["--coverage" ],
132- supports_start_end_lib = True ,
140+ "strip" : "/usr/bin/strip" ,
141+ },
142+ toolchain_identifier = "linux_gnu_x86" ,
143+ unfiltered_compile_flags = [
144+ "-no-canonical-prefixes" ,
145+ "-Wno-builtin-macro-redefined" ,
146+ "-D__DATE__=\" redacted\" " ,
147+ "-D__TIMESTAMP__=\" redacted\" " ,
148+ "-D__TIME__=\" redacted\" " ,
149+ ],
133150)
134151
135152# Android tooling requires a default toolchain for the armeabi-v7a cpu.
136153cc_toolchain (
137154 name = "cc-compiler-armeabi-v7a" ,
138- toolchain_identifier = "stub_armeabi-v7a" ,
139- toolchain_config = ":stub_armeabi-v7a" ,
140155 all_files = ":empty" ,
141156 ar_files = ":empty" ,
142157 as_files = ":empty" ,
@@ -146,6 +161,8 @@ cc_toolchain(
146161 objcopy_files = ":empty" ,
147162 strip_files = ":empty" ,
148163 supports_param_files = 1 ,
164+ toolchain_config = ":stub_armeabi-v7a" ,
165+ toolchain_identifier = "stub_armeabi-v7a" ,
149166)
150167
151168armeabi_cc_toolchain_config (name = "stub_armeabi-v7a" )
0 commit comments