blob: 8dc1b47959b33a8790a63d3c1eb34da749d9998c [file] [log] [blame]
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +01001major_version: "local"
2minor_version: ""
Damien Martin-Guillereze1349ec2015-03-12 11:00:44 +00003default_target_cpu: "same_as_host"
Philipp Wollermann19f34132015-06-12 08:39:25 +00004
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +01005default_toolchain {
6 cpu: "k8"
7 toolchain_identifier: "local_linux"
8}
9default_toolchain {
Philipp Wollermann19f34132015-06-12 08:39:25 +000010 cpu: "piii"
11 toolchain_identifier: "local_linux"
12}
13default_toolchain {
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010014 cpu: "darwin"
15 toolchain_identifier: "local_darwin"
16}
Lukacs Berkia93c63b2015-07-29 15:32:19 +000017default_toolchain {
Doug Rabson709bc612015-08-25 14:12:00 +000018 cpu: "freebsd"
19 toolchain_identifier: "local_freebsd"
20}
21default_toolchain {
Lukacs Berkia93c63b2015-07-29 15:32:19 +000022 cpu: "armeabi-v7a"
23 toolchain_identifier: "stub_armeabi-v7a"
24}
Zhong Wang8c288132015-08-12 15:06:08 +000025default_toolchain {
26 cpu: "arm"
27 toolchain_identifier: "local_linux"
28}
Dmitry Lomov458ccd02016-02-02 20:30:32 +000029default_toolchain {
30 cpu: "x64_windows"
31 toolchain_identifier: "local_windows_msys64"
32}
Yun Peng114ead32016-04-07 16:39:19 +000033default_toolchain {
34 cpu: "x64_windows_msvc"
35 toolchain_identifier: "vc_14_0_x64"
36}
Zhong Wang8c288132015-08-12 15:06:08 +000037
38toolchain {
Lukacs Berkia93c63b2015-07-29 15:32:19 +000039 abi_version: "armeabi-v7a"
40 abi_libc_version: "armeabi-v7a"
41 builtin_sysroot: ""
42 compiler: "compiler"
43 host_system_name: "armeabi-v7a"
44 needsPic: true
45 supports_gold_linker: false
46 supports_incremental_linker: false
47 supports_fission: false
48 supports_interface_shared_objects: false
49 supports_normalizing_ar: false
50 supports_start_end_lib: false
51 supports_thin_archives: false
52 target_libc: "armeabi-v7a"
53 target_cpu: "armeabi-v7a"
54 target_system_name: "armeabi-v7a"
55 toolchain_identifier: "stub_armeabi-v7a"
56
57 tool_path { name: "ar" path: "/bin/false" }
58 tool_path { name: "compat-ld" path: "/bin/false" }
59 tool_path { name: "cpp" path: "/bin/false" }
60 tool_path { name: "dwp" path: "/bin/false" }
61 tool_path { name: "gcc" path: "/bin/false" }
62 tool_path { name: "gcov" path: "/bin/false" }
63 tool_path { name: "ld" path: "/bin/false" }
64
65 tool_path { name: "nm" path: "/bin/false" }
66 tool_path { name: "objcopy" path: "/bin/false" }
67 tool_path { name: "objdump" path: "/bin/false" }
68 tool_path { name: "strip" path: "/bin/false" }
Googler3dd9cc62016-02-08 16:00:09 +000069 linking_mode_flags { mode: DYNAMIC }
Lukacs Berkia93c63b2015-07-29 15:32:19 +000070}
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010071
72toolchain {
73 abi_version: "local"
74 abi_libc_version: "local"
75 builtin_sysroot: ""
76 compiler: "compiler"
77 host_system_name: "local"
78 needsPic: true
79 supports_gold_linker: false
80 supports_incremental_linker: false
81 supports_fission: false
82 supports_interface_shared_objects: false
83 supports_normalizing_ar: false
84 supports_start_end_lib: false
85 supports_thin_archives: false
86 target_libc: "local"
87 target_cpu: "local"
88 target_system_name: "local"
89 toolchain_identifier: "local_linux"
90
91 tool_path { name: "ar" path: "/usr/bin/ar" }
92 tool_path { name: "compat-ld" path: "/usr/bin/ld" }
93 tool_path { name: "cpp" path: "/usr/bin/cpp" }
94 tool_path { name: "dwp" path: "/usr/bin/dwp" }
95 tool_path { name: "gcc" path: "/usr/bin/gcc" }
96 cxx_flag: "-std=c++0x"
97 linker_flag: "-lstdc++"
Han-Wen Nienhuys4988a6d2015-04-08 13:36:58 +000098 linker_flag: "-B/usr/bin/"
99
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +0100100 # TODO(bazel-team): In theory, the path here ought to exactly match the path
101 # used by gcc. That works because bazel currently doesn't track files at
102 # absolute locations and has no remote execution, yet. However, this will need
103 # to be fixed, maybe with auto-detection?
104 cxx_builtin_include_directory: "/usr/lib/gcc/"
105 cxx_builtin_include_directory: "/usr/local/include"
106 cxx_builtin_include_directory: "/usr/include"
107 tool_path { name: "gcov" path: "/usr/bin/gcov" }
Han-Wen Nienhuys15f1f862015-06-09 06:19:25 +0000108
109 # C(++) compiles invoke the compiler (as that is the one knowing where
110 # to find libraries), but we provide LD so other rules can invoke the linker.
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +0100111 tool_path { name: "ld" path: "/usr/bin/ld" }
Han-Wen Nienhuys15f1f862015-06-09 06:19:25 +0000112
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +0100113 tool_path { name: "nm" path: "/usr/bin/nm" }
114 tool_path { name: "objcopy" path: "/usr/bin/objcopy" }
115 objcopy_embed_flag: "-I"
116 objcopy_embed_flag: "binary"
117 tool_path { name: "objdump" path: "/usr/bin/objdump" }
118 tool_path { name: "strip" path: "/usr/bin/strip" }
Ulf Adamsee8fcd32015-07-17 07:52:42 +0000119
120 # Anticipated future default.
121 unfiltered_cxx_flag: "-no-canonical-prefixes"
Lukacs Berki763f1392016-01-07 09:29:08 +0000122 unfiltered_cxx_flag: "-fno-canonical-system-headers"
Ulf Adamsee8fcd32015-07-17 07:52:42 +0000123
124 # Make C++ compilation deterministic. Use linkstamping instead of these
125 # compiler symbols.
126 unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
127 unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
128 unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
129 unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
130
131 # Security hardening on by default.
132 # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
133 # We need to undef it before redefining it as some distributions now have
134 # it enabled by default.
135 compiler_flag: "-U_FORTIFY_SOURCE"
136 compiler_flag: "-D_FORTIFY_SOURCE=1"
137 compiler_flag: "-fstack-protector"
Ulf Adamsee8fcd32015-07-17 07:52:42 +0000138 linker_flag: "-Wl,-z,relro,-z,now"
139
140 # Enable coloring even if there's no attached terminal. Bazel removes the
141 # escape sequences if --nocolor is specified. This isn't supported by gcc
142 # on Ubuntu 14.04.
143 # compiler_flag: "-fcolor-diagnostics"
144
145 # All warnings are enabled. Maybe enable -Werror as well?
146 compiler_flag: "-Wall"
147 # Enable a few more warnings that aren't part of -Wall.
148 compiler_flag: "-Wunused-but-set-parameter"
149 # But disable some that are problematic.
150 compiler_flag: "-Wno-free-nonheap-object" # has false positives
151
152 # Keep stack frames for debugging, even in opt mode.
153 compiler_flag: "-fno-omit-frame-pointer"
154
155 # Anticipated future default.
156 linker_flag: "-no-canonical-prefixes"
157 # Have gcc return the exit code from ld.
158 linker_flag: "-pass-exit-codes"
159 # Stamp the binary with a unique identifier.
160 linker_flag: "-Wl,--build-id=md5"
161 linker_flag: "-Wl,--hash-style=gnu"
162 # Gold linker only? Can we enable this by default?
163 # linker_flag: "-Wl,--warn-execstack"
164 # linker_flag: "-Wl,--detect-odr-violations"
165
166 compilation_mode_flags {
167 mode: DBG
168 # Enable debug symbols.
169 compiler_flag: "-g"
170 }
171 compilation_mode_flags {
172 mode: OPT
173
174 # No debug symbols.
175 # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or
176 # even generally? However, that can't happen here, as it requires special
177 # handling in Bazel.
178 compiler_flag: "-g0"
179
180 # Conservative choice for -O
181 # -O3 can increase binary size and even slow down the resulting binaries.
182 # Profile first and / or use FDO if you need better performance than this.
183 compiler_flag: "-O2"
184
185 # Disable assertions
186 compiler_flag: "-DNDEBUG"
187
188 # Removal of unused code and data at link time (can this increase binary size in some cases?).
189 compiler_flag: "-ffunction-sections"
190 compiler_flag: "-fdata-sections"
191 linker_flag: "-Wl,--gc-sections"
192 }
Googler3dd9cc62016-02-08 16:00:09 +0000193 linking_mode_flags { mode: DYNAMIC }
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +0100194}
195
196toolchain {
197 abi_version: "local"
198 abi_libc_version: "local"
199 builtin_sysroot: ""
200 compiler: "compiler"
201 host_system_name: "local"
202 needsPic: true
203 target_libc: "macosx"
204 target_cpu: "darwin"
205 target_system_name: "local"
206 toolchain_identifier: "local_darwin"
207
208 tool_path { name: "ar" path: "/usr/bin/libtool" }
209 tool_path { name: "compat-ld" path: "/usr/bin/ld" }
210 tool_path { name: "cpp" path: "/usr/bin/cpp" }
211 tool_path { name: "dwp" path: "/usr/bin/dwp" }
Damien Martin-Guillerez8fa5ae62016-03-02 16:24:13 +0000212 tool_path { name: "gcc" path: "osx_cc_wrapper.sh" }
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +0100213 cxx_flag: "-std=c++0x"
214 ar_flag: "-static"
215 ar_flag: "-s"
216 ar_flag: "-o"
217 linker_flag: "-lstdc++"
Damien Martin-Guillerezefd5d312015-05-15 14:05:10 +0000218 linker_flag: "-undefined"
219 linker_flag: "dynamic_lookup"
Ulf Adams568c3942015-10-29 12:18:42 +0000220 # TODO(ulfjack): This is wrong on so many levels. Figure out a way to auto-detect the proper
221 # setting from the local compiler, and also how to make incremental builds correct.
222 cxx_builtin_include_directory: "/"
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +0100223 tool_path { name: "gcov" path: "/usr/bin/gcov" }
224 tool_path { name: "ld" path: "/usr/bin/ld" }
225 tool_path { name: "nm" path: "/usr/bin/nm" }
226 tool_path { name: "objcopy" path: "/usr/bin/objcopy" }
227 objcopy_embed_flag: "-I"
228 objcopy_embed_flag: "binary"
229 tool_path { name: "objdump" path: "/usr/bin/objdump" }
230 tool_path { name: "strip" path: "/usr/bin/strip" }
Ulf Adamsee8fcd32015-07-17 07:52:42 +0000231
232 # Anticipated future default.
233 unfiltered_cxx_flag: "-no-canonical-prefixes"
Lukacs Berki763f1392016-01-07 09:29:08 +0000234
Ulf Adamsee8fcd32015-07-17 07:52:42 +0000235 # Make C++ compilation deterministic. Use linkstamping instead of these
236 # compiler symbols.
237 unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
238 unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
239 unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
240 unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
241
242 # Security hardening on by default.
243 # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
244 compiler_flag: "-D_FORTIFY_SOURCE=1"
245 compiler_flag: "-fstack-protector"
Ulf Adamsee8fcd32015-07-17 07:52:42 +0000246
247 # Enable coloring even if there's no attached terminal. Bazel removes the
248 # escape sequences if --nocolor is specified.
249 compiler_flag: "-fcolor-diagnostics"
250
251 # All warnings are enabled. Maybe enable -Werror as well?
252 compiler_flag: "-Wall"
253 # Enable a few more warnings that aren't part of -Wall.
254 compiler_flag: "-Wthread-safety"
255 compiler_flag: "-Wself-assign"
256
257 # Keep stack frames for debugging, even in opt mode.
258 compiler_flag: "-fno-omit-frame-pointer"
259
260 # Anticipated future default.
261 linker_flag: "-no-canonical-prefixes"
262
263 compilation_mode_flags {
264 mode: DBG
265 # Enable debug symbols.
266 compiler_flag: "-g"
267 }
268 compilation_mode_flags {
269 mode: OPT
270 # No debug symbols.
271 # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or even generally?
272 # However, that can't happen here, as it requires special handling in Bazel.
273 compiler_flag: "-g0"
274
275 # Conservative choice for -O
276 # -O3 can increase binary size and even slow down the resulting binaries.
277 # Profile first and / or use FDO if you need better performance than this.
278 compiler_flag: "-O2"
279
280 # Disable assertions
281 compiler_flag: "-DNDEBUG"
282
283 # Removal of unused code and data at link time (can this increase binary size in some cases?).
284 compiler_flag: "-ffunction-sections"
285 compiler_flag: "-fdata-sections"
286 }
Googler3dd9cc62016-02-08 16:00:09 +0000287 linking_mode_flags { mode: DYNAMIC }
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +0100288}
289
290toolchain {
291 abi_version: "local"
292 abi_libc_version: "local"
293 builtin_sysroot: ""
Doug Rabson709bc612015-08-25 14:12:00 +0000294 compiler: "compiler"
295 host_system_name: "local"
296 needsPic: true
297 supports_gold_linker: false
298 supports_incremental_linker: false
299 supports_fission: false
300 supports_interface_shared_objects: false
301 supports_normalizing_ar: false
302 supports_start_end_lib: false
303 supports_thin_archives: false
304 target_libc: "local"
305 target_cpu: "freebsd"
306 target_system_name: "local"
307 toolchain_identifier: "local_freebsd"
308
309 tool_path { name: "ar" path: "/usr/bin/ar" }
310 tool_path { name: "compat-ld" path: "/usr/bin/ld" }
311 tool_path { name: "cpp" path: "/usr/bin/cpp" }
312 tool_path { name: "dwp" path: "/usr/bin/dwp" }
313 tool_path { name: "gcc" path: "/usr/bin/clang" }
314 cxx_flag: "-std=c++0x"
315 linker_flag: "-lstdc++"
316 linker_flag: "-B/usr/bin/"
317
318 # TODO(bazel-team): In theory, the path here ought to exactly match the path
319 # used by gcc. That works because bazel currently doesn't track files at
320 # absolute locations and has no remote execution, yet. However, this will need
321 # to be fixed, maybe with auto-detection?
322 cxx_builtin_include_directory: "/usr/local/include"
323 cxx_builtin_include_directory: "/usr/include"
324 tool_path { name: "gcov" path: "/usr/bin/gcov" }
325
326 # C(++) compiles invoke the compiler (as that is the one knowing where
327 # to find libraries), but we provide LD so other rules can invoke the linker.
328 tool_path { name: "ld" path: "/usr/bin/ld" }
329
330 tool_path { name: "nm" path: "/usr/bin/nm" }
331 tool_path { name: "objcopy" path: "/usr/bin/objcopy" }
332 objcopy_embed_flag: "-I"
333 objcopy_embed_flag: "binary"
334 tool_path { name: "objdump" path: "/usr/bin/objdump" }
335 tool_path { name: "strip" path: "/usr/bin/strip" }
336
337 # Anticipated future default.
338 unfiltered_cxx_flag: "-no-canonical-prefixes"
339
340 # Make C++ compilation deterministic. Use linkstamping instead of these
341 # compiler symbols.
342 unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
343 unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
344 unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
345 unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
346
347 # Security hardening on by default.
348 # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
349 # We need to undef it before redefining it as some distributions now have
350 # it enabled by default.
351 compiler_flag: "-U_FORTIFY_SOURCE"
352 compiler_flag: "-D_FORTIFY_SOURCE=1"
353 compiler_flag: "-fstack-protector"
Doug Rabson709bc612015-08-25 14:12:00 +0000354 linker_flag: "-Wl,-z,relro,-z,now"
355
356 # Enable coloring even if there's no attached terminal. Bazel removes the
357 # escape sequences if --nocolor is specified. This isn't supported by gcc
358 # on Ubuntu 14.04.
359 # compiler_flag: "-fcolor-diagnostics"
360
361 # All warnings are enabled. Maybe enable -Werror as well?
362 compiler_flag: "-Wall"
363 # Enable a few more warnings that aren't part of -Wall.
364 #compiler_flag: "-Wunused-but-set-parameter"
365 # But disable some that are problematic.
366 #compiler_flag: "-Wno-free-nonheap-object" # has false positives
367
368 # Keep stack frames for debugging, even in opt mode.
369 compiler_flag: "-fno-omit-frame-pointer"
370
371 # Anticipated future default.
372 linker_flag: "-no-canonical-prefixes"
373 # Have gcc return the exit code from ld.
374 #linker_flag: "-pass-exit-codes"
375 # Stamp the binary with a unique identifier.
376 #linker_flag: "-Wl,--build-id=md5"
377 linker_flag: "-Wl,--hash-style=gnu"
378 # Gold linker only? Can we enable this by default?
379 # linker_flag: "-Wl,--warn-execstack"
380 # linker_flag: "-Wl,--detect-odr-violations"
381
382 compilation_mode_flags {
383 mode: DBG
384 # Enable debug symbols.
385 compiler_flag: "-g"
386 }
387 compilation_mode_flags {
388 mode: OPT
389
390 # No debug symbols.
391 # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or
392 # even generally? However, that can't happen here, as it requires special
393 # handling in Bazel.
394 compiler_flag: "-g0"
395
396 # Conservative choice for -O
397 # -O3 can increase binary size and even slow down the resulting binaries.
398 # Profile first and / or use FDO if you need better performance than this.
399 compiler_flag: "-O2"
400
401 # Disable assertions
402 compiler_flag: "-DNDEBUG"
403
404 # Removal of unused code and data at link time (can this increase binary size in some cases?).
405 compiler_flag: "-ffunction-sections"
406 compiler_flag: "-fdata-sections"
407 linker_flag: "-Wl,--gc-sections"
408 }
Googler3dd9cc62016-02-08 16:00:09 +0000409 linking_mode_flags { mode: DYNAMIC }
Doug Rabson709bc612015-08-25 14:12:00 +0000410}
411
412toolchain {
413 abi_version: "local"
414 abi_libc_version: "local"
415 builtin_sysroot: ""
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +0100416 compiler: "windows_mingw"
417 host_system_name: "local"
418 needsPic: false
419 target_libc: "local"
Dmitry Lomov458ccd02016-02-02 20:30:32 +0000420 target_cpu: "x64_windows"
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +0100421 target_system_name: "local"
422 toolchain_identifier: "local_windows_mingw"
423
424 tool_path { name: "ar" path: "C:/mingw/bin/ar" }
425 tool_path { name: "compat-ld" path: "C:/mingw/bin/ld" }
426 tool_path { name: "cpp" path: "C:/mingw/bin/cpp" }
427 tool_path { name: "dwp" path: "C:/mingw/bin/dwp" }
428 tool_path { name: "gcc" path: "C:/mingw/bin/gcc" }
429 cxx_flag: "-std=c++0x"
430 # TODO(bazel-team): In theory, the path here ought to exactly match the path
431 # used by gcc. That works because bazel currently doesn't track files at
432 # absolute locations and has no remote execution, yet. However, this will need
433 # to be fixed, maybe with auto-detection?
434 cxx_builtin_include_directory: "C:/mingw/include"
435 cxx_builtin_include_directory: "C:/mingw/lib/gcc"
436 tool_path { name: "gcov" path: "C:/mingw/bin/gcov" }
437 tool_path { name: "ld" path: "C:/mingw/bin/ld" }
438 tool_path { name: "nm" path: "C:/mingw/bin/nm" }
439 tool_path { name: "objcopy" path: "C:/mingw/bin/objcopy" }
440 objcopy_embed_flag: "-I"
441 objcopy_embed_flag: "binary"
442 tool_path { name: "objdump" path: "C:/mingw/bin/objdump" }
443 tool_path { name: "strip" path: "C:/mingw/bin/strip" }
Googler3dd9cc62016-02-08 16:00:09 +0000444 linking_mode_flags { mode: DYNAMIC }
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +0100445}
446
447toolchain {
448 abi_version: "local"
449 abi_libc_version: "local"
450 builtin_sysroot: ""
451 compiler: "windows_msys64_mingw64"
452 host_system_name: "local"
453 needsPic: false
454 target_libc: "local"
Dmitry Lomov458ccd02016-02-02 20:30:32 +0000455 target_cpu: "x64_windows"
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +0100456 target_system_name: "local"
457 toolchain_identifier: "local_windows_msys64_mingw64"
458
Lukacs Berki7a5d59e2016-02-24 15:33:46 +0000459 tool_path { name: "ar" path: "C:/tools/msys64/mingw64/bin/ar" }
460 tool_path { name: "compat-ld" path: "C:/tools/msys64/mingw64/bin/ld" }
461 tool_path { name: "cpp" path: "C:/tools/msys64/mingw64/bin/cpp" }
462 tool_path { name: "dwp" path: "C:/tools/msys64/mingw64/bin/dwp" }
463 tool_path { name: "gcc" path: "C:/tools/msys64/mingw64/bin/gcc" }
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +0100464 cxx_flag: "-std=c++0x"
465 # TODO(bazel-team): In theory, the path here ought to exactly match the path
466 # used by gcc. That works because bazel currently doesn't track files at
467 # absolute locations and has no remote execution, yet. However, this will need
468 # to be fixed, maybe with auto-detection?
Lukacs Berki7a5d59e2016-02-24 15:33:46 +0000469 cxx_builtin_include_directory: "C:/tools/msys64/mingw64/x86_64-w64-mingw32/include"
470 tool_path { name: "gcov" path: "C:/tools/msys64/mingw64/bin/gcov" }
471 tool_path { name: "ld" path: "C:/tools/msys64/mingw64/bin/ld" }
472 tool_path { name: "nm" path: "C:/tools/msys64/mingw64/bin/nm" }
473 tool_path { name: "objcopy" path: "C:/tools/msys64/mingw64/bin/objcopy" }
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +0100474 objcopy_embed_flag: "-I"
475 objcopy_embed_flag: "binary"
Lukacs Berki7a5d59e2016-02-24 15:33:46 +0000476 tool_path { name: "objdump" path: "C:/tools/msys64/mingw64/bin/objdump" }
477 tool_path { name: "strip" path: "C:/tools/msys64/mingw64/bin/strip" }
Googler3dd9cc62016-02-08 16:00:09 +0000478 linking_mode_flags { mode: DYNAMIC }
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +0100479}
480
481toolchain {
482 abi_version: "local"
483 abi_libc_version: "local"
484 builtin_sysroot: ""
485 compiler: "windows_clang"
486 host_system_name: "local"
487 needsPic: false
488 target_libc: "local"
Dmitry Lomov458ccd02016-02-02 20:30:32 +0000489 target_cpu: "x64_windows"
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +0100490 target_system_name: "local"
491 toolchain_identifier: "local_windows_clang"
492
493 tool_path { name: "ar" path: "C:/mingw/bin/ar" }
494 tool_path { name: "compat-ld" path: "C:/Program Files (x86)/LLVM/bin/ld" }
495 tool_path { name: "cpp" path: "C:/Program Files (x86)/LLVM/bin/cpp" }
496 tool_path { name: "dwp" path: "C:/Program Files (x86)/LLVM/bin/dwp" }
497 tool_path { name: "gcc" path: "C:/Program Files (x86)/LLVM/bin/clang" }
498 cxx_flag: "-std=c++0x"
499 # TODO(bazel-team): In theory, the path here ought to exactly match the path
500 # used by gcc. That works because bazel currently doesn't track files at
501 # absolute locations and has no remote execution, yet. However, this will need
502 # to be fixed, maybe with auto-detection?
503 cxx_builtin_include_directory: "/usr/lib/gcc/"
504 cxx_builtin_include_directory: "/usr/local/include"
505 cxx_builtin_include_directory: "/usr/include"
506 tool_path { name: "gcov" path: "C:/Program Files (x86)/LLVM/bin/gcov" }
507 tool_path { name: "ld" path: "C:/Program Files (x86)/LLVM/bin/ld" }
508 tool_path { name: "nm" path: "C:/Program Files (x86)/LLVM/bin/nm" }
509 tool_path { name: "objcopy" path: "C:/Program Files (x86)/LLVM/bin/objcopy" }
510 objcopy_embed_flag: "-I"
511 objcopy_embed_flag: "binary"
512 tool_path { name: "objdump" path: "C:/Program Files (x86)/LLVM/bin/objdump" }
513 tool_path { name: "strip" path: "C:/Program Files (x86)/LLVM/bin/strip" }
Googler3dd9cc62016-02-08 16:00:09 +0000514 linking_mode_flags { mode: DYNAMIC }
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +0100515}
Dmitry Lomov458ccd02016-02-02 20:30:32 +0000516
517toolchain {
518 abi_version: "local"
519 abi_libc_version: "local"
520 builtin_sysroot: ""
521 compiler: "windows_msys64"
522 host_system_name: "local"
523 needsPic: false
524 target_libc: "local"
525 target_cpu: "x64_windows"
526 target_system_name: "local"
527 toolchain_identifier: "local_windows_msys64"
528
Lukacs Berki7a5d59e2016-02-24 15:33:46 +0000529 tool_path { name: "ar" path: "C:/tools/msys64/usr/bin/ar" }
530 tool_path { name: "compat-ld" path: "C:/tools/msys64/usr/bin/ld" }
531 tool_path { name: "cpp" path: "C:/tools/msys64/usr/bin/cpp" }
532 tool_path { name: "dwp" path: "C:/tools/msys64/usr/bin/dwp" }
Dmitry Lomov458ccd02016-02-02 20:30:32 +0000533 # Use gcc instead of g++ so that C will compile correctly.
Lukacs Berki7a5d59e2016-02-24 15:33:46 +0000534 tool_path { name: "gcc" path: "C:/tools/msys64/usr/bin/gcc" }
Dmitry Lomov458ccd02016-02-02 20:30:32 +0000535 cxx_flag: "-std=gnu++0x"
536 linker_flag: "-lstdc++"
537 # TODO(bazel-team): In theory, the path here ought to exactly match the path
538 # used by gcc. That works because bazel currently doesn't track files at
539 # absolute locations and has no remote execution, yet. However, this will need
540 # to be fixed, maybe with auto-detection?
Lukacs Berki7a5d59e2016-02-24 15:33:46 +0000541 cxx_builtin_include_directory: "C:/tools/msys64/"
Dmitry Lomov458ccd02016-02-02 20:30:32 +0000542 cxx_builtin_include_directory: "/usr/"
Lukacs Berki7a5d59e2016-02-24 15:33:46 +0000543 tool_path { name: "gcov" path: "C:/tools/msys64/usr/bin/gcov" }
544 tool_path { name: "ld" path: "C:/tools/msys64/usr/bin/ld" }
545 tool_path { name: "nm" path: "C:/tools/msys64/usr/bin/nm" }
546 tool_path { name: "objcopy" path: "C:/tools/msys64/usr/bin/objcopy" }
Dmitry Lomov458ccd02016-02-02 20:30:32 +0000547 objcopy_embed_flag: "-I"
548 objcopy_embed_flag: "binary"
Lukacs Berki7a5d59e2016-02-24 15:33:46 +0000549 tool_path { name: "objdump" path: "C:/tools/msys64/usr/bin/objdump" }
550 tool_path { name: "strip" path: "C:/tools/msys64/usr/bin/strip" }
Googler3dd9cc62016-02-08 16:00:09 +0000551 linking_mode_flags { mode: DYNAMIC }
Dmitry Lomov458ccd02016-02-02 20:30:32 +0000552}
Yun Peng114ead32016-04-07 16:39:19 +0000553
554toolchain {
555 toolchain_identifier: "vc_14_0_x64"
556 host_system_name: "local"
557 target_system_name: "local"
558
559 abi_version: "local"
560 abi_libc_version: "local"
561 target_cpu: "x64_windows"
562 compiler: "cl"
563 target_libc: "msvcrt140"
564 default_python_version: "python2.7"
565 cxx_builtin_include_directory: "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/INCLUDE"
566 cxx_builtin_include_directory: "C:/Program Files (x86)/Windows Kits/10/include/10.0.10240.0/ucrt"
567 tool_path {
568 name: "ar"
569 path: "wrapper/bin/msvc_link.bat"
570 }
571 tool_path {
572 name: "cpp"
573 path: "wrapper/bin/msvc_cl.bat"
574 }
575 tool_path {
576 name: "gcc"
577 path: "wrapper/bin/msvc_cl.bat"
578 }
579 tool_path {
580 name: "gcov"
581 path: "wrapper/bin/msvc_nop.bat"
582 }
583 tool_path {
584 name: "ld"
585 path: "wrapper/bin/msvc_link.bat"
586 }
587 tool_path {
588 name: "nm"
589 path: "wrapper/bin/msvc_nop.bat"
590 }
591 tool_path {
592 name: "objcopy"
593 path: "wrapper/bin/msvc_nop.bat"
594 }
595 tool_path {
596 name: "objdump"
597 path: "wrapper/bin/msvc_nop.bat"
598 }
599 tool_path {
600 name: "strip"
601 path: "wrapper/bin/msvc_nop.bat"
602 }
603 supports_gold_linker: false
604 supports_thin_archives: false
605 supports_start_end_lib: false
606 supports_interface_shared_objects: false
607 supports_incremental_linker: false
608 supports_normalizing_ar: true
609 needsPic: false
610
611 compiler_flag: "-m64"
612
613 # TODO(pcloudy): Review those flags below, they should be defined by cl.exe
614 compiler_flag: "/DOS_WINDOWS=OS_WINDOWS"
615 compiler_flag: "/DCOMPILER_MSVC"
616
617 # Don't pollute with GDI macros in windows.h.
618 compiler_flag: "/DNOGDI"
619 # Don't define min/max macros in windows.h.
620 compiler_flag: "/DNOMINMAX"
621 compiler_flag: "/DPRAGMA_SUPPORTED"
622 # Platform defines.
623 compiler_flag: "/D_WIN32"
624 compiler_flag: "/DWIN32"
625 compiler_flag: "/D_WIN32_WINNT=0x0502"
626 compiler_flag: "/DWINVER=0x0502"
627 compiler_flag: "/D_MSC_VER=1900"
628 compiler_flag: "/D_WINDOWS"
629 # Turn off warning messages.
630 compiler_flag: "/D_CRT_SECURE_NO_DEPRECATE"
631 compiler_flag: "/D_CRT_SECURE_NO_WARNINGS"
632 compiler_flag: "/D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS"
633 # Use math constants (M_PI, etc.) from the math library
634 compiler_flag: "/D_USE_MATH_DEFINES"
635 # Don't bloat namespace with incompatible winsock versions.
636 compiler_flag: "/DWIN32_LEAN_AND_MEAN"
637
638 # Useful options to have on for compilation.
639 # Suppress startup banner.
640 compiler_flag: "/nologo"
641 # Treat warnings as errors.
642 compiler_flag: "/WX"
643 # Increase the capacity of object files to 2^32 sections.
644 compiler_flag: "/bigobj"
645 # Allocate 500MB for precomputed headers.
646 compiler_flag: "/Zm500"
647 # Use unsigned char by default.
648 compiler_flag: "/J"
649 # Use function level linking.
650 compiler_flag: "/Gy"
651 # Use string pooling.
652 compiler_flag: "/GF"
653 # Warning level 3 (could possibly go to 4 in the future).
654 compiler_flag: "/W3"
655 # Catch both asynchronous (structured) and synchronous (C++) exceptions.
656 compiler_flag: "/EHsc"
657
658 # Globally disabled warnings.
659 # Don't warn about elements of array being be default initialized.
660 compiler_flag: "/wd4351"
661 # Don't warn about no matching delete found.
662 compiler_flag: "/wd4291"
663 # Don't warn about diamond inheritance patterns.
664 compiler_flag: "/wd4250"
665 # Don't warn about insecure functions (e.g. non _s functions).
666 compiler_flag: "/wd4996"
667
668 linker_flag: "-m64"
669
670 compilation_mode_flags {
671 mode: DBG
672 compiler_flag: "/DDEBUG=1"
673 # This will signal the wrapper that we are doing a debug build, which sets
674 # some internal state of the toolchain wrapper. It is intentionally a "-"
675 # flag to make this very obvious.
676 compiler_flag: "-g"
677 compiler_flag: "/Od"
678 compiler_flag: "-Xcompilation-mode=dbg"
679 }
680
681 compilation_mode_flags {
682 mode: FASTBUILD
683 compiler_flag: "/DNDEBUG"
684 compiler_flag: "/Od"
685 compiler_flag: "-Xcompilation-mode=fastbuild"
686 }
687
688 compilation_mode_flags {
689 mode: OPT
690 compiler_flag: "/DNDEBUG"
691 compiler_flag: "/O2"
692 compiler_flag: "-Xcompilation-mode=opt"
693 }
694}