@@ -38,7 +38,10 @@ filegroup(
38
38
39
39
filegroup (
40
40
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" ],
42
45
)
43
46
44
47
# This is the entry point for --crosstool_top. Toolchains are found
@@ -56,8 +59,6 @@ cc_toolchain_suite(
56
59
57
60
cc_toolchain (
58
61
name = "cc-compiler-k8" ,
59
- toolchain_identifier = "local" ,
60
- toolchain_config = ":local" ,
61
62
all_files = ":compiler_deps" ,
62
63
ar_files = ":compiler_deps" ,
63
64
as_files = ":compiler_deps" ,
@@ -67,26 +68,65 @@ cc_toolchain(
67
68
objcopy_files = ":empty" ,
68
69
strip_files = ":empty" ,
69
70
supports_param_files = 1 ,
71
+ toolchain_config = ":local" ,
72
+ toolchain_identifier = "local" ,
70
73
)
71
74
72
75
cc_toolchain_config (
73
76
name = "local" ,
74
- cpu = "k8" ,
77
+ abi_libc_version = "local" ,
78
+ abi_version = "local" ,
79
+ compile_flags = [
80
+ "-U_FORTIFY_SOURCE" ,
81
+ "-fstack-protector" ,
82
+ "-Wall" ,
83
+ "-Wthread-safety" ,
84
+ "-Wself-assign" ,
85
+ "-fcolor-diagnostics" ,
86
+ "-fno-omit-frame-pointer" ,
87
+ ],
75
88
compiler = "clang" ,
76
- toolchain_identifier = "local" ,
89
+ coverage_compile_flags = [
90
+ "-fprofile-instr-generate" ,
91
+ "-fcoverage-mapping" ,
92
+ ],
93
+ coverage_link_flags = ["-fprofile-instr-generate" ],
94
+ cpu = "k8" ,
95
+ cxx_builtin_include_directories = [
96
+ "/usr/local/include" ,
97
+ "/usr/lib/clang/10.0.0/include" ,
98
+ "/usr/include/x86_64-linux-gnu" ,
99
+ "/usr/include" ,
100
+ "/usr/include/c++/8" ,
101
+ "/usr/include/x86_64-linux-gnu/c++/8" ,
102
+ "/usr/include/c++/8/backward" ,
103
+ ],
104
+ cxx_flags = ["-std=c++0x" ],
105
+ dbg_compile_flags = ["-g" ],
77
106
host_system_name = "local" ,
78
- target_system_name = "local" ,
107
+ link_flags = [
108
+ "-fuse-ld=/usr/bin/ld.gold" ,
109
+ "-Wl,-no-as-needed" ,
110
+ "-Wl,-z,relro,-z,now" ,
111
+ "-B/usr/bin" ,
112
+ "-lm" ,
113
+ "-static-libgcc" ,
114
+ ],
115
+ link_libs = ["-l:libstdc++.a" ],
116
+ opt_compile_flags = [
117
+ "-g0" ,
118
+ "-O2" ,
119
+ "-D_FORTIFY_SOURCE=1" ,
120
+ "-DNDEBUG" ,
121
+ "-ffunction-sections" ,
122
+ "-fdata-sections" ,
123
+ ],
124
+ opt_link_flags = ["-Wl,--gc-sections" ],
125
+ supports_start_end_lib = True ,
79
126
target_libc = "local" ,
80
- abi_version = "local" ,
81
- abi_libc_version = "local" ,
82
- cxx_builtin_include_directories = ["/usr/local/include" ,
83
- "/usr/lib/clang/10.0.0/include" ,
84
- "/usr/include/x86_64-linux-gnu" ,
85
- "/usr/include" ,
86
- "/usr/include/c++/8" ,
87
- "/usr/include/x86_64-linux-gnu/c++/8" ,
88
- "/usr/include/c++/8/backward" ],
89
- tool_paths = {"ar" : "/usr/bin/ar" ,
127
+ target_system_name = "local" ,
128
+ tool_paths = {
129
+ "ar" : "/usr/bin/ar" ,
90
130
"ld" : "/usr/bin/ld" ,
91
131
"cpp" : "/usr/bin/cpp" ,
92
132
"gcc" : "/usr/bin/clang" ,
@@ -95,45 +135,21 @@ cc_toolchain_config(
95
135
"nm" : "/usr/bin/nm" ,
96
136
"objcopy" : "/usr/bin/objcopy" ,
97
137
"objdump" : "/usr/bin/objdump" ,
98
- "strip" : "/usr/bin/strip" },
99
- compile_flags = ["-U_FORTIFY_SOURCE" ,
100
- "-fstack-protector" ,
101
- "-Wall" ,
102
- "-Wthread-safety" ,
103
- "-Wself-assign" ,
104
- "-fcolor-diagnostics" ,
105
- "-fno-omit-frame-pointer" ],
106
- opt_compile_flags = ["-g0" ,
107
- "-O2" ,
108
- "-D_FORTIFY_SOURCE=1" ,
109
- "-DNDEBUG" ,
110
- "-ffunction-sections" ,
111
- "-fdata-sections" ],
112
- dbg_compile_flags = ["-g" ],
113
- cxx_flags = ["-std=c++0x" ],
114
- link_flags = ["-fuse-ld=/usr/bin/ld.gold" ,
115
- "-Wl,-no-as-needed" ,
116
- "-Wl,-z,relro,-z,now" ,
117
- "-B/usr/bin" ,
118
- "-lm" ,
119
- "-static-libgcc" ],
120
- link_libs = ["-l:libstdc++.a" ],
121
- opt_link_flags = ["-Wl,--gc-sections" ],
122
- unfiltered_compile_flags = ["-no-canonical-prefixes" ,
123
- "-Wno-builtin-macro-redefined" ,
124
- "-D__DATE__=\" redacted\" " ,
125
- "-D__TIMESTAMP__=\" redacted\" " ,
126
- "-D__TIME__=\" redacted\" " ],
127
- coverage_compile_flags = ["-fprofile-instr-generate" , "-fcoverage-mapping" ],
128
- coverage_link_flags = ["-fprofile-instr-generate" ],
129
- supports_start_end_lib = True ,
138
+ "strip" : "/usr/bin/strip" ,
139
+ },
140
+ toolchain_identifier = "local" ,
141
+ unfiltered_compile_flags = [
142
+ "-no-canonical-prefixes" ,
143
+ "-Wno-builtin-macro-redefined" ,
144
+ "-D__DATE__=\" redacted\" " ,
145
+ "-D__TIMESTAMP__=\" redacted\" " ,
146
+ "-D__TIME__=\" redacted\" " ,
147
+ ],
130
148
)
131
149
132
150
# Android tooling requires a default toolchain for the armeabi-v7a cpu.
133
151
cc_toolchain (
134
152
name = "cc-compiler-armeabi-v7a" ,
135
- toolchain_identifier = "stub_armeabi-v7a" ,
136
- toolchain_config = ":stub_armeabi-v7a" ,
137
153
all_files = ":empty" ,
138
154
ar_files = ":empty" ,
139
155
as_files = ":empty" ,
@@ -143,6 +159,8 @@ cc_toolchain(
143
159
objcopy_files = ":empty" ,
144
160
strip_files = ":empty" ,
145
161
supports_param_files = 1 ,
162
+ toolchain_config = ":stub_armeabi-v7a" ,
163
+ toolchain_identifier = "stub_armeabi-v7a" ,
146
164
)
147
165
148
166
armeabi_cc_toolchain_config (name = "stub_armeabi-v7a" )
0 commit comments