Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 1 | major_version: "local" |
| 2 | minor_version: "" |
davideleoni90 | 033aa6c | 2017-05-15 15:16:04 +0200 | [diff] [blame] | 3 | |
Zhong Wang | 8c28813 | 2015-08-12 15:06:08 +0000 | [diff] [blame] | 4 | toolchain { |
Lukacs Berki | a93c63b | 2015-07-29 15:32:19 +0000 | [diff] [blame] | 5 | abi_version: "armeabi-v7a" |
| 6 | abi_libc_version: "armeabi-v7a" |
| 7 | builtin_sysroot: "" |
| 8 | compiler: "compiler" |
| 9 | host_system_name: "armeabi-v7a" |
| 10 | needsPic: true |
Lukacs Berki | a93c63b | 2015-07-29 15:32:19 +0000 | [diff] [blame] | 11 | supports_incremental_linker: false |
| 12 | supports_fission: false |
| 13 | supports_interface_shared_objects: false |
| 14 | supports_normalizing_ar: false |
| 15 | supports_start_end_lib: false |
Lukacs Berki | a93c63b | 2015-07-29 15:32:19 +0000 | [diff] [blame] | 16 | target_libc: "armeabi-v7a" |
| 17 | target_cpu: "armeabi-v7a" |
| 18 | target_system_name: "armeabi-v7a" |
| 19 | toolchain_identifier: "stub_armeabi-v7a" |
| 20 | |
| 21 | tool_path { name: "ar" path: "/bin/false" } |
| 22 | tool_path { name: "compat-ld" path: "/bin/false" } |
| 23 | tool_path { name: "cpp" path: "/bin/false" } |
| 24 | tool_path { name: "dwp" path: "/bin/false" } |
| 25 | tool_path { name: "gcc" path: "/bin/false" } |
| 26 | tool_path { name: "gcov" path: "/bin/false" } |
| 27 | tool_path { name: "ld" path: "/bin/false" } |
| 28 | |
| 29 | tool_path { name: "nm" path: "/bin/false" } |
| 30 | tool_path { name: "objcopy" path: "/bin/false" } |
| 31 | tool_path { name: "objdump" path: "/bin/false" } |
| 32 | tool_path { name: "strip" path: "/bin/false" } |
Googler | 3dd9cc6 | 2016-02-08 16:00:09 +0000 | [diff] [blame] | 33 | linking_mode_flags { mode: DYNAMIC } |
Lukacs Berki | a93c63b | 2015-07-29 15:32:19 +0000 | [diff] [blame] | 34 | } |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 35 | |
| 36 | toolchain { |
| 37 | abi_version: "local" |
| 38 | abi_libc_version: "local" |
| 39 | builtin_sysroot: "" |
| 40 | compiler: "compiler" |
| 41 | host_system_name: "local" |
| 42 | needsPic: true |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 43 | supports_incremental_linker: false |
| 44 | supports_fission: false |
| 45 | supports_interface_shared_objects: false |
| 46 | supports_normalizing_ar: false |
| 47 | supports_start_end_lib: false |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 48 | target_libc: "local" |
| 49 | target_cpu: "local" |
| 50 | target_system_name: "local" |
| 51 | toolchain_identifier: "local_linux" |
| 52 | |
| 53 | tool_path { name: "ar" path: "/usr/bin/ar" } |
| 54 | tool_path { name: "compat-ld" path: "/usr/bin/ld" } |
| 55 | tool_path { name: "cpp" path: "/usr/bin/cpp" } |
| 56 | tool_path { name: "dwp" path: "/usr/bin/dwp" } |
| 57 | tool_path { name: "gcc" path: "/usr/bin/gcc" } |
| 58 | cxx_flag: "-std=c++0x" |
| 59 | linker_flag: "-lstdc++" |
Han-Wen Nienhuys | 4988a6d | 2015-04-08 13:36:58 +0000 | [diff] [blame] | 60 | |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 61 | # TODO(bazel-team): In theory, the path here ought to exactly match the path |
| 62 | # used by gcc. That works because bazel currently doesn't track files at |
| 63 | # absolute locations and has no remote execution, yet. However, this will need |
| 64 | # to be fixed, maybe with auto-detection? |
| 65 | cxx_builtin_include_directory: "/usr/lib/gcc/" |
| 66 | cxx_builtin_include_directory: "/usr/local/include" |
| 67 | cxx_builtin_include_directory: "/usr/include" |
| 68 | tool_path { name: "gcov" path: "/usr/bin/gcov" } |
Han-Wen Nienhuys | 15f1f86 | 2015-06-09 06:19:25 +0000 | [diff] [blame] | 69 | |
| 70 | # C(++) compiles invoke the compiler (as that is the one knowing where |
| 71 | # to find libraries), but we provide LD so other rules can invoke the linker. |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 72 | tool_path { name: "ld" path: "/usr/bin/ld" } |
Han-Wen Nienhuys | 15f1f86 | 2015-06-09 06:19:25 +0000 | [diff] [blame] | 73 | |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 74 | tool_path { name: "nm" path: "/usr/bin/nm" } |
| 75 | tool_path { name: "objcopy" path: "/usr/bin/objcopy" } |
| 76 | objcopy_embed_flag: "-I" |
| 77 | objcopy_embed_flag: "binary" |
| 78 | tool_path { name: "objdump" path: "/usr/bin/objdump" } |
| 79 | tool_path { name: "strip" path: "/usr/bin/strip" } |
Ulf Adams | ee8fcd3 | 2015-07-17 07:52:42 +0000 | [diff] [blame] | 80 | |
| 81 | # Anticipated future default. |
| 82 | unfiltered_cxx_flag: "-no-canonical-prefixes" |
Lukacs Berki | 763f139 | 2016-01-07 09:29:08 +0000 | [diff] [blame] | 83 | unfiltered_cxx_flag: "-fno-canonical-system-headers" |
Ulf Adams | ee8fcd3 | 2015-07-17 07:52:42 +0000 | [diff] [blame] | 84 | |
| 85 | # Make C++ compilation deterministic. Use linkstamping instead of these |
| 86 | # compiler symbols. |
| 87 | unfiltered_cxx_flag: "-Wno-builtin-macro-redefined" |
| 88 | unfiltered_cxx_flag: "-D__DATE__=\"redacted\"" |
| 89 | unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\"" |
| 90 | unfiltered_cxx_flag: "-D__TIME__=\"redacted\"" |
| 91 | |
| 92 | # Security hardening on by default. |
| 93 | # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases. |
| 94 | # We need to undef it before redefining it as some distributions now have |
| 95 | # it enabled by default. |
| 96 | compiler_flag: "-U_FORTIFY_SOURCE" |
| 97 | compiler_flag: "-D_FORTIFY_SOURCE=1" |
| 98 | compiler_flag: "-fstack-protector" |
Ulf Adams | ee8fcd3 | 2015-07-17 07:52:42 +0000 | [diff] [blame] | 99 | linker_flag: "-Wl,-z,relro,-z,now" |
| 100 | |
| 101 | # Enable coloring even if there's no attached terminal. Bazel removes the |
| 102 | # escape sequences if --nocolor is specified. This isn't supported by gcc |
| 103 | # on Ubuntu 14.04. |
| 104 | # compiler_flag: "-fcolor-diagnostics" |
| 105 | |
| 106 | # All warnings are enabled. Maybe enable -Werror as well? |
| 107 | compiler_flag: "-Wall" |
| 108 | # Enable a few more warnings that aren't part of -Wall. |
| 109 | compiler_flag: "-Wunused-but-set-parameter" |
| 110 | # But disable some that are problematic. |
| 111 | compiler_flag: "-Wno-free-nonheap-object" # has false positives |
| 112 | |
| 113 | # Keep stack frames for debugging, even in opt mode. |
| 114 | compiler_flag: "-fno-omit-frame-pointer" |
| 115 | |
| 116 | # Anticipated future default. |
| 117 | linker_flag: "-no-canonical-prefixes" |
| 118 | # Have gcc return the exit code from ld. |
| 119 | linker_flag: "-pass-exit-codes" |
Ulf Adams | ee8fcd3 | 2015-07-17 07:52:42 +0000 | [diff] [blame] | 120 | # Gold linker only? Can we enable this by default? |
| 121 | # linker_flag: "-Wl,--warn-execstack" |
| 122 | # linker_flag: "-Wl,--detect-odr-violations" |
| 123 | |
| 124 | compilation_mode_flags { |
| 125 | mode: DBG |
| 126 | # Enable debug symbols. |
| 127 | compiler_flag: "-g" |
| 128 | } |
| 129 | compilation_mode_flags { |
| 130 | mode: OPT |
| 131 | |
| 132 | # No debug symbols. |
| 133 | # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or |
| 134 | # even generally? However, that can't happen here, as it requires special |
| 135 | # handling in Bazel. |
| 136 | compiler_flag: "-g0" |
| 137 | |
| 138 | # Conservative choice for -O |
| 139 | # -O3 can increase binary size and even slow down the resulting binaries. |
| 140 | # Profile first and / or use FDO if you need better performance than this. |
| 141 | compiler_flag: "-O2" |
| 142 | |
| 143 | # Disable assertions |
| 144 | compiler_flag: "-DNDEBUG" |
| 145 | |
| 146 | # Removal of unused code and data at link time (can this increase binary size in some cases?). |
| 147 | compiler_flag: "-ffunction-sections" |
| 148 | compiler_flag: "-fdata-sections" |
| 149 | linker_flag: "-Wl,--gc-sections" |
| 150 | } |
Googler | 3dd9cc6 | 2016-02-08 16:00:09 +0000 | [diff] [blame] | 151 | linking_mode_flags { mode: DYNAMIC } |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 152 | } |
| 153 | |
| 154 | toolchain { |
| 155 | abi_version: "local" |
| 156 | abi_libc_version: "local" |
| 157 | builtin_sysroot: "" |
| 158 | compiler: "compiler" |
| 159 | host_system_name: "local" |
| 160 | needsPic: true |
| 161 | target_libc: "macosx" |
| 162 | target_cpu: "darwin" |
| 163 | target_system_name: "local" |
| 164 | toolchain_identifier: "local_darwin" |
| 165 | |
| 166 | tool_path { name: "ar" path: "/usr/bin/libtool" } |
| 167 | tool_path { name: "compat-ld" path: "/usr/bin/ld" } |
| 168 | tool_path { name: "cpp" path: "/usr/bin/cpp" } |
| 169 | tool_path { name: "dwp" path: "/usr/bin/dwp" } |
Damien Martin-Guillerez | 8fa5ae6 | 2016-03-02 16:24:13 +0000 | [diff] [blame] | 170 | tool_path { name: "gcc" path: "osx_cc_wrapper.sh" } |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 171 | cxx_flag: "-std=c++0x" |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 172 | linker_flag: "-lstdc++" |
Damien Martin-Guillerez | efd5d31 | 2015-05-15 14:05:10 +0000 | [diff] [blame] | 173 | linker_flag: "-undefined" |
| 174 | linker_flag: "dynamic_lookup" |
David Chen | b86809e | 2016-05-17 08:29:50 +0000 | [diff] [blame] | 175 | linker_flag: "-headerpad_max_install_names" |
Ulf Adams | 568c394 | 2015-10-29 12:18:42 +0000 | [diff] [blame] | 176 | # TODO(ulfjack): This is wrong on so many levels. Figure out a way to auto-detect the proper |
| 177 | # setting from the local compiler, and also how to make incremental builds correct. |
| 178 | cxx_builtin_include_directory: "/" |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 179 | tool_path { name: "gcov" path: "/usr/bin/gcov" } |
| 180 | tool_path { name: "ld" path: "/usr/bin/ld" } |
| 181 | tool_path { name: "nm" path: "/usr/bin/nm" } |
| 182 | tool_path { name: "objcopy" path: "/usr/bin/objcopy" } |
| 183 | objcopy_embed_flag: "-I" |
| 184 | objcopy_embed_flag: "binary" |
| 185 | tool_path { name: "objdump" path: "/usr/bin/objdump" } |
| 186 | tool_path { name: "strip" path: "/usr/bin/strip" } |
Ulf Adams | ee8fcd3 | 2015-07-17 07:52:42 +0000 | [diff] [blame] | 187 | |
| 188 | # Anticipated future default. |
| 189 | unfiltered_cxx_flag: "-no-canonical-prefixes" |
Lukacs Berki | 763f139 | 2016-01-07 09:29:08 +0000 | [diff] [blame] | 190 | |
Ulf Adams | ee8fcd3 | 2015-07-17 07:52:42 +0000 | [diff] [blame] | 191 | # Make C++ compilation deterministic. Use linkstamping instead of these |
| 192 | # compiler symbols. |
| 193 | unfiltered_cxx_flag: "-Wno-builtin-macro-redefined" |
| 194 | unfiltered_cxx_flag: "-D__DATE__=\"redacted\"" |
| 195 | unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\"" |
| 196 | unfiltered_cxx_flag: "-D__TIME__=\"redacted\"" |
| 197 | |
| 198 | # Security hardening on by default. |
| 199 | # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases. |
| 200 | compiler_flag: "-D_FORTIFY_SOURCE=1" |
| 201 | compiler_flag: "-fstack-protector" |
Ulf Adams | ee8fcd3 | 2015-07-17 07:52:42 +0000 | [diff] [blame] | 202 | |
| 203 | # Enable coloring even if there's no attached terminal. Bazel removes the |
| 204 | # escape sequences if --nocolor is specified. |
| 205 | compiler_flag: "-fcolor-diagnostics" |
| 206 | |
| 207 | # All warnings are enabled. Maybe enable -Werror as well? |
| 208 | compiler_flag: "-Wall" |
| 209 | # Enable a few more warnings that aren't part of -Wall. |
| 210 | compiler_flag: "-Wthread-safety" |
| 211 | compiler_flag: "-Wself-assign" |
| 212 | |
| 213 | # Keep stack frames for debugging, even in opt mode. |
| 214 | compiler_flag: "-fno-omit-frame-pointer" |
| 215 | |
| 216 | # Anticipated future default. |
| 217 | linker_flag: "-no-canonical-prefixes" |
| 218 | |
| 219 | compilation_mode_flags { |
| 220 | mode: DBG |
| 221 | # Enable debug symbols. |
| 222 | compiler_flag: "-g" |
| 223 | } |
| 224 | compilation_mode_flags { |
| 225 | mode: OPT |
| 226 | # No debug symbols. |
| 227 | # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or even generally? |
| 228 | # However, that can't happen here, as it requires special handling in Bazel. |
| 229 | compiler_flag: "-g0" |
| 230 | |
| 231 | # Conservative choice for -O |
| 232 | # -O3 can increase binary size and even slow down the resulting binaries. |
| 233 | # Profile first and / or use FDO if you need better performance than this. |
| 234 | compiler_flag: "-O2" |
| 235 | |
| 236 | # Disable assertions |
| 237 | compiler_flag: "-DNDEBUG" |
| 238 | |
| 239 | # Removal of unused code and data at link time (can this increase binary size in some cases?). |
| 240 | compiler_flag: "-ffunction-sections" |
| 241 | compiler_flag: "-fdata-sections" |
| 242 | } |
Googler | 3dd9cc6 | 2016-02-08 16:00:09 +0000 | [diff] [blame] | 243 | linking_mode_flags { mode: DYNAMIC } |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 244 | } |
| 245 | |
| 246 | toolchain { |
| 247 | abi_version: "local" |
| 248 | abi_libc_version: "local" |
| 249 | builtin_sysroot: "" |
Doug Rabson | 709bc61 | 2015-08-25 14:12:00 +0000 | [diff] [blame] | 250 | compiler: "compiler" |
| 251 | host_system_name: "local" |
| 252 | needsPic: true |
Doug Rabson | 709bc61 | 2015-08-25 14:12:00 +0000 | [diff] [blame] | 253 | supports_incremental_linker: false |
| 254 | supports_fission: false |
| 255 | supports_interface_shared_objects: false |
| 256 | supports_normalizing_ar: false |
| 257 | supports_start_end_lib: false |
Doug Rabson | 709bc61 | 2015-08-25 14:12:00 +0000 | [diff] [blame] | 258 | target_libc: "local" |
| 259 | target_cpu: "freebsd" |
| 260 | target_system_name: "local" |
| 261 | toolchain_identifier: "local_freebsd" |
| 262 | |
| 263 | tool_path { name: "ar" path: "/usr/bin/ar" } |
| 264 | tool_path { name: "compat-ld" path: "/usr/bin/ld" } |
| 265 | tool_path { name: "cpp" path: "/usr/bin/cpp" } |
| 266 | tool_path { name: "dwp" path: "/usr/bin/dwp" } |
| 267 | tool_path { name: "gcc" path: "/usr/bin/clang" } |
| 268 | cxx_flag: "-std=c++0x" |
| 269 | linker_flag: "-lstdc++" |
Doug Rabson | 709bc61 | 2015-08-25 14:12:00 +0000 | [diff] [blame] | 270 | |
| 271 | # TODO(bazel-team): In theory, the path here ought to exactly match the path |
| 272 | # used by gcc. That works because bazel currently doesn't track files at |
| 273 | # absolute locations and has no remote execution, yet. However, this will need |
| 274 | # to be fixed, maybe with auto-detection? |
Piotr Sikora | 2bb61c1 | 2016-10-21 16:00:06 +0000 | [diff] [blame] | 275 | cxx_builtin_include_directory: "/usr/lib/clang" |
Doug Rabson | 709bc61 | 2015-08-25 14:12:00 +0000 | [diff] [blame] | 276 | cxx_builtin_include_directory: "/usr/local/include" |
| 277 | cxx_builtin_include_directory: "/usr/include" |
| 278 | tool_path { name: "gcov" path: "/usr/bin/gcov" } |
| 279 | |
| 280 | # C(++) compiles invoke the compiler (as that is the one knowing where |
| 281 | # to find libraries), but we provide LD so other rules can invoke the linker. |
| 282 | tool_path { name: "ld" path: "/usr/bin/ld" } |
| 283 | |
| 284 | tool_path { name: "nm" path: "/usr/bin/nm" } |
| 285 | tool_path { name: "objcopy" path: "/usr/bin/objcopy" } |
| 286 | objcopy_embed_flag: "-I" |
| 287 | objcopy_embed_flag: "binary" |
| 288 | tool_path { name: "objdump" path: "/usr/bin/objdump" } |
| 289 | tool_path { name: "strip" path: "/usr/bin/strip" } |
| 290 | |
| 291 | # Anticipated future default. |
| 292 | unfiltered_cxx_flag: "-no-canonical-prefixes" |
| 293 | |
| 294 | # Make C++ compilation deterministic. Use linkstamping instead of these |
| 295 | # compiler symbols. |
| 296 | unfiltered_cxx_flag: "-Wno-builtin-macro-redefined" |
| 297 | unfiltered_cxx_flag: "-D__DATE__=\"redacted\"" |
| 298 | unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\"" |
| 299 | unfiltered_cxx_flag: "-D__TIME__=\"redacted\"" |
| 300 | |
| 301 | # Security hardening on by default. |
| 302 | # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases. |
| 303 | # We need to undef it before redefining it as some distributions now have |
| 304 | # it enabled by default. |
| 305 | compiler_flag: "-U_FORTIFY_SOURCE" |
| 306 | compiler_flag: "-D_FORTIFY_SOURCE=1" |
| 307 | compiler_flag: "-fstack-protector" |
Doug Rabson | 709bc61 | 2015-08-25 14:12:00 +0000 | [diff] [blame] | 308 | linker_flag: "-Wl,-z,relro,-z,now" |
| 309 | |
| 310 | # Enable coloring even if there's no attached terminal. Bazel removes the |
| 311 | # escape sequences if --nocolor is specified. This isn't supported by gcc |
| 312 | # on Ubuntu 14.04. |
| 313 | # compiler_flag: "-fcolor-diagnostics" |
| 314 | |
| 315 | # All warnings are enabled. Maybe enable -Werror as well? |
| 316 | compiler_flag: "-Wall" |
| 317 | # Enable a few more warnings that aren't part of -Wall. |
| 318 | #compiler_flag: "-Wunused-but-set-parameter" |
| 319 | # But disable some that are problematic. |
| 320 | #compiler_flag: "-Wno-free-nonheap-object" # has false positives |
| 321 | |
| 322 | # Keep stack frames for debugging, even in opt mode. |
| 323 | compiler_flag: "-fno-omit-frame-pointer" |
| 324 | |
| 325 | # Anticipated future default. |
| 326 | linker_flag: "-no-canonical-prefixes" |
| 327 | # Have gcc return the exit code from ld. |
| 328 | #linker_flag: "-pass-exit-codes" |
| 329 | # Stamp the binary with a unique identifier. |
Doug Rabson | 709bc61 | 2015-08-25 14:12:00 +0000 | [diff] [blame] | 330 | # Gold linker only? Can we enable this by default? |
| 331 | # linker_flag: "-Wl,--warn-execstack" |
| 332 | # linker_flag: "-Wl,--detect-odr-violations" |
| 333 | |
| 334 | compilation_mode_flags { |
| 335 | mode: DBG |
| 336 | # Enable debug symbols. |
| 337 | compiler_flag: "-g" |
| 338 | } |
| 339 | compilation_mode_flags { |
| 340 | mode: OPT |
| 341 | |
| 342 | # No debug symbols. |
| 343 | # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or |
| 344 | # even generally? However, that can't happen here, as it requires special |
| 345 | # handling in Bazel. |
| 346 | compiler_flag: "-g0" |
| 347 | |
| 348 | # Conservative choice for -O |
| 349 | # -O3 can increase binary size and even slow down the resulting binaries. |
| 350 | # Profile first and / or use FDO if you need better performance than this. |
| 351 | compiler_flag: "-O2" |
| 352 | |
| 353 | # Disable assertions |
| 354 | compiler_flag: "-DNDEBUG" |
| 355 | |
| 356 | # Removal of unused code and data at link time (can this increase binary size in some cases?). |
| 357 | compiler_flag: "-ffunction-sections" |
| 358 | compiler_flag: "-fdata-sections" |
| 359 | linker_flag: "-Wl,--gc-sections" |
| 360 | } |
Googler | 3dd9cc6 | 2016-02-08 16:00:09 +0000 | [diff] [blame] | 361 | linking_mode_flags { mode: DYNAMIC } |
Doug Rabson | 709bc61 | 2015-08-25 14:12:00 +0000 | [diff] [blame] | 362 | } |
| 363 | |
| 364 | toolchain { |
| 365 | abi_version: "local" |
| 366 | abi_libc_version: "local" |
| 367 | builtin_sysroot: "" |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 368 | compiler: "windows_mingw" |
| 369 | host_system_name: "local" |
| 370 | needsPic: false |
| 371 | target_libc: "local" |
Dmitry Lomov | 458ccd0 | 2016-02-02 20:30:32 +0000 | [diff] [blame] | 372 | target_cpu: "x64_windows" |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 373 | target_system_name: "local" |
| 374 | toolchain_identifier: "local_windows_mingw" |
| 375 | |
| 376 | tool_path { name: "ar" path: "C:/mingw/bin/ar" } |
| 377 | tool_path { name: "compat-ld" path: "C:/mingw/bin/ld" } |
| 378 | tool_path { name: "cpp" path: "C:/mingw/bin/cpp" } |
| 379 | tool_path { name: "dwp" path: "C:/mingw/bin/dwp" } |
| 380 | tool_path { name: "gcc" path: "C:/mingw/bin/gcc" } |
| 381 | cxx_flag: "-std=c++0x" |
| 382 | # TODO(bazel-team): In theory, the path here ought to exactly match the path |
| 383 | # used by gcc. That works because bazel currently doesn't track files at |
| 384 | # absolute locations and has no remote execution, yet. However, this will need |
| 385 | # to be fixed, maybe with auto-detection? |
| 386 | cxx_builtin_include_directory: "C:/mingw/include" |
| 387 | cxx_builtin_include_directory: "C:/mingw/lib/gcc" |
| 388 | tool_path { name: "gcov" path: "C:/mingw/bin/gcov" } |
| 389 | tool_path { name: "ld" path: "C:/mingw/bin/ld" } |
| 390 | tool_path { name: "nm" path: "C:/mingw/bin/nm" } |
| 391 | tool_path { name: "objcopy" path: "C:/mingw/bin/objcopy" } |
| 392 | objcopy_embed_flag: "-I" |
| 393 | objcopy_embed_flag: "binary" |
| 394 | tool_path { name: "objdump" path: "C:/mingw/bin/objdump" } |
| 395 | tool_path { name: "strip" path: "C:/mingw/bin/strip" } |
Googler | 3dd9cc6 | 2016-02-08 16:00:09 +0000 | [diff] [blame] | 396 | linking_mode_flags { mode: DYNAMIC } |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 397 | } |
| 398 | |
| 399 | toolchain { |
| 400 | abi_version: "local" |
| 401 | abi_libc_version: "local" |
| 402 | builtin_sysroot: "" |
| 403 | compiler: "windows_msys64_mingw64" |
| 404 | host_system_name: "local" |
| 405 | needsPic: false |
| 406 | target_libc: "local" |
Dmitry Lomov | 458ccd0 | 2016-02-02 20:30:32 +0000 | [diff] [blame] | 407 | target_cpu: "x64_windows" |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 408 | target_system_name: "local" |
| 409 | toolchain_identifier: "local_windows_msys64_mingw64" |
| 410 | |
Lukacs Berki | 7a5d59e | 2016-02-24 15:33:46 +0000 | [diff] [blame] | 411 | tool_path { name: "ar" path: "C:/tools/msys64/mingw64/bin/ar" } |
| 412 | tool_path { name: "compat-ld" path: "C:/tools/msys64/mingw64/bin/ld" } |
| 413 | tool_path { name: "cpp" path: "C:/tools/msys64/mingw64/bin/cpp" } |
| 414 | tool_path { name: "dwp" path: "C:/tools/msys64/mingw64/bin/dwp" } |
| 415 | tool_path { name: "gcc" path: "C:/tools/msys64/mingw64/bin/gcc" } |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 416 | cxx_flag: "-std=c++0x" |
| 417 | # TODO(bazel-team): In theory, the path here ought to exactly match the path |
| 418 | # used by gcc. That works because bazel currently doesn't track files at |
| 419 | # absolute locations and has no remote execution, yet. However, this will need |
| 420 | # to be fixed, maybe with auto-detection? |
Lukacs Berki | 7a5d59e | 2016-02-24 15:33:46 +0000 | [diff] [blame] | 421 | cxx_builtin_include_directory: "C:/tools/msys64/mingw64/x86_64-w64-mingw32/include" |
| 422 | tool_path { name: "gcov" path: "C:/tools/msys64/mingw64/bin/gcov" } |
| 423 | tool_path { name: "ld" path: "C:/tools/msys64/mingw64/bin/ld" } |
| 424 | tool_path { name: "nm" path: "C:/tools/msys64/mingw64/bin/nm" } |
| 425 | tool_path { name: "objcopy" path: "C:/tools/msys64/mingw64/bin/objcopy" } |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 426 | objcopy_embed_flag: "-I" |
| 427 | objcopy_embed_flag: "binary" |
Lukacs Berki | 7a5d59e | 2016-02-24 15:33:46 +0000 | [diff] [blame] | 428 | tool_path { name: "objdump" path: "C:/tools/msys64/mingw64/bin/objdump" } |
| 429 | tool_path { name: "strip" path: "C:/tools/msys64/mingw64/bin/strip" } |
Googler | 3dd9cc6 | 2016-02-08 16:00:09 +0000 | [diff] [blame] | 430 | linking_mode_flags { mode: DYNAMIC } |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 431 | } |
| 432 | |
| 433 | toolchain { |
| 434 | abi_version: "local" |
| 435 | abi_libc_version: "local" |
| 436 | builtin_sysroot: "" |
| 437 | compiler: "windows_clang" |
| 438 | host_system_name: "local" |
| 439 | needsPic: false |
| 440 | target_libc: "local" |
Dmitry Lomov | 458ccd0 | 2016-02-02 20:30:32 +0000 | [diff] [blame] | 441 | target_cpu: "x64_windows" |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 442 | target_system_name: "local" |
| 443 | toolchain_identifier: "local_windows_clang" |
| 444 | |
| 445 | tool_path { name: "ar" path: "C:/mingw/bin/ar" } |
| 446 | tool_path { name: "compat-ld" path: "C:/Program Files (x86)/LLVM/bin/ld" } |
| 447 | tool_path { name: "cpp" path: "C:/Program Files (x86)/LLVM/bin/cpp" } |
| 448 | tool_path { name: "dwp" path: "C:/Program Files (x86)/LLVM/bin/dwp" } |
| 449 | tool_path { name: "gcc" path: "C:/Program Files (x86)/LLVM/bin/clang" } |
| 450 | cxx_flag: "-std=c++0x" |
| 451 | # TODO(bazel-team): In theory, the path here ought to exactly match the path |
| 452 | # used by gcc. That works because bazel currently doesn't track files at |
| 453 | # absolute locations and has no remote execution, yet. However, this will need |
| 454 | # to be fixed, maybe with auto-detection? |
| 455 | cxx_builtin_include_directory: "/usr/lib/gcc/" |
| 456 | cxx_builtin_include_directory: "/usr/local/include" |
| 457 | cxx_builtin_include_directory: "/usr/include" |
| 458 | tool_path { name: "gcov" path: "C:/Program Files (x86)/LLVM/bin/gcov" } |
| 459 | tool_path { name: "ld" path: "C:/Program Files (x86)/LLVM/bin/ld" } |
| 460 | tool_path { name: "nm" path: "C:/Program Files (x86)/LLVM/bin/nm" } |
| 461 | tool_path { name: "objcopy" path: "C:/Program Files (x86)/LLVM/bin/objcopy" } |
| 462 | objcopy_embed_flag: "-I" |
| 463 | objcopy_embed_flag: "binary" |
| 464 | tool_path { name: "objdump" path: "C:/Program Files (x86)/LLVM/bin/objdump" } |
| 465 | tool_path { name: "strip" path: "C:/Program Files (x86)/LLVM/bin/strip" } |
Googler | 3dd9cc6 | 2016-02-08 16:00:09 +0000 | [diff] [blame] | 466 | linking_mode_flags { mode: DYNAMIC } |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 467 | } |
Dmitry Lomov | 458ccd0 | 2016-02-02 20:30:32 +0000 | [diff] [blame] | 468 | |
| 469 | toolchain { |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 470 | abi_version: "local" |
| 471 | abi_libc_version: "local" |
| 472 | builtin_sysroot: "" |
| 473 | compiler: "windows_msys64" |
| 474 | host_system_name: "local" |
| 475 | needsPic: false |
| 476 | target_libc: "local" |
| 477 | target_cpu: "x64_windows" |
| 478 | target_system_name: "local" |
| 479 | toolchain_identifier: "local_windows_msys64" |
Dmitry Lomov | 458ccd0 | 2016-02-02 20:30:32 +0000 | [diff] [blame] | 480 | |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 481 | tool_path { name: "ar" path: "C:/tools/msys64/usr/bin/ar" } |
| 482 | tool_path { name: "compat-ld" path: "C:/tools/msys64/usr/bin/ld" } |
| 483 | tool_path { name: "cpp" path: "C:/tools/msys64/usr/bin/cpp" } |
| 484 | tool_path { name: "dwp" path: "C:/tools/msys64/usr/bin/dwp" } |
| 485 | # Use gcc instead of g++ so that C will compile correctly. |
| 486 | tool_path { name: "gcc" path: "C:/tools/msys64/usr/bin/gcc" } |
| 487 | cxx_flag: "-std=gnu++0x" |
| 488 | linker_flag: "-lstdc++" |
| 489 | # TODO(bazel-team): In theory, the path here ought to exactly match the path |
| 490 | # used by gcc. That works because bazel currently doesn't track files at |
| 491 | # absolute locations and has no remote execution, yet. However, this will need |
| 492 | # to be fixed, maybe with auto-detection? |
| 493 | cxx_builtin_include_directory: "C:/tools/msys64/" |
| 494 | cxx_builtin_include_directory: "/usr/" |
| 495 | tool_path { name: "gcov" path: "C:/tools/msys64/usr/bin/gcov" } |
| 496 | tool_path { name: "ld" path: "C:/tools/msys64/usr/bin/ld" } |
| 497 | tool_path { name: "nm" path: "C:/tools/msys64/usr/bin/nm" } |
| 498 | tool_path { name: "objcopy" path: "C:/tools/msys64/usr/bin/objcopy" } |
| 499 | objcopy_embed_flag: "-I" |
| 500 | objcopy_embed_flag: "binary" |
| 501 | tool_path { name: "objdump" path: "C:/tools/msys64/usr/bin/objdump" } |
| 502 | tool_path { name: "strip" path: "C:/tools/msys64/usr/bin/strip" } |
| 503 | linking_mode_flags { mode: DYNAMIC } |
Dmitry Lomov | 458ccd0 | 2016-02-02 20:30:32 +0000 | [diff] [blame] | 504 | } |
Yun Peng | 114ead3 | 2016-04-07 16:39:19 +0000 | [diff] [blame] | 505 | |
| 506 | toolchain { |
| 507 | toolchain_identifier: "vc_14_0_x64" |
| 508 | host_system_name: "local" |
| 509 | target_system_name: "local" |
| 510 | |
| 511 | abi_version: "local" |
| 512 | abi_libc_version: "local" |
Yun Peng | 57be344 | 2016-04-25 14:08:41 +0000 | [diff] [blame] | 513 | target_cpu: "x64_windows_msvc" |
Yun Peng | 114ead3 | 2016-04-07 16:39:19 +0000 | [diff] [blame] | 514 | compiler: "cl" |
| 515 | target_libc: "msvcrt140" |
| 516 | default_python_version: "python2.7" |
| 517 | cxx_builtin_include_directory: "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/INCLUDE" |
Yun Peng | e52ebec | 2016-05-10 08:56:38 +0000 | [diff] [blame] | 518 | cxx_builtin_include_directory: "C:/Program Files (x86)/Windows Kits/10/include/" |
| 519 | cxx_builtin_include_directory: "C:/Program Files (x86)/Windows Kits/8.1/include/" |
| 520 | cxx_builtin_include_directory: "C:/Program Files (x86)/GnuWin32/include/" |
| 521 | cxx_builtin_include_directory: "C:/python_27_amd64/files/include" |
Yun Peng | 114ead3 | 2016-04-07 16:39:19 +0000 | [diff] [blame] | 522 | tool_path { |
| 523 | name: "ar" |
| 524 | path: "wrapper/bin/msvc_link.bat" |
| 525 | } |
| 526 | tool_path { |
| 527 | name: "cpp" |
| 528 | path: "wrapper/bin/msvc_cl.bat" |
| 529 | } |
| 530 | tool_path { |
| 531 | name: "gcc" |
| 532 | path: "wrapper/bin/msvc_cl.bat" |
| 533 | } |
| 534 | tool_path { |
| 535 | name: "gcov" |
| 536 | path: "wrapper/bin/msvc_nop.bat" |
| 537 | } |
| 538 | tool_path { |
| 539 | name: "ld" |
| 540 | path: "wrapper/bin/msvc_link.bat" |
| 541 | } |
| 542 | tool_path { |
| 543 | name: "nm" |
| 544 | path: "wrapper/bin/msvc_nop.bat" |
| 545 | } |
| 546 | tool_path { |
| 547 | name: "objcopy" |
| 548 | path: "wrapper/bin/msvc_nop.bat" |
| 549 | } |
| 550 | tool_path { |
| 551 | name: "objdump" |
| 552 | path: "wrapper/bin/msvc_nop.bat" |
| 553 | } |
| 554 | tool_path { |
| 555 | name: "strip" |
| 556 | path: "wrapper/bin/msvc_nop.bat" |
| 557 | } |
Yun Peng | 114ead3 | 2016-04-07 16:39:19 +0000 | [diff] [blame] | 558 | supports_start_end_lib: false |
| 559 | supports_interface_shared_objects: false |
| 560 | supports_incremental_linker: false |
| 561 | supports_normalizing_ar: true |
| 562 | needsPic: false |
| 563 | |
| 564 | compiler_flag: "-m64" |
Yun Peng | e52ebec | 2016-05-10 08:56:38 +0000 | [diff] [blame] | 565 | compiler_flag: "/D__inline__=__inline" |
Yun Peng | 114ead3 | 2016-04-07 16:39:19 +0000 | [diff] [blame] | 566 | # TODO(pcloudy): Review those flags below, they should be defined by cl.exe |
Yun Peng | 114ead3 | 2016-04-07 16:39:19 +0000 | [diff] [blame] | 567 | compiler_flag: "/DCOMPILER_MSVC" |
| 568 | |
| 569 | # Don't pollute with GDI macros in windows.h. |
| 570 | compiler_flag: "/DNOGDI" |
| 571 | # Don't define min/max macros in windows.h. |
| 572 | compiler_flag: "/DNOMINMAX" |
| 573 | compiler_flag: "/DPRAGMA_SUPPORTED" |
| 574 | # Platform defines. |
pcloudy | 0bef1f2 | 2018-10-05 00:23:50 -0700 | [diff] [blame] | 575 | compiler_flag: "/D_WIN32_WINNT=0x0601" |
Yun Peng | 114ead3 | 2016-04-07 16:39:19 +0000 | [diff] [blame] | 576 | # Turn off warning messages. |
| 577 | compiler_flag: "/D_CRT_SECURE_NO_DEPRECATE" |
| 578 | compiler_flag: "/D_CRT_SECURE_NO_WARNINGS" |
| 579 | compiler_flag: "/D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS" |
| 580 | # Use math constants (M_PI, etc.) from the math library |
| 581 | compiler_flag: "/D_USE_MATH_DEFINES" |
Yun Peng | 114ead3 | 2016-04-07 16:39:19 +0000 | [diff] [blame] | 582 | |
| 583 | # Useful options to have on for compilation. |
| 584 | # Suppress startup banner. |
| 585 | compiler_flag: "/nologo" |
Yun Peng | 114ead3 | 2016-04-07 16:39:19 +0000 | [diff] [blame] | 586 | # Increase the capacity of object files to 2^32 sections. |
| 587 | compiler_flag: "/bigobj" |
| 588 | # Allocate 500MB for precomputed headers. |
| 589 | compiler_flag: "/Zm500" |
| 590 | # Use unsigned char by default. |
| 591 | compiler_flag: "/J" |
| 592 | # Use function level linking. |
| 593 | compiler_flag: "/Gy" |
| 594 | # Use string pooling. |
| 595 | compiler_flag: "/GF" |
| 596 | # Warning level 3 (could possibly go to 4 in the future). |
| 597 | compiler_flag: "/W3" |
| 598 | # Catch both asynchronous (structured) and synchronous (C++) exceptions. |
| 599 | compiler_flag: "/EHsc" |
| 600 | |
| 601 | # Globally disabled warnings. |
| 602 | # Don't warn about elements of array being be default initialized. |
| 603 | compiler_flag: "/wd4351" |
| 604 | # Don't warn about no matching delete found. |
| 605 | compiler_flag: "/wd4291" |
| 606 | # Don't warn about diamond inheritance patterns. |
| 607 | compiler_flag: "/wd4250" |
| 608 | # Don't warn about insecure functions (e.g. non _s functions). |
| 609 | compiler_flag: "/wd4996" |
| 610 | |
| 611 | linker_flag: "-m64" |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 612 | # Stop passing -frandom-seed option |
| 613 | feature { |
| 614 | name: 'random_seed' |
| 615 | } |
| 616 | |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 617 | action_config { |
| 618 | config_name: 'c-compile' |
| 619 | action_name: 'c-compile' |
| 620 | tool { |
| 621 | tool_path: 'wrapper/bin/msvc_cl.bat' |
| 622 | } |
hlopko | 6f1a2ec | 2018-05-16 12:32:32 -0700 | [diff] [blame] | 623 | implies: 'compiler_input_flags' |
| 624 | implies: 'compiler_output_flags' |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 625 | implies: 'legacy_compile_flags' |
| 626 | implies: 'user_compile_flags' |
hlopko | b05bff6 | 2017-09-12 10:51:44 +0200 | [diff] [blame] | 627 | implies: 'sysroot' |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 628 | implies: 'unfiltered_compile_flags' |
| 629 | } |
| 630 | |
| 631 | action_config { |
| 632 | config_name: 'c++-compile' |
| 633 | action_name: 'c++-compile' |
| 634 | tool { |
| 635 | tool_path: 'wrapper/bin/msvc_cl.bat' |
| 636 | } |
hlopko | 6f1a2ec | 2018-05-16 12:32:32 -0700 | [diff] [blame] | 637 | implies: 'compiler_input_flags' |
| 638 | implies: 'compiler_output_flags' |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 639 | implies: 'legacy_compile_flags' |
| 640 | implies: 'user_compile_flags' |
hlopko | b05bff6 | 2017-09-12 10:51:44 +0200 | [diff] [blame] | 641 | implies: 'sysroot' |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 642 | implies: 'unfiltered_compile_flags' |
| 643 | } |
| 644 | |
| 645 | # TODO(b/65151735): Remove legacy_compile_flags feature when legacy fields are |
| 646 | # not used in this crosstool |
| 647 | feature { |
| 648 | name: 'legacy_compile_flags' |
| 649 | flag_set { |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 650 | action: 'assemble' |
| 651 | action: 'preprocess-assemble' |
| 652 | action: 'c-compile' |
| 653 | action: 'c++-compile' |
| 654 | action: 'c++-header-parsing' |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 655 | action: 'c++-module-compile' |
| 656 | action: 'c++-module-codegen' |
| 657 | flag_group { |
hlopko | 3ce44b6 | 2019-01-02 08:02:29 -0800 | [diff] [blame] | 658 | expand_if_all_available: 'legacy_compile_flags' |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 659 | iterate_over: 'legacy_compile_flags' |
| 660 | flag: '%{legacy_compile_flags}' |
| 661 | } |
| 662 | } |
| 663 | } |
Yun Peng | 114ead3 | 2016-04-07 16:39:19 +0000 | [diff] [blame] | 664 | |
Yun Peng | 6b6ff76 | 2016-06-30 14:19:41 +0000 | [diff] [blame] | 665 | feature { |
| 666 | name: 'include_paths' |
| 667 | flag_set { |
| 668 | action: 'preprocess-assemble' |
| 669 | action: 'c-compile' |
| 670 | action: 'c++-compile' |
| 671 | action: 'c++-header-parsing' |
Yun Peng | 6b6ff76 | 2016-06-30 14:19:41 +0000 | [diff] [blame] | 672 | action: 'c++-module-compile' |
| 673 | flag_group { |
hlopko | ec41b8c | 2017-07-04 04:31:11 -0400 | [diff] [blame] | 674 | iterate_over: 'quote_include_paths' |
Yun Peng | 6b6ff76 | 2016-06-30 14:19:41 +0000 | [diff] [blame] | 675 | flag: '/I%{quote_include_paths}' |
| 676 | } |
| 677 | flag_group { |
hlopko | ec41b8c | 2017-07-04 04:31:11 -0400 | [diff] [blame] | 678 | iterate_over: 'include_paths' |
Yun Peng | 6b6ff76 | 2016-06-30 14:19:41 +0000 | [diff] [blame] | 679 | flag: '/I%{include_paths}' |
| 680 | } |
| 681 | flag_group { |
hlopko | ec41b8c | 2017-07-04 04:31:11 -0400 | [diff] [blame] | 682 | iterate_over: 'system_include_paths' |
Yun Peng | 6b6ff76 | 2016-06-30 14:19:41 +0000 | [diff] [blame] | 683 | flag: '/I%{system_include_paths}' |
| 684 | } |
| 685 | } |
| 686 | } |
| 687 | |
| 688 | feature { |
| 689 | name: 'dependency_file' |
| 690 | flag_set { |
| 691 | action: 'assemble' |
| 692 | action: 'preprocess-assemble' |
| 693 | action: 'c-compile' |
| 694 | action: 'c++-compile' |
| 695 | action: 'c++-module-compile' |
Yun Peng | 6b6ff76 | 2016-06-30 14:19:41 +0000 | [diff] [blame] | 696 | action: 'c++-header-parsing' |
Yun Peng | 6b6ff76 | 2016-06-30 14:19:41 +0000 | [diff] [blame] | 697 | flag_group { |
hlopko | 3ce44b6 | 2019-01-02 08:02:29 -0800 | [diff] [blame] | 698 | expand_if_all_available: 'dependency_file' |
Yun Peng | 6b6ff76 | 2016-06-30 14:19:41 +0000 | [diff] [blame] | 699 | flag: '/DEPENDENCY_FILE' |
| 700 | flag: '%{dependency_file}' |
| 701 | } |
| 702 | } |
| 703 | } |
| 704 | |
Yun Peng | 6b6ff76 | 2016-06-30 14:19:41 +0000 | [diff] [blame] | 705 | feature { |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 706 | name: 'user_compile_flags' |
Yun Peng | 6b6ff76 | 2016-06-30 14:19:41 +0000 | [diff] [blame] | 707 | flag_set { |
hlopko | 8328dc9 | 2017-09-06 13:34:00 +0200 | [diff] [blame] | 708 | action: 'assemble' |
| 709 | action: 'preprocess-assemble' |
| 710 | action: 'c-compile' |
| 711 | action: 'c++-compile' |
| 712 | action: 'c++-header-parsing' |
hlopko | 8328dc9 | 2017-09-06 13:34:00 +0200 | [diff] [blame] | 713 | action: 'c++-module-compile' |
| 714 | action: 'c++-module-codegen' |
| 715 | flag_group { |
hlopko | 3ce44b6 | 2019-01-02 08:02:29 -0800 | [diff] [blame] | 716 | expand_if_all_available: 'user_compile_flags' |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 717 | iterate_over: 'user_compile_flags' |
| 718 | flag: '%{user_compile_flags}' |
| 719 | } |
| 720 | } |
| 721 | } |
| 722 | |
| 723 | feature { |
hlopko | b05bff6 | 2017-09-12 10:51:44 +0200 | [diff] [blame] | 724 | name: 'sysroot' |
| 725 | flag_set { |
hlopko | b05bff6 | 2017-09-12 10:51:44 +0200 | [diff] [blame] | 726 | action: 'assemble' |
| 727 | action: 'preprocess-assemble' |
| 728 | action: 'c-compile' |
| 729 | action: 'c++-compile' |
| 730 | action: 'c++-header-parsing' |
hlopko | b05bff6 | 2017-09-12 10:51:44 +0200 | [diff] [blame] | 731 | action: 'c++-module-compile' |
| 732 | action: 'c++-module-codegen' |
| 733 | action: 'c++-link-executable' |
| 734 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame] | 735 | action: 'c++-link-nodeps-dynamic-library' |
hlopko | b05bff6 | 2017-09-12 10:51:44 +0200 | [diff] [blame] | 736 | flag_group { |
hlopko | 3ce44b6 | 2019-01-02 08:02:29 -0800 | [diff] [blame] | 737 | expand_if_all_available: 'sysroot' |
hlopko | b05bff6 | 2017-09-12 10:51:44 +0200 | [diff] [blame] | 738 | iterate_over: 'sysroot' |
| 739 | flag: '--sysroot=%{sysroot}' |
| 740 | } |
| 741 | } |
| 742 | } |
| 743 | |
| 744 | feature { |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 745 | name: 'unfiltered_compile_flags' |
| 746 | flag_set { |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 747 | action: 'assemble' |
| 748 | action: 'preprocess-assemble' |
| 749 | action: 'c-compile' |
| 750 | action: 'c++-compile' |
| 751 | action: 'c++-header-parsing' |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 752 | action: 'c++-module-compile' |
| 753 | action: 'c++-module-codegen' |
| 754 | flag_group { |
hlopko | 3ce44b6 | 2019-01-02 08:02:29 -0800 | [diff] [blame] | 755 | expand_if_all_available: 'unfiltered_compile_flags' |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 756 | iterate_over: 'unfiltered_compile_flags' |
| 757 | flag: '%{unfiltered_compile_flags}' |
hlopko | 646cfd8 | 2017-08-01 22:26:37 +0200 | [diff] [blame] | 758 | } |
| 759 | } |
Yun Peng | 6b6ff76 | 2016-06-30 14:19:41 +0000 | [diff] [blame] | 760 | } |
| 761 | |
hlopko | 6f1a2ec | 2018-05-16 12:32:32 -0700 | [diff] [blame] | 762 | feature { |
| 763 | name: 'compiler_output_flags' |
| 764 | flag_set { |
| 765 | action: 'assemble' |
| 766 | flag_group { |
| 767 | expand_if_all_available: 'output_file' |
| 768 | expand_if_none_available: 'output_assembly_file' |
| 769 | expand_if_none_available: 'output_preprocess_file' |
| 770 | flag: '/Fo%{output_file}' |
| 771 | flag: '/Zi' |
| 772 | } |
| 773 | } |
| 774 | flag_set { |
| 775 | action: 'preprocess-assemble' |
| 776 | action: 'c-compile' |
| 777 | action: 'c++-compile' |
| 778 | action: 'c++-header-parsing' |
hlopko | 6f1a2ec | 2018-05-16 12:32:32 -0700 | [diff] [blame] | 779 | action: 'c++-module-compile' |
| 780 | action: 'c++-module-codegen' |
| 781 | flag_group { |
| 782 | expand_if_all_available: 'output_file' |
| 783 | expand_if_none_available: 'output_assembly_file' |
| 784 | expand_if_none_available: 'output_preprocess_file' |
| 785 | flag: '/Fo%{output_file}' |
| 786 | } |
| 787 | flag_group { |
| 788 | expand_if_all_available: 'output_file' |
| 789 | expand_if_all_available: 'output_assembly_file' |
| 790 | flag: '/Fa%{output_file}' |
| 791 | } |
| 792 | flag_group { |
| 793 | expand_if_all_available: 'output_file' |
| 794 | expand_if_all_available: 'output_preprocess_file' |
| 795 | flag: '/P' |
| 796 | flag: '/Fi%{output_file}' |
| 797 | } |
| 798 | } |
| 799 | } |
| 800 | |
| 801 | feature { |
| 802 | name: 'compiler_input_flags' |
| 803 | flag_set { |
| 804 | action: 'assemble' |
| 805 | action: 'preprocess-assemble' |
| 806 | action: 'c-compile' |
| 807 | action: 'c++-compile' |
| 808 | action: 'c++-header-parsing' |
hlopko | 6f1a2ec | 2018-05-16 12:32:32 -0700 | [diff] [blame] | 809 | action: 'c++-module-compile' |
| 810 | action: 'c++-module-codegen' |
| 811 | flag_group { |
| 812 | expand_if_all_available: 'source_file' |
| 813 | flag: '/c' |
| 814 | flag: '%{source_file}' |
| 815 | } |
| 816 | } |
| 817 | } |
| 818 | |
Yun Peng | 114ead3 | 2016-04-07 16:39:19 +0000 | [diff] [blame] | 819 | compilation_mode_flags { |
| 820 | mode: DBG |
| 821 | compiler_flag: "/DDEBUG=1" |
| 822 | # This will signal the wrapper that we are doing a debug build, which sets |
| 823 | # some internal state of the toolchain wrapper. It is intentionally a "-" |
| 824 | # flag to make this very obvious. |
| 825 | compiler_flag: "-g" |
| 826 | compiler_flag: "/Od" |
| 827 | compiler_flag: "-Xcompilation-mode=dbg" |
| 828 | } |
| 829 | |
| 830 | compilation_mode_flags { |
| 831 | mode: FASTBUILD |
| 832 | compiler_flag: "/DNDEBUG" |
| 833 | compiler_flag: "/Od" |
| 834 | compiler_flag: "-Xcompilation-mode=fastbuild" |
| 835 | } |
| 836 | |
| 837 | compilation_mode_flags { |
| 838 | mode: OPT |
| 839 | compiler_flag: "/DNDEBUG" |
| 840 | compiler_flag: "/O2" |
| 841 | compiler_flag: "-Xcompilation-mode=opt" |
| 842 | } |
| 843 | } |