@@ -33,12 +33,12 @@ toolchain {
33
33
compiler: " clang"
34
34
host_system_name: " local"
35
35
needsPic: true
36
- supports_gold_linker: false
37
36
supports_incremental_linker: false
38
37
supports_fission: false
39
38
supports_interface_shared_objects: false
40
39
supports_normalizing_ar: false
41
40
supports_start_end_lib: true
41
+ supports_gold_linker: true
42
42
target_libc: " local"
43
43
target_cpu: " k8"
44
44
target_system_name: " local"
@@ -54,6 +54,7 @@ toolchain {
54
54
unfiltered_cxx_flag: " -D__DATE__=\" redacted\" "
55
55
unfiltered_cxx_flag: " -D__TIMESTAMP__=\" redacted\" "
56
56
unfiltered_cxx_flag: " -D__TIME__=\" redacted\" "
57
+ unfiltered_cxx_flag: " -fdebug-prefix-map=%{toolchain_path_prefix}=%{debug_toolchain_path_prefix}"
57
58
58
59
# Security
59
60
compiler_flag: " -U_FORTIFY_SOURCE"
@@ -65,20 +66,20 @@ toolchain {
65
66
compiler_flag: " -Wall"
66
67
67
68
# C++
68
- cxx_flag: " -std=c++11 "
69
+ cxx_flag: " -std=c++17 "
69
70
cxx_flag: " -stdlib=libc++"
70
71
# The linker has no way of knowing if there are C++ objects; so we always link C++ libraries.
71
- linker_flag: " %{toolchain_path_prefix}lib/ libc++.a"
72
- linker_flag: " %{toolchain_path_prefix}lib/ libc++abi.a"
73
- linker_flag: " %{toolchain_path_prefix}lib/ libunwind.a"
72
+ linker_flag: " -l: libc++.a"
73
+ linker_flag: " -l: libc++abi.a"
74
+ linker_flag: " -l: libunwind.a"
74
75
cxx_flag: " -DLIBCXX_USE_COMPILER_RT=YES"
75
76
linker_flag: " -rtlib=compiler-rt"
76
- linker_flag: " -lpthread"
77
- linker_flag: " -ldl" # For libunwind
77
+ linker_flag: " -lpthread" # For libunwind
78
+ linker_flag: " -ldl" # For libunwind
78
79
79
80
# Linker
80
81
linker_flag: " -lm"
81
- linker_flag: " -fuse-ld=lld "
82
+ linker_flag: " -fuse-ld=gold "
82
83
linker_flag: " -Wl,--build-id=md5"
83
84
linker_flag: " -Wl,--hash-style=gnu"
84
85
@@ -89,14 +90,11 @@ toolchain {
89
90
cxx_builtin_include_directory: " /include"
90
91
cxx_builtin_include_directory: " /usr/include"
91
92
cxx_builtin_include_directory: " /usr/local/include"
92
- compiler_flag: " -isystem%{toolchain_path_prefix}include/c++/v1"
93
- compiler_flag: " -isystem%{toolchain_path_prefix}lib/clang/%{llvm_version}/include"
94
93
95
94
objcopy_embed_flag: " -I"
96
95
objcopy_embed_flag: " binary"
97
96
98
- compiler_flag: " -B%{toolchain_path_prefix}bin"
99
- tool_path {name: " ld" path: " %{tools_path_prefix}bin/ld.lld" }
97
+ tool_path {name: " ld" path: " %{tools_path_prefix}bin/ld.gold" } # TODO: Switch to lld after https://reviews.llvm.org/D41978
100
98
tool_path { name: " cpp" path: " %{tools_path_prefix}bin/clang-cpp" }
101
99
tool_path { name: " dwp" path: " %{tools_path_prefix}bin/llvm-dwp" }
102
100
tool_path { name: " gcov" path: " %{tools_path_prefix}bin/llvm-profdata" }
@@ -124,60 +122,6 @@ toolchain {
124
122
}
125
123
126
124
linking_mode_flags { mode: DYNAMIC }
127
-
128
- feature {
129
- name: " coverage"
130
- }
131
- feature {
132
- name: " llvm_coverage_map_format"
133
- flag_set {
134
- action: " preprocess-assemble"
135
- action: " c-compile"
136
- action: " c++-compile"
137
- action: " c++-module-compile"
138
- flag_group {
139
- flag: " -fprofile-instr-generate"
140
- flag: " -fcoverage-mapping"
141
- flag: " -g"
142
- }
143
- }
144
- flag_set {
145
- action: " c++-link-dynamic-library"
146
- action: " c++-link-nodeps-dynamic-library"
147
- action: " c++-link-executable"
148
- flag_group {
149
- flag: " -fprofile-instr-generate"
150
- }
151
- }
152
- requires {
153
- feature: " coverage"
154
- }
155
- }
156
- feature {
157
- name: " gcc_coverage_map_format"
158
- flag_set {
159
- action: " preprocess-assemble"
160
- action: " c-compile"
161
- action: " c++-compile"
162
- action: " c++-module-compile"
163
- flag_group {
164
- flag: " -fprofile-arcs"
165
- flag: " -ftest-coverage"
166
- flag: " -g"
167
- }
168
- }
169
- flag_set {
170
- action: " c++-link-dynamic-library"
171
- action: " c++-link-nodeps-dynamic-library"
172
- action: " c++-link-executable"
173
- flag_group {
174
- flag: " -lgcov"
175
- }
176
- }
177
- requires {
178
- feature: " coverage"
179
- }
180
- }
181
125
}
182
126
183
127
toolchain {
@@ -189,7 +133,7 @@ toolchain {
189
133
compiler: " clang"
190
134
abi_version: " darwin_x86_64"
191
135
abi_libc_version: " darwin_x86_64"
192
- needsPic: true
136
+ needsPic: false
193
137
194
138
builtin_sysroot: " "
195
139
@@ -202,6 +146,7 @@ toolchain {
202
146
unfiltered_cxx_flag: " -D__DATE__=\" redacted\" "
203
147
unfiltered_cxx_flag: " -D__TIMESTAMP__=\" redacted\" "
204
148
unfiltered_cxx_flag: " -D__TIME__=\" redacted\" "
149
+ unfiltered_cxx_flag: " -fdebug-prefix-map=%{toolchain_path_prefix}=%{debug_toolchain_path_prefix}"
205
150
206
151
# Security
207
152
compiler_flag: " -D_FORTIFY_SOURCE=1"
@@ -215,16 +160,11 @@ toolchain {
215
160
compiler_flag: " -Wall"
216
161
217
162
# C++
218
- cxx_flag: " -std=c++11 "
163
+ cxx_flag: " -std=c++17 "
219
164
cxx_flag: " -stdlib=libc++"
220
165
# The linker has no way of knowing if there are C++ objects; so we always link C++ libraries.
221
- linker_flag: " %{toolchain_path_prefix}lib/libc++.a"
222
- linker_flag: " %{toolchain_path_prefix}lib/libc++abi.a"
223
- linker_flag: " %{toolchain_path_prefix}lib/libunwind.a"
224
- cxx_flag: " -DLIBCXX_USE_COMPILER_RT=YES"
225
- linker_flag: " -rtlib=compiler-rt"
226
- linker_flag: " -lpthread"
227
- linker_flag: " -ldl" # For libunwind
166
+ linker_flag: " -lc++"
167
+ linker_flag: " -lc++abi"
228
168
229
169
# Linker
230
170
linker_flag: " -lm"
@@ -235,27 +175,22 @@ toolchain {
235
175
cxx_builtin_include_directory: " %{toolchain_path_prefix}include/c++/v1"
236
176
cxx_builtin_include_directory: " %{toolchain_path_prefix}lib/clang/%{llvm_version}/include"
237
177
cxx_builtin_include_directory: " /usr/include"
238
- cxx_builtin_include_directory: " /usr/include/linux"
239
178
cxx_builtin_include_directory: " /System/Library/Frameworks"
240
179
cxx_builtin_include_directory: " /Library/Frameworks"
241
- #cxx_builtin_include_directory: " /Applications/Xcode.app/Contents/Developer"
242
- compiler_flag: " -isystem%{toolchain_path_prefix}include/c++/v1"
243
- compiler_flag: " -isystem%{toolchain_path_prefix}lib/clang/%{llvm_version}/include"
244
180
245
181
objcopy_embed_flag: " -I"
246
182
objcopy_embed_flag: " binary"
247
183
248
- compiler_flag: " -B%{toolchain_path_prefix}bin"
249
- tool_path {name: " ld" path: " /usr/bin/ld" } # lld is not ready for macOS.
184
+ tool_path {name: " ld" path: " %{tools_path_prefix}bin/ld" } # lld is not ready for macOS.
250
185
tool_path { name: " cpp" path: " %{tools_path_prefix}bin/clang-cpp" }
251
186
tool_path { name: " dwp" path: " %{tools_path_prefix}bin/llvm-dwp" }
252
187
tool_path { name: " gcov" path: " %{tools_path_prefix}bin/llvm-profdata" }
253
188
tool_path { name: " nm" path: " %{tools_path_prefix}bin/llvm-nm" }
254
189
tool_path { name: " objcopy" path: " %{tools_path_prefix}bin/llvm-objcopy" }
255
190
tool_path { name: " objdump" path: " %{tools_path_prefix}bin/llvm-objdump" }
256
191
tool_path { name: " strip" path: " /usr/bin/strip" }
257
- tool_path { name: " gcc" path: " %{tools_path_prefix}cc_wrapper.sh" }
258
- tool_path { name: " ar" path: " /usr/bin/libtool" } # default archiver flags configuration is different for macOS .
192
+ tool_path { name: " gcc" path: " %{tools_path_prefix}bin/ cc_wrapper.sh" }
193
+ tool_path { name: " ar" path: " /usr/bin/libtool" } # system provided libtool is preferred .
259
194
260
195
compilation_mode_flags {
261
196
mode: FASTBUILD
@@ -304,64 +239,4 @@ toolchain {
304
239
}
305
240
}
306
241
}
307
-
308
- feature {
309
- name: " coverage"
310
- }
311
- feature {
312
- name: " llvm_coverage_map_format"
313
- flag_set {
314
- action: " preprocess-assemble"
315
- action: " c-compile"
316
- action: " c++-compile"
317
- action: " c++-module-compile"
318
- action: " objc-compile"
319
- action: " objc++-compile"
320
- flag_group {
321
- flag: " -fprofile-instr-generate"
322
- flag: " -fcoverage-mapping"
323
- flag: " -g"
324
- }
325
- }
326
- flag_set {
327
- action: " c++-link-dynamic-library"
328
- action: " c++-link-nodeps-dynamic-library"
329
- action: " c++-link-executable"
330
- action: " objc-executable"
331
- action: " objc++-executable"
332
- flag_group {
333
- flag: " -fprofile-instr-generate"
334
- }
335
- }
336
- requires {
337
- feature: " coverage"
338
- }
339
- }
340
- feature {
341
- name: " gcc_coverage_map_format"
342
- flag_set {
343
- action: " preprocess-assemble"
344
- action: " c-compile"
345
- action: " c++-compile"
346
- action: " c++-module-compile"
347
- action: " objc-compile"
348
- action: " objc++-compile"
349
- flag_group {
350
- flag: " -fprofile-arcs"
351
- flag: " -ftest-coverage"
352
- flag: " -g"
353
- }
354
- }
355
- flag_set {
356
- action: " c++-link-dynamic-library"
357
- action: " c++-link-nodeps-dynamic-library"
358
- action: " c++-link-executable"
359
- flag_group {
360
- flag: " -lgcov"
361
- }
362
- }
363
- requires {
364
- feature: " coverage"
365
- }
366
- }
367
242
}
0 commit comments