xingao | 03d52e2 | 2017-11-21 08:20:29 -0800 | [diff] [blame] | 1 | # Copyright 2016 The Bazel Authors. All rights reserved. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
Damien Martin-Guillerez | 8fa5ae6 | 2016-03-02 16:24:13 +0000 | [diff] [blame] | 15 | major_version: "local" |
| 16 | minor_version: "" |
| 17 | default_target_cpu: "same_as_host" |
| 18 | |
| 19 | default_toolchain { |
| 20 | cpu: "%{cpu}" |
Yun Peng | c77eac9 | 2017-03-08 13:54:06 +0000 | [diff] [blame] | 21 | toolchain_identifier: "%{default_toolchain_name}" |
Damien Martin-Guillerez | 8fa5ae6 | 2016-03-02 16:24:13 +0000 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | default_toolchain { |
| 25 | cpu: "armeabi-v7a" |
| 26 | toolchain_identifier: "stub_armeabi-v7a" |
| 27 | } |
| 28 | |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 29 | default_toolchain { |
Yun Peng | 1f61472 | 2017-10-16 19:26:06 +0200 | [diff] [blame] | 30 | cpu: "x64_windows" |
| 31 | toolchain_identifier: "msvc_x64" |
| 32 | } |
| 33 | |
| 34 | default_toolchain { |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 35 | cpu: "x64_windows_msvc" |
Yun Peng | c77eac9 | 2017-03-08 13:54:06 +0000 | [diff] [blame] | 36 | toolchain_identifier: "msvc_x64" |
| 37 | } |
| 38 | |
| 39 | default_toolchain { |
| 40 | cpu: "x64_windows_msys" |
| 41 | toolchain_identifier: "msys_x64" |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 42 | } |
| 43 | |
namrata-ibm | 155bd64 | 2016-10-11 09:59:27 +0000 | [diff] [blame] | 44 | default_toolchain { |
| 45 | cpu: "s390x" |
Nicolas Lopez | bcbdb87 | 2017-03-28 08:08:50 +0000 | [diff] [blame] | 46 | toolchain_identifier: "%{toolchain_name}" |
namrata-ibm | 155bd64 | 2016-10-11 09:59:27 +0000 | [diff] [blame] | 47 | } |
| 48 | |
Cal Peyser | f026e14 | 2016-12-19 18:16:26 +0000 | [diff] [blame] | 49 | default_toolchain { |
| 50 | cpu: "ios_x86_64" |
| 51 | toolchain_identifier: "ios_x86_64" |
| 52 | } |
| 53 | |
Damien Martin-Guillerez | 8fa5ae6 | 2016-03-02 16:24:13 +0000 | [diff] [blame] | 54 | # Android tooling requires a default toolchain for the armeabi-v7a cpu. |
| 55 | toolchain { |
| 56 | abi_version: "armeabi-v7a" |
| 57 | abi_libc_version: "armeabi-v7a" |
| 58 | builtin_sysroot: "" |
| 59 | compiler: "compiler" |
| 60 | host_system_name: "armeabi-v7a" |
| 61 | needsPic: true |
| 62 | supports_gold_linker: false |
| 63 | supports_incremental_linker: false |
| 64 | supports_fission: false |
| 65 | supports_interface_shared_objects: false |
| 66 | supports_normalizing_ar: false |
| 67 | supports_start_end_lib: false |
Damien Martin-Guillerez | 8fa5ae6 | 2016-03-02 16:24:13 +0000 | [diff] [blame] | 68 | target_libc: "armeabi-v7a" |
| 69 | target_cpu: "armeabi-v7a" |
| 70 | target_system_name: "armeabi-v7a" |
| 71 | toolchain_identifier: "stub_armeabi-v7a" |
| 72 | |
| 73 | tool_path { name: "ar" path: "/bin/false" } |
| 74 | tool_path { name: "compat-ld" path: "/bin/false" } |
| 75 | tool_path { name: "cpp" path: "/bin/false" } |
| 76 | tool_path { name: "dwp" path: "/bin/false" } |
| 77 | tool_path { name: "gcc" path: "/bin/false" } |
| 78 | tool_path { name: "gcov" path: "/bin/false" } |
| 79 | tool_path { name: "ld" path: "/bin/false" } |
| 80 | |
| 81 | tool_path { name: "nm" path: "/bin/false" } |
| 82 | tool_path { name: "objcopy" path: "/bin/false" } |
| 83 | tool_path { name: "objdump" path: "/bin/false" } |
| 84 | tool_path { name: "strip" path: "/bin/false" } |
| 85 | linking_mode_flags { mode: DYNAMIC } |
| 86 | } |
| 87 | |
| 88 | toolchain { |
Cal Peyser | f026e14 | 2016-12-19 18:16:26 +0000 | [diff] [blame] | 89 | toolchain_identifier: "ios_x86_64" |
| 90 | host_system_name: "x86_64-apple-macosx" |
| 91 | target_system_name: "x86_64-apple-ios" |
| 92 | target_cpu: "ios_x86_64" |
| 93 | target_libc: "ios" |
| 94 | compiler: "compiler" |
| 95 | abi_version: "local" |
| 96 | abi_libc_version: "local" |
| 97 | supports_gold_linker: false |
| 98 | supports_incremental_linker: false |
| 99 | supports_fission: false |
| 100 | supports_interface_shared_objects: false |
| 101 | supports_normalizing_ar: false |
| 102 | supports_start_end_lib: false |
| 103 | |
| 104 | tool_path { name: "ar" path: "/bin/false" } |
| 105 | tool_path { name: "compat-ld" path: "/bin/false" } |
| 106 | tool_path { name: "cpp" path: "/bin/false" } |
| 107 | tool_path { name: "dwp" path: "/bin/false" } |
| 108 | tool_path { name: "gcc" path: "/bin/false" } |
| 109 | tool_path { name: "gcov" path: "/bin/false" } |
| 110 | tool_path { name: "ld" path: "/bin/false" } |
| 111 | |
| 112 | tool_path { name: "nm" path: "/bin/false" } |
| 113 | tool_path { name: "objcopy" path: "/bin/false" } |
| 114 | tool_path { name: "objdump" path: "/bin/false" } |
| 115 | tool_path { name: "strip" path: "/bin/false" } |
| 116 | linking_mode_flags { mode: DYNAMIC } |
| 117 | } |
| 118 | |
| 119 | toolchain { |
Yun Peng | c77eac9 | 2017-03-08 13:54:06 +0000 | [diff] [blame] | 120 | toolchain_identifier: "%{toolchain_name}" |
Damien Martin-Guillerez | 8fa5ae6 | 2016-03-02 16:24:13 +0000 | [diff] [blame] | 121 | %{content} |
| 122 | |
| 123 | compilation_mode_flags { |
| 124 | mode: DBG |
| 125 | %{dbg_content} |
| 126 | } |
| 127 | compilation_mode_flags { |
| 128 | mode: OPT |
| 129 | %{opt_content} |
| 130 | } |
| 131 | linking_mode_flags { mode: DYNAMIC } |
Marcel Hlopko | 71c72c1 | 2017-02-23 14:10:31 +0000 | [diff] [blame] | 132 | |
| 133 | %{coverage} |
Benjamin Peterson | b9e1c8a | 2017-12-05 06:27:26 -0800 | [diff] [blame] | 134 | |
| 135 | feature { |
| 136 | name: 'fdo_optimize' |
| 137 | provides: 'profile' |
| 138 | flag_set { |
| 139 | action: 'c-compile' |
| 140 | action: 'c++-compile' |
| 141 | expand_if_all_available: 'fdo_profile_path' |
| 142 | flag_group { |
| 143 | flag: '-fprofile-use=%{fdo_profile_path}' |
| 144 | flag: '-fprofile-correction', |
| 145 | } |
| 146 | } |
| 147 | } |
Damien Martin-Guillerez | 8fa5ae6 | 2016-03-02 16:24:13 +0000 | [diff] [blame] | 148 | } |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 149 | |
| 150 | toolchain { |
Yun Peng | e9f4090 | 2018-01-03 09:20:27 -0800 | [diff] [blame] | 151 | toolchain_identifier: "msys_x64_mingw" |
| 152 | abi_version: "local" |
| 153 | abi_libc_version: "local" |
| 154 | builtin_sysroot: "" |
| 155 | compiler: "mingw-gcc" |
| 156 | host_system_name: "local" |
| 157 | needsPic: false |
| 158 | target_libc: "mingw" |
| 159 | target_cpu: "x64_windows" |
| 160 | target_system_name: "local" |
| 161 | |
| 162 | %{msys_x64_mingw_content} |
| 163 | |
| 164 | linking_mode_flags { mode: DYNAMIC } |
| 165 | } |
| 166 | |
| 167 | toolchain { |
Yun Peng | c77eac9 | 2017-03-08 13:54:06 +0000 | [diff] [blame] | 168 | toolchain_identifier: "msvc_x64" |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 169 | host_system_name: "local" |
| 170 | target_system_name: "local" |
| 171 | |
| 172 | abi_version: "local" |
| 173 | abi_libc_version: "local" |
Yun Peng | c77eac9 | 2017-03-08 13:54:06 +0000 | [diff] [blame] | 174 | target_cpu: "x64_windows" |
Yun Peng | e9f4090 | 2018-01-03 09:20:27 -0800 | [diff] [blame] | 175 | compiler: "msvc-cl" |
| 176 | target_libc: "msvcrt" |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 177 | default_python_version: "python2.7" |
| 178 | |
| 179 | %{cxx_builtin_include_directory} |
| 180 | |
| 181 | tool_path { |
| 182 | name: "ar" |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 183 | path: "%{msvc_lib_path}" |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 184 | } |
| 185 | tool_path { |
Seth Greenstein | ae760d2 | 2017-11-17 02:20:06 -0800 | [diff] [blame] | 186 | name: "ml" |
| 187 | path: "%{msvc_ml_path}" |
| 188 | } |
| 189 | tool_path { |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 190 | name: "cpp" |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 191 | path: "%{msvc_cl_path}" |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 192 | } |
| 193 | tool_path { |
| 194 | name: "gcc" |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 195 | path: "%{msvc_cl_path}" |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 196 | } |
| 197 | tool_path { |
| 198 | name: "gcov" |
| 199 | path: "wrapper/bin/msvc_nop.bat" |
| 200 | } |
| 201 | tool_path { |
| 202 | name: "ld" |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 203 | path: "%{msvc_link_path}" |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 204 | } |
| 205 | tool_path { |
| 206 | name: "nm" |
| 207 | path: "wrapper/bin/msvc_nop.bat" |
| 208 | } |
| 209 | tool_path { |
| 210 | name: "objcopy" |
| 211 | path: "wrapper/bin/msvc_nop.bat" |
| 212 | } |
| 213 | tool_path { |
| 214 | name: "objdump" |
| 215 | path: "wrapper/bin/msvc_nop.bat" |
| 216 | } |
| 217 | tool_path { |
| 218 | name: "strip" |
| 219 | path: "wrapper/bin/msvc_nop.bat" |
| 220 | } |
| 221 | supports_gold_linker: false |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 222 | supports_start_end_lib: false |
Yun Peng | 394211b | 2017-09-15 15:59:14 +0200 | [diff] [blame] | 223 | supports_interface_shared_objects: true |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 224 | supports_incremental_linker: false |
| 225 | supports_normalizing_ar: true |
| 226 | needsPic: false |
| 227 | |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 228 | # TODO(pcloudy): Review those flags below, they should be defined by cl.exe |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 229 | compiler_flag: "/DCOMPILER_MSVC" |
| 230 | |
pcloudy | b9554c1 | 2017-07-10 14:09:16 +0200 | [diff] [blame] | 231 | # Don't define min/max macros in windows.h. |
| 232 | compiler_flag: "/DNOMINMAX" |
| 233 | |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 234 | # Platform defines. |
| 235 | compiler_flag: "/D_WIN32_WINNT=0x0600" |
| 236 | # Turn off warning messages. |
| 237 | compiler_flag: "/D_CRT_SECURE_NO_DEPRECATE" |
| 238 | compiler_flag: "/D_CRT_SECURE_NO_WARNINGS" |
| 239 | compiler_flag: "/D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS" |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 240 | |
| 241 | # Useful options to have on for compilation. |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 242 | # Increase the capacity of object files to 2^32 sections. |
| 243 | compiler_flag: "/bigobj" |
| 244 | # Allocate 500MB for precomputed headers. |
| 245 | compiler_flag: "/Zm500" |
| 246 | # Use unsigned char by default. |
| 247 | compiler_flag: "/J" |
| 248 | # Use function level linking. |
| 249 | compiler_flag: "/Gy" |
| 250 | # Use string pooling. |
| 251 | compiler_flag: "/GF" |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 252 | # Catch both asynchronous (structured) and synchronous (C++) exceptions. |
| 253 | compiler_flag: "/EHsc" |
| 254 | |
| 255 | # Globally disabled warnings. |
| 256 | # Don't warn about elements of array being be default initialized. |
| 257 | compiler_flag: "/wd4351" |
| 258 | # Don't warn about no matching delete found. |
| 259 | compiler_flag: "/wd4291" |
| 260 | # Don't warn about diamond inheritance patterns. |
| 261 | compiler_flag: "/wd4250" |
| 262 | # Don't warn about insecure functions (e.g. non _s functions). |
| 263 | compiler_flag: "/wd4996" |
| 264 | |
Yun Peng | f3fd3a4 | 2017-04-24 13:37:46 +0200 | [diff] [blame] | 265 | linker_flag: "/MACHINE:X64" |
| 266 | |
hlopko | 26e5a47 | 2017-07-05 14:06:39 -0400 | [diff] [blame] | 267 | feature { |
| 268 | name: "no_legacy_features" |
| 269 | } |
| 270 | |
Yun Peng | f3fd3a4 | 2017-04-24 13:37:46 +0200 | [diff] [blame] | 271 | # Suppress startup banner. |
| 272 | feature { |
| 273 | name: "nologo" |
| 274 | flag_set { |
| 275 | action: "c-compile" |
| 276 | action: "c++-compile" |
| 277 | action: "c++-module-compile" |
| 278 | action: "c++-module-codegen" |
| 279 | action: "c++-header-parsing" |
| 280 | action: "c++-header-preprocessing" |
| 281 | action: "assemble" |
| 282 | action: "preprocess-assemble" |
| 283 | action: "c++-link-executable" |
| 284 | action: "c++-link-dynamic-library" |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 285 | action: "c++-link-nodeps-dynamic-library" |
Yun Peng | f3fd3a4 | 2017-04-24 13:37:46 +0200 | [diff] [blame] | 286 | action: "c++-link-static-library" |
| 287 | action: "c++-link-alwayslink-static-library" |
| 288 | action: "c++-link-pic-static-library" |
| 289 | action: "c++-link-alwayslink-pic-static-library" |
| 290 | flag_group { |
| 291 | flag: "/nologo" |
| 292 | } |
| 293 | } |
| 294 | } |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 295 | |
Yun Peng | 394211b | 2017-09-15 15:59:14 +0200 | [diff] [blame] | 296 | feature { |
| 297 | name: 'has_configured_linker_path' |
| 298 | } |
| 299 | |
Yun Peng | 0286694 | 2017-08-04 10:45:46 +0200 | [diff] [blame] | 300 | # This feature indicates strip is not supported, building stripped binary will just result a copy of orignial binary |
| 301 | feature { |
| 302 | name: 'no_stripping' |
| 303 | } |
| 304 | |
Yun Peng | 394211b | 2017-09-15 15:59:14 +0200 | [diff] [blame] | 305 | # This feature indicates this is a toolchain targeting Windows. |
| 306 | feature { |
| 307 | name: 'targets_windows' |
Yun Peng | 481657d | 2017-09-20 10:25:48 +0200 | [diff] [blame] | 308 | implies: 'copy_dynamic_libraries_to_binary' |
Yun Peng | 394211b | 2017-09-15 15:59:14 +0200 | [diff] [blame] | 309 | enabled: true |
| 310 | } |
| 311 | |
Yun Peng | 481657d | 2017-09-20 10:25:48 +0200 | [diff] [blame] | 312 | feature { |
| 313 | name: 'copy_dynamic_libraries_to_binary' |
| 314 | } |
| 315 | |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 316 | action_config { |
Seth Greenstein | ae760d2 | 2017-11-17 02:20:06 -0800 | [diff] [blame] | 317 | config_name: 'assemble' |
| 318 | action_name: 'assemble' |
| 319 | tool { |
| 320 | tool_path: '%{msvc_ml_path}' |
| 321 | } |
| 322 | flag_set { |
| 323 | expand_if_all_available: 'output_object_file' |
| 324 | flag_group { |
| 325 | flag: '/Fo%{output_object_file}' |
| 326 | flag: '/Zi' |
| 327 | flag: '/c' |
| 328 | flag: '%{source_file}' |
| 329 | } |
| 330 | } |
| 331 | implies: 'nologo' |
| 332 | implies: 'msvc_env' |
| 333 | implies: 'sysroot' |
| 334 | } |
| 335 | |
| 336 | action_config { |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 337 | config_name: 'c-compile' |
| 338 | action_name: 'c-compile' |
| 339 | tool { |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 340 | tool_path: '%{msvc_cl_path}' |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 341 | } |
| 342 | flag_set { |
| 343 | flag_group { |
| 344 | flag: '/c' |
| 345 | flag: '%{source_file}' |
| 346 | } |
| 347 | } |
| 348 | flag_set { |
| 349 | expand_if_all_available: 'output_object_file' |
| 350 | flag_group { |
| 351 | flag: '/Fo%{output_object_file}' |
| 352 | } |
| 353 | } |
| 354 | flag_set { |
| 355 | expand_if_all_available: 'output_assembly_file' |
| 356 | flag_group { |
| 357 | flag: '/Fa%{output_assembly_file}' |
| 358 | } |
| 359 | } |
| 360 | flag_set { |
| 361 | expand_if_all_available: 'output_preprocess_file' |
| 362 | flag_group { |
| 363 | flag: '/P' |
| 364 | flag: '/Fi%{output_preprocess_file}' |
| 365 | } |
| 366 | } |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 367 | implies: 'legacy_compile_flags' |
Yun Peng | f3fd3a4 | 2017-04-24 13:37:46 +0200 | [diff] [blame] | 368 | implies: 'nologo' |
Yun Peng | 6a0ddd8 | 2017-04-05 13:52:28 +0000 | [diff] [blame] | 369 | implies: 'msvc_env' |
Yun Peng | 29d5e9c | 2017-04-25 14:21:41 +0200 | [diff] [blame] | 370 | implies: 'parse_showincludes' |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 371 | implies: 'user_compile_flags' |
hlopko | b05bff6 | 2017-09-12 10:51:44 +0200 | [diff] [blame] | 372 | implies: 'sysroot' |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 373 | implies: 'unfiltered_compile_flags' |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 374 | } |
| 375 | |
| 376 | action_config { |
| 377 | config_name: 'c++-compile' |
| 378 | action_name: 'c++-compile' |
| 379 | tool { |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 380 | tool_path: '%{msvc_cl_path}' |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 381 | } |
| 382 | flag_set { |
| 383 | flag_group { |
| 384 | flag: '/c' |
| 385 | flag: '%{source_file}' |
| 386 | } |
| 387 | } |
| 388 | flag_set { |
| 389 | expand_if_all_available: 'output_object_file' |
| 390 | flag_group { |
| 391 | flag: '/Fo%{output_object_file}' |
| 392 | } |
| 393 | } |
| 394 | flag_set { |
| 395 | expand_if_all_available: 'output_assembly_file' |
| 396 | flag_group { |
| 397 | flag: '/Fa%{output_assembly_file}' |
| 398 | } |
| 399 | } |
| 400 | flag_set { |
| 401 | expand_if_all_available: 'output_preprocess_file' |
| 402 | flag_group { |
| 403 | flag: '/P' |
| 404 | flag: '/Fi%{output_preprocess_file}' |
| 405 | } |
| 406 | } |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 407 | implies: 'legacy_compile_flags' |
Yun Peng | f3fd3a4 | 2017-04-24 13:37:46 +0200 | [diff] [blame] | 408 | implies: 'nologo' |
Yun Peng | 6a0ddd8 | 2017-04-05 13:52:28 +0000 | [diff] [blame] | 409 | implies: 'msvc_env' |
Yun Peng | 29d5e9c | 2017-04-25 14:21:41 +0200 | [diff] [blame] | 410 | implies: 'parse_showincludes' |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 411 | implies: 'user_compile_flags' |
hlopko | b05bff6 | 2017-09-12 10:51:44 +0200 | [diff] [blame] | 412 | implies: 'sysroot' |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 413 | implies: 'unfiltered_compile_flags' |
Yun Peng | 56b16e7 | 2016-07-12 10:55:57 +0000 | [diff] [blame] | 414 | } |
| 415 | |
Yun Peng | 81aede1 | 2016-10-25 13:49:28 +0000 | [diff] [blame] | 416 | action_config { |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 417 | config_name: 'c++-link-executable' |
| 418 | action_name: 'c++-link-executable' |
| 419 | tool { |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 420 | tool_path: '%{msvc_link_path}' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 421 | } |
| 422 | implies: 'nologo' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 423 | implies: 'linkstamps' |
| 424 | implies: 'output_execpath_flags' |
| 425 | implies: 'input_param_flags' |
| 426 | implies: 'legacy_link_flags' |
Laszlo Csomor | 1a63644 | 2017-07-20 12:38:02 +0200 | [diff] [blame] | 427 | implies: 'linker_subsystem_flag' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 428 | implies: 'linker_param_file' |
| 429 | implies: 'msvc_env' |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 430 | implies: 'use_linker' |
Yun Peng | 0286694 | 2017-08-04 10:45:46 +0200 | [diff] [blame] | 431 | implies: 'no_stripping' |
Yun Peng | 81aede1 | 2016-10-25 13:49:28 +0000 | [diff] [blame] | 432 | } |
| 433 | |
| 434 | action_config { |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 435 | config_name: 'c++-link-dynamic-library' |
| 436 | action_name: 'c++-link-dynamic-library' |
| 437 | tool { |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 438 | tool_path: '%{msvc_link_path}' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 439 | } |
| 440 | implies: 'nologo' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 441 | implies: 'shared_flag' |
| 442 | implies: 'linkstamps' |
| 443 | implies: 'output_execpath_flags' |
| 444 | implies: 'input_param_flags' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 445 | implies: 'legacy_link_flags' |
Laszlo Csomor | 1a63644 | 2017-07-20 12:38:02 +0200 | [diff] [blame] | 446 | implies: 'linker_subsystem_flag' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 447 | implies: 'linker_param_file' |
| 448 | implies: 'msvc_env' |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 449 | implies: 'use_linker' |
Yun Peng | 0286694 | 2017-08-04 10:45:46 +0200 | [diff] [blame] | 450 | implies: 'no_stripping' |
Yun Peng | 394211b | 2017-09-15 15:59:14 +0200 | [diff] [blame] | 451 | implies: 'has_configured_linker_path' |
Yun Peng | 9cc954a | 2017-11-14 01:45:02 -0800 | [diff] [blame] | 452 | implies: 'def_file' |
Yun Peng | 81aede1 | 2016-10-25 13:49:28 +0000 | [diff] [blame] | 453 | } |
| 454 | |
| 455 | action_config { |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 456 | config_name: 'c++-link-nodeps-dynamic-library' |
| 457 | action_name: 'c++-link-nodeps-dynamic-library' |
| 458 | tool { |
| 459 | tool_path: '%{msvc_link_path}' |
| 460 | } |
| 461 | implies: 'nologo' |
| 462 | implies: 'shared_flag' |
| 463 | implies: 'linkstamps' |
| 464 | implies: 'output_execpath_flags' |
| 465 | implies: 'input_param_flags' |
| 466 | implies: 'legacy_link_flags' |
| 467 | implies: 'linker_subsystem_flag' |
| 468 | implies: 'linker_param_file' |
| 469 | implies: 'msvc_env' |
| 470 | implies: 'use_linker' |
| 471 | implies: 'no_stripping' |
| 472 | implies: 'has_configured_linker_path' |
| 473 | implies: 'def_file' |
| 474 | } |
| 475 | |
| 476 | action_config { |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 477 | config_name: 'c++-link-static-library' |
| 478 | action_name: 'c++-link-static-library' |
| 479 | tool { |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 480 | tool_path: '%{msvc_lib_path}' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 481 | } |
| 482 | implies: 'nologo' |
hlopko | a4697fd | 2017-06-01 10:14:40 +0200 | [diff] [blame] | 483 | implies: 'archiver_flags' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 484 | implies: 'input_param_flags' |
| 485 | implies: 'linker_param_file' |
| 486 | implies: 'msvc_env' |
Yun Peng | 81aede1 | 2016-10-25 13:49:28 +0000 | [diff] [blame] | 487 | } |
| 488 | |
| 489 | action_config { |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 490 | config_name: 'c++-link-alwayslink-static-library' |
| 491 | action_name: 'c++-link-alwayslink-static-library' |
| 492 | tool { |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 493 | tool_path: '%{msvc_lib_path}' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 494 | } |
| 495 | implies: 'nologo' |
hlopko | a4697fd | 2017-06-01 10:14:40 +0200 | [diff] [blame] | 496 | implies: 'archiver_flags' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 497 | implies: 'input_param_flags' |
| 498 | implies: 'linker_param_file' |
| 499 | implies: 'msvc_env' |
Yun Peng | 81aede1 | 2016-10-25 13:49:28 +0000 | [diff] [blame] | 500 | } |
| 501 | |
| 502 | # TODO(pcloudy): The following action_config is listed in MANDATORY_LINK_TARGET_TYPES. |
| 503 | # But do we really need them on Windows? |
| 504 | action_config { |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 505 | config_name: 'c++-link-pic-static-library' |
| 506 | action_name: 'c++-link-pic-static-library' |
| 507 | tool { |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 508 | tool_path: '%{msvc_lib_path}' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 509 | } |
| 510 | implies: 'nologo' |
hlopko | a4697fd | 2017-06-01 10:14:40 +0200 | [diff] [blame] | 511 | implies: 'archiver_flags' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 512 | implies: 'input_param_flags' |
| 513 | implies: 'linker_param_file' |
| 514 | implies: 'msvc_env' |
Yun Peng | 81aede1 | 2016-10-25 13:49:28 +0000 | [diff] [blame] | 515 | } |
| 516 | |
| 517 | action_config { |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 518 | config_name: 'c++-link-alwayslink-pic-static-library' |
| 519 | action_name: 'c++-link-alwayslink-pic-static-library' |
| 520 | tool { |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 521 | tool_path: '%{msvc_lib_path}' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 522 | } |
| 523 | implies: 'nologo' |
hlopko | a4697fd | 2017-06-01 10:14:40 +0200 | [diff] [blame] | 524 | implies: 'archiver_flags' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 525 | implies: 'input_param_flags' |
| 526 | implies: 'linker_param_file' |
| 527 | implies: 'msvc_env' |
Yun Peng | 81aede1 | 2016-10-25 13:49:28 +0000 | [diff] [blame] | 528 | } |
| 529 | |
| 530 | action_config { |
| 531 | config_name: 'c++-link-interface-dynamic-library' |
| 532 | action_name: 'c++-link-interface-dynamic-library' |
| 533 | tool { |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 534 | tool_path: '%{msvc_lib_path}' |
Yun Peng | 81aede1 | 2016-10-25 13:49:28 +0000 | [diff] [blame] | 535 | } |
Yun Peng | f3fd3a4 | 2017-04-24 13:37:46 +0200 | [diff] [blame] | 536 | implies: 'nologo' |
Marcel Hlopko | 46d3632 | 2017-01-24 10:39:40 +0000 | [diff] [blame] | 537 | implies: 'linker_param_file' |
Yun Peng | 6a0ddd8 | 2017-04-05 13:52:28 +0000 | [diff] [blame] | 538 | implies: 'msvc_env' |
Yun Peng | 81aede1 | 2016-10-25 13:49:28 +0000 | [diff] [blame] | 539 | } |
| 540 | |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 541 | # TODO(b/65151735): Remove legacy_compile_flags feature when legacy fields are |
| 542 | # not used in this crosstool |
| 543 | feature { |
| 544 | name: 'legacy_compile_flags' |
| 545 | flag_set { |
| 546 | expand_if_all_available: 'legacy_compile_flags' |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 547 | action: 'preprocess-assemble' |
| 548 | action: 'c-compile' |
| 549 | action: 'c++-compile' |
| 550 | action: 'c++-header-parsing' |
| 551 | action: 'c++-header-preprocessing' |
| 552 | action: 'c++-module-compile' |
| 553 | action: 'c++-module-codegen' |
| 554 | flag_group { |
| 555 | iterate_over: 'legacy_compile_flags' |
| 556 | flag: '%{legacy_compile_flags}' |
| 557 | } |
| 558 | } |
| 559 | } |
| 560 | |
| 561 | feature { |
| 562 | name: "msvc_env" |
| 563 | env_set { |
| 564 | action: "c-compile" |
| 565 | action: "c++-compile" |
| 566 | action: "c++-module-compile" |
| 567 | action: "c++-module-codegen" |
| 568 | action: "c++-header-parsing" |
| 569 | action: "c++-header-preprocessing" |
| 570 | action: "assemble" |
| 571 | action: "preprocess-assemble" |
| 572 | action: "c++-link-executable" |
| 573 | action: "c++-link-dynamic-library" |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 574 | action: "c++-link-nodeps-dynamic-library" |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 575 | action: "c++-link-static-library" |
| 576 | action: "c++-link-alwayslink-static-library" |
| 577 | action: "c++-link-pic-static-library" |
| 578 | action: "c++-link-alwayslink-pic-static-library" |
| 579 | env_entry { |
| 580 | key: "PATH" |
| 581 | value: "%{msvc_env_path}" |
| 582 | } |
| 583 | env_entry { |
| 584 | key: "INCLUDE" |
| 585 | value: "%{msvc_env_include}" |
| 586 | } |
| 587 | env_entry { |
| 588 | key: "LIB" |
| 589 | value: "%{msvc_env_lib}" |
| 590 | } |
| 591 | env_entry { |
| 592 | key: "TMP" |
| 593 | value: "%{msvc_env_tmp}" |
| 594 | } |
| 595 | env_entry { |
| 596 | key: "TEMP" |
| 597 | value: "%{msvc_env_tmp}" |
| 598 | } |
| 599 | } |
| 600 | } |
| 601 | |
| 602 | feature { |
| 603 | name: "use_linker" |
| 604 | env_set { |
| 605 | action: "c++-link-executable" |
| 606 | action: "c++-link-dynamic-library" |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 607 | action: "c++-link-nodeps-dynamic-library" |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 608 | env_entry { |
| 609 | key: "USE_LINKER" |
| 610 | value: "1" |
| 611 | } |
| 612 | } |
| 613 | } |
| 614 | |
| 615 | feature { |
| 616 | name: 'include_paths' |
| 617 | flag_set { |
Seth Greenstein | ae760d2 | 2017-11-17 02:20:06 -0800 | [diff] [blame] | 618 | action: "assemble" |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 619 | action: 'preprocess-assemble' |
| 620 | action: 'c-compile' |
| 621 | action: 'c++-compile' |
| 622 | action: 'c++-header-parsing' |
| 623 | action: 'c++-header-preprocessing' |
| 624 | action: 'c++-module-compile' |
| 625 | flag_group { |
| 626 | iterate_over: 'quote_include_paths' |
| 627 | flag: '/I%{quote_include_paths}' |
| 628 | } |
| 629 | flag_group { |
| 630 | iterate_over: 'include_paths' |
| 631 | flag: '/I%{include_paths}' |
| 632 | } |
| 633 | flag_group { |
| 634 | iterate_over: 'system_include_paths' |
| 635 | flag: '/I%{system_include_paths}' |
| 636 | } |
| 637 | } |
| 638 | } |
| 639 | |
| 640 | feature { |
| 641 | name: "preprocessor_defines" |
| 642 | flag_set { |
Seth Greenstein | ae760d2 | 2017-11-17 02:20:06 -0800 | [diff] [blame] | 643 | action: "assemble" |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 644 | action: "preprocess-assemble" |
| 645 | action: "c-compile" |
| 646 | action: "c++-compile" |
| 647 | action: "c++-header-parsing" |
| 648 | action: "c++-header-preprocessing" |
| 649 | action: "c++-module-compile" |
| 650 | flag_group { |
| 651 | flag: "/D%{preprocessor_defines}" |
| 652 | iterate_over: "preprocessor_defines" |
| 653 | } |
| 654 | } |
| 655 | } |
| 656 | |
| 657 | # Tell Bazel to parse the output of /showIncludes |
| 658 | feature { |
| 659 | name: 'parse_showincludes' |
| 660 | flag_set { |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 661 | action: 'preprocess-assemble' |
| 662 | action: 'c-compile' |
| 663 | action: 'c++-compile' |
| 664 | action: 'c++-module-compile' |
| 665 | action: 'c++-header-preprocessing' |
| 666 | action: 'c++-header-parsing' |
| 667 | flag_group { |
| 668 | flag: "/showIncludes" |
| 669 | } |
| 670 | } |
| 671 | } |
| 672 | |
| 673 | |
Yun Peng | 81aede1 | 2016-10-25 13:49:28 +0000 | [diff] [blame] | 674 | feature { |
Yun Peng | 997992d | 2017-04-18 13:33:28 +0200 | [diff] [blame] | 675 | name: 'generate_pdb_file' |
| 676 | requires: { |
| 677 | feature: 'dbg' |
| 678 | } |
| 679 | requires: { |
| 680 | feature: 'fastbuild' |
| 681 | } |
| 682 | } |
| 683 | |
| 684 | feature { |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 685 | name: 'shared_flag' |
| 686 | flag_set { |
| 687 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 688 | action: "c++-link-nodeps-dynamic-library" |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 689 | flag_group { |
| 690 | flag: '/DLL' |
| 691 | } |
| 692 | } |
Yun Peng | 81aede1 | 2016-10-25 13:49:28 +0000 | [diff] [blame] | 693 | } |
| 694 | |
| 695 | feature { |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 696 | name: 'linkstamps' |
| 697 | flag_set { |
| 698 | action: 'c++-link-executable' |
| 699 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 700 | action: "c++-link-nodeps-dynamic-library" |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 701 | expand_if_all_available: 'linkstamp_paths' |
| 702 | flag_group { |
hlopko | ec41b8c | 2017-07-04 04:31:11 -0400 | [diff] [blame] | 703 | iterate_over: 'linkstamp_paths' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 704 | flag: '%{linkstamp_paths}' |
| 705 | } |
| 706 | } |
Yun Peng | 81aede1 | 2016-10-25 13:49:28 +0000 | [diff] [blame] | 707 | } |
| 708 | |
| 709 | feature { |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 710 | name: 'output_execpath_flags' |
| 711 | flag_set { |
| 712 | expand_if_all_available: 'output_execpath' |
| 713 | action: 'c++-link-executable' |
| 714 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 715 | action: "c++-link-nodeps-dynamic-library" |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 716 | flag_group { |
| 717 | flag: '/OUT:%{output_execpath}' |
| 718 | } |
| 719 | } |
Yun Peng | 81aede1 | 2016-10-25 13:49:28 +0000 | [diff] [blame] | 720 | } |
| 721 | |
| 722 | feature { |
hlopko | a4697fd | 2017-06-01 10:14:40 +0200 | [diff] [blame] | 723 | name: 'archiver_flags' |
| 724 | flag_set { |
| 725 | expand_if_all_available: 'output_execpath' |
| 726 | action: 'c++-link-static-library' |
| 727 | action: 'c++-link-alwayslink-static-library' |
| 728 | action: 'c++-link-pic-static-library' |
| 729 | action: 'c++-link-alwayslink-pic-static-library' |
| 730 | flag_group { |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 731 | flag: '/OUT:%{output_execpath}' |
hlopko | a4697fd | 2017-06-01 10:14:40 +0200 | [diff] [blame] | 732 | } |
| 733 | } |
| 734 | } |
| 735 | |
| 736 | feature { |
Marcel Hlopko | 0ca9d7e | 2016-12-09 15:32:56 +0000 | [diff] [blame] | 737 | name: 'input_param_flags' |
| 738 | flag_set { |
Yun Peng | 394211b | 2017-09-15 15:59:14 +0200 | [diff] [blame] | 739 | expand_if_all_available: 'interface_library_output_path' |
Marcel Hlopko | 5374d4f | 2016-12-22 08:04:06 +0000 | [diff] [blame] | 740 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 741 | action: "c++-link-nodeps-dynamic-library" |
Marcel Hlopko | 5374d4f | 2016-12-22 08:04:06 +0000 | [diff] [blame] | 742 | flag_group { |
Yun Peng | 394211b | 2017-09-15 15:59:14 +0200 | [diff] [blame] | 743 | flag: "/IMPLIB:%{interface_library_output_path}" |
Marcel Hlopko | 5374d4f | 2016-12-22 08:04:06 +0000 | [diff] [blame] | 744 | } |
| 745 | } |
| 746 | flag_set { |
Marcel Hlopko | 0ca9d7e | 2016-12-09 15:32:56 +0000 | [diff] [blame] | 747 | expand_if_all_available: 'libopts' |
| 748 | action: 'c++-link-executable' |
| 749 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 750 | action: "c++-link-nodeps-dynamic-library" |
Marcel Hlopko | 0ca9d7e | 2016-12-09 15:32:56 +0000 | [diff] [blame] | 751 | flag_group { |
hlopko | ec41b8c | 2017-07-04 04:31:11 -0400 | [diff] [blame] | 752 | iterate_over: 'libopts' |
hlopko | 21903f9 | 2017-04-27 17:37:31 +0200 | [diff] [blame] | 753 | flag: '%{libopts}' |
Marcel Hlopko | 0ca9d7e | 2016-12-09 15:32:56 +0000 | [diff] [blame] | 754 | } |
| 755 | } |
| 756 | flag_set { |
| 757 | expand_if_all_available: 'libraries_to_link' |
| 758 | action: 'c++-link-executable' |
| 759 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 760 | action: "c++-link-nodeps-dynamic-library" |
Marcel Hlopko | 0ca9d7e | 2016-12-09 15:32:56 +0000 | [diff] [blame] | 761 | action: 'c++-link-static-library' |
| 762 | action: 'c++-link-alwayslink-static-library' |
| 763 | action: 'c++-link-pic-static-library' |
| 764 | action: 'c++-link-alwayslink-pic-static-library' |
| 765 | flag_group { |
| 766 | iterate_over: 'libraries_to_link' |
| 767 | flag_group { |
Marcel Hlopko | 1410c21 | 2017-02-27 11:24:36 +0000 | [diff] [blame] | 768 | expand_if_equal: { |
| 769 | variable: 'libraries_to_link.type' |
| 770 | value: 'object_file_group' |
| 771 | } |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 772 | iterate_over: 'libraries_to_link.object_files' |
| 773 | flag_group { |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 774 | flag: '%{libraries_to_link.object_files}' |
| 775 | } |
Marcel Hlopko | 0ca9d7e | 2016-12-09 15:32:56 +0000 | [diff] [blame] | 776 | } |
| 777 | flag_group { |
Marcel Hlopko | 1410c21 | 2017-02-27 11:24:36 +0000 | [diff] [blame] | 778 | expand_if_equal: { |
| 779 | variable: 'libraries_to_link.type' |
| 780 | value: 'object_file' |
| 781 | } |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 782 | flag_group { |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 783 | flag: '%{libraries_to_link.name}' |
| 784 | } |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 785 | } |
| 786 | flag_group { |
Marcel Hlopko | 1410c21 | 2017-02-27 11:24:36 +0000 | [diff] [blame] | 787 | expand_if_equal: { |
| 788 | variable: 'libraries_to_link.type' |
| 789 | value: 'interface_library' |
| 790 | } |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 791 | flag_group { |
Marcel Hlopko | 1410c21 | 2017-02-27 11:24:36 +0000 | [diff] [blame] | 792 | expand_if_false: 'libraries_to_link.is_whole_archive' |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 793 | flag: '%{libraries_to_link.name}' |
| 794 | } |
| 795 | flag_group { |
Marcel Hlopko | 1410c21 | 2017-02-27 11:24:36 +0000 | [diff] [blame] | 796 | expand_if_true: 'libraries_to_link.is_whole_archive' |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 797 | flag: '/WHOLEARCHIVE:%{libraries_to_link.name}' |
| 798 | } |
| 799 | } |
| 800 | flag_group { |
Marcel Hlopko | 1410c21 | 2017-02-27 11:24:36 +0000 | [diff] [blame] | 801 | expand_if_equal: { |
| 802 | variable: 'libraries_to_link.type' |
| 803 | value: 'static_library' |
| 804 | } |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 805 | flag_group { |
Marcel Hlopko | 1410c21 | 2017-02-27 11:24:36 +0000 | [diff] [blame] | 806 | expand_if_false: 'libraries_to_link.is_whole_archive' |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 807 | flag: '%{libraries_to_link.name}' |
| 808 | } |
| 809 | flag_group { |
Marcel Hlopko | 1410c21 | 2017-02-27 11:24:36 +0000 | [diff] [blame] | 810 | expand_if_true: 'libraries_to_link.is_whole_archive' |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 811 | flag: '/WHOLEARCHIVE:%{libraries_to_link.name}' |
| 812 | } |
| 813 | } |
| 814 | flag_group { |
Marcel Hlopko | 1410c21 | 2017-02-27 11:24:36 +0000 | [diff] [blame] | 815 | expand_if_equal: { |
| 816 | variable: 'libraries_to_link.type' |
| 817 | value: 'dynamic_library' |
| 818 | } |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 819 | flag_group { |
Marcel Hlopko | 1410c21 | 2017-02-27 11:24:36 +0000 | [diff] [blame] | 820 | expand_if_false: 'libraries_to_link.is_whole_archive' |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 821 | flag: '%{libraries_to_link.name}' |
| 822 | } |
| 823 | flag_group { |
Marcel Hlopko | 1410c21 | 2017-02-27 11:24:36 +0000 | [diff] [blame] | 824 | expand_if_true: 'libraries_to_link.is_whole_archive' |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 825 | flag: '/WHOLEARCHIVE:%{libraries_to_link.name}' |
| 826 | } |
| 827 | } |
| 828 | flag_group { |
Marcel Hlopko | 1410c21 | 2017-02-27 11:24:36 +0000 | [diff] [blame] | 829 | expand_if_equal: { |
| 830 | variable: 'libraries_to_link.type' |
| 831 | value: 'versioned_dynamic_library' |
| 832 | } |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 833 | flag_group { |
Marcel Hlopko | 1410c21 | 2017-02-27 11:24:36 +0000 | [diff] [blame] | 834 | expand_if_false: 'libraries_to_link.is_whole_archive' |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 835 | flag: '%{libraries_to_link.name}' |
| 836 | } |
| 837 | flag_group { |
Marcel Hlopko | 1410c21 | 2017-02-27 11:24:36 +0000 | [diff] [blame] | 838 | expand_if_true: 'libraries_to_link.is_whole_archive' |
Marcel Hlopko | f63ea7a | 2017-01-23 12:34:38 +0000 | [diff] [blame] | 839 | flag: '/WHOLEARCHIVE:%{libraries_to_link.name}' |
| 840 | } |
Marcel Hlopko | 0ca9d7e | 2016-12-09 15:32:56 +0000 | [diff] [blame] | 841 | } |
| 842 | } |
| 843 | } |
Yun Peng | 81aede1 | 2016-10-25 13:49:28 +0000 | [diff] [blame] | 844 | } |
| 845 | |
Laszlo Csomor | 1a63644 | 2017-07-20 12:38:02 +0200 | [diff] [blame] | 846 | # Since this feature is declared earlier in the CROSSTOOL than |
| 847 | # "legacy_link_flags", this feature will be applied prior to it anwyhere they |
| 848 | # are both implied. And since "legacy_link_flags" contains the linkopts from |
| 849 | # the build rule, this allows the user to override the /SUBSYSTEM in the BUILD |
| 850 | # file. |
| 851 | feature { |
| 852 | name: 'linker_subsystem_flag' |
| 853 | flag_set { |
| 854 | action: 'c++-link-executable' |
| 855 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 856 | action: "c++-link-nodeps-dynamic-library" |
Laszlo Csomor | 1a63644 | 2017-07-20 12:38:02 +0200 | [diff] [blame] | 857 | flag_group { |
| 858 | flag: '/SUBSYSTEM:CONSOLE' |
| 859 | } |
| 860 | } |
| 861 | } |
| 862 | |
| 863 | # The "legacy_link_flags" may contain user-defined linkopts (from build rules) |
| 864 | # so it should be defined after features that declare user-overridable flags. |
| 865 | # For example the "linker_subsystem_flag" defines a default "/SUBSYSTEM" flag |
| 866 | # but we want to let the user override it, therefore "link_flag_subsystem" is |
| 867 | # defined earlier in the CROSSTOOL file than "legacy_link_flags". |
Marcel Hlopko | 5b63024 | 2016-12-22 08:48:05 +0000 | [diff] [blame] | 868 | feature { |
Marcel Hlopko | 75c95ac | 2016-12-22 16:10:54 +0000 | [diff] [blame] | 869 | name: 'legacy_link_flags' |
Marcel Hlopko | 5b63024 | 2016-12-22 08:48:05 +0000 | [diff] [blame] | 870 | flag_set { |
Marcel Hlopko | 75c95ac | 2016-12-22 16:10:54 +0000 | [diff] [blame] | 871 | expand_if_all_available: 'legacy_link_flags' |
Marcel Hlopko | 5b63024 | 2016-12-22 08:48:05 +0000 | [diff] [blame] | 872 | action: 'c++-link-executable' |
| 873 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 874 | action: "c++-link-nodeps-dynamic-library" |
Marcel Hlopko | 5b63024 | 2016-12-22 08:48:05 +0000 | [diff] [blame] | 875 | flag_group { |
hlopko | ec41b8c | 2017-07-04 04:31:11 -0400 | [diff] [blame] | 876 | iterate_over: 'legacy_link_flags' |
Marcel Hlopko | 75c95ac | 2016-12-22 16:10:54 +0000 | [diff] [blame] | 877 | flag: '%{legacy_link_flags}' |
Marcel Hlopko | 5b63024 | 2016-12-22 08:48:05 +0000 | [diff] [blame] | 878 | } |
| 879 | } |
| 880 | } |
| 881 | |
Marcel Hlopko | 46d3632 | 2017-01-24 10:39:40 +0000 | [diff] [blame] | 882 | feature { |
| 883 | name: 'linker_param_file' |
| 884 | flag_set { |
| 885 | expand_if_all_available: 'linker_param_file' |
| 886 | action: 'c++-link-executable' |
| 887 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 888 | action: "c++-link-nodeps-dynamic-library" |
Marcel Hlopko | 46d3632 | 2017-01-24 10:39:40 +0000 | [diff] [blame] | 889 | action: 'c++-link-static-library' |
| 890 | action: 'c++-link-alwayslink-static-library' |
| 891 | action: 'c++-link-pic-static-library' |
| 892 | action: 'c++-link-alwayslink-pic-static-library' |
| 893 | flag_group { |
| 894 | flag: '@%{linker_param_file}' |
| 895 | } |
| 896 | } |
| 897 | } |
| 898 | |
Yun Peng | 997992d | 2017-04-18 13:33:28 +0200 | [diff] [blame] | 899 | feature { |
Yun Peng | 1edcd0f | 2017-09-26 10:30:44 +0200 | [diff] [blame] | 900 | name: 'static_link_msvcrt' |
Yun Peng | 3b08f77 | 2017-05-04 06:17:42 -0400 | [diff] [blame] | 901 | } |
| 902 | |
| 903 | feature { |
Yun Peng | 1edcd0f | 2017-09-26 10:30:44 +0200 | [diff] [blame] | 904 | name: 'static_link_msvcrt_no_debug' |
Yun Peng | 3b08f77 | 2017-05-04 06:17:42 -0400 | [diff] [blame] | 905 | flag_set { |
| 906 | action: 'c-compile' |
| 907 | action: 'c++-compile' |
| 908 | flag_group { |
Yun Peng | 1edcd0f | 2017-09-26 10:30:44 +0200 | [diff] [blame] | 909 | flag: "/MT" |
Yun Peng | 3b08f77 | 2017-05-04 06:17:42 -0400 | [diff] [blame] | 910 | } |
| 911 | } |
| 912 | flag_set { |
| 913 | action: 'c++-link-executable' |
| 914 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 915 | action: "c++-link-nodeps-dynamic-library" |
Yun Peng | 3b08f77 | 2017-05-04 06:17:42 -0400 | [diff] [blame] | 916 | flag_group { |
Yun Peng | 1edcd0f | 2017-09-26 10:30:44 +0200 | [diff] [blame] | 917 | flag: "/DEFAULTLIB:libcmt.lib" |
Yun Peng | 3b08f77 | 2017-05-04 06:17:42 -0400 | [diff] [blame] | 918 | } |
| 919 | } |
Yun Peng | 1edcd0f | 2017-09-26 10:30:44 +0200 | [diff] [blame] | 920 | requires: { feature: 'fastbuild'} |
| 921 | requires: { feature: 'opt'} |
| 922 | } |
| 923 | |
| 924 | feature { |
| 925 | name: 'dynamic_link_msvcrt_no_debug' |
| 926 | flag_set { |
| 927 | action: 'c-compile' |
| 928 | action: 'c++-compile' |
| 929 | flag_group { |
| 930 | flag: "/MD" |
| 931 | } |
| 932 | } |
| 933 | flag_set { |
| 934 | action: 'c++-link-executable' |
| 935 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 936 | action: "c++-link-nodeps-dynamic-library" |
Yun Peng | 1edcd0f | 2017-09-26 10:30:44 +0200 | [diff] [blame] | 937 | flag_group { |
| 938 | flag: "/DEFAULTLIB:msvcrt.lib" |
| 939 | } |
| 940 | } |
| 941 | requires: { feature: 'fastbuild'} |
| 942 | requires: { feature: 'opt'} |
| 943 | } |
| 944 | |
| 945 | feature { |
| 946 | name: 'static_link_msvcrt_debug' |
| 947 | flag_set { |
| 948 | action: 'c-compile' |
| 949 | action: 'c++-compile' |
| 950 | flag_group { |
| 951 | flag: "/MTd" |
| 952 | } |
| 953 | } |
| 954 | flag_set { |
| 955 | action: 'c++-link-executable' |
| 956 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 957 | action: "c++-link-nodeps-dynamic-library" |
Yun Peng | 1edcd0f | 2017-09-26 10:30:44 +0200 | [diff] [blame] | 958 | flag_group { |
| 959 | flag: "/DEFAULTLIB:libcmtd.lib" |
| 960 | } |
| 961 | } |
| 962 | requires: { feature: 'dbg'} |
| 963 | } |
| 964 | |
| 965 | feature { |
| 966 | name: 'dynamic_link_msvcrt_debug' |
| 967 | flag_set { |
| 968 | action: 'c-compile' |
| 969 | action: 'c++-compile' |
| 970 | flag_group { |
| 971 | flag: "/MDd" |
| 972 | } |
| 973 | } |
| 974 | flag_set { |
| 975 | action: 'c++-link-executable' |
| 976 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 977 | action: "c++-link-nodeps-dynamic-library" |
Yun Peng | 1edcd0f | 2017-09-26 10:30:44 +0200 | [diff] [blame] | 978 | flag_group { |
| 979 | flag: "/DEFAULTLIB:msvcrtd.lib" |
| 980 | } |
| 981 | } |
| 982 | requires: { feature: 'dbg'} |
Yun Peng | 3b08f77 | 2017-05-04 06:17:42 -0400 | [diff] [blame] | 983 | } |
| 984 | |
| 985 | feature { |
Yun Peng | 997992d | 2017-04-18 13:33:28 +0200 | [diff] [blame] | 986 | name: 'dbg' |
| 987 | flag_set { |
| 988 | action: 'c-compile' |
| 989 | action: 'c++-compile' |
| 990 | flag_group { |
| 991 | flag: "/Od" |
Yun Peng | 997992d | 2017-04-18 13:33:28 +0200 | [diff] [blame] | 992 | flag: "/Z7" |
pcloudy | 7585dcd | 2017-11-22 06:05:30 -0800 | [diff] [blame] | 993 | flag: "/DDEBUG" |
Yun Peng | 997992d | 2017-04-18 13:33:28 +0200 | [diff] [blame] | 994 | } |
| 995 | } |
| 996 | flag_set { |
| 997 | action: 'c++-link-executable' |
| 998 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 999 | action: "c++-link-nodeps-dynamic-library" |
Yun Peng | 997992d | 2017-04-18 13:33:28 +0200 | [diff] [blame] | 1000 | flag_group { |
Yun Peng | 09a6a9f | 2017-12-11 07:24:45 -0800 | [diff] [blame] | 1001 | flag: "%{dbg_mode_debug}" |
Yun Peng | 997992d | 2017-04-18 13:33:28 +0200 | [diff] [blame] | 1002 | flag: "/INCREMENTAL:NO" |
| 1003 | } |
| 1004 | } |
| 1005 | implies: 'generate_pdb_file' |
| 1006 | } |
| 1007 | |
| 1008 | feature { |
| 1009 | name: 'fastbuild' |
| 1010 | flag_set { |
| 1011 | action: 'c-compile' |
| 1012 | action: 'c++-compile' |
| 1013 | flag_group { |
| 1014 | flag: "/Od" |
Yun Peng | 997992d | 2017-04-18 13:33:28 +0200 | [diff] [blame] | 1015 | flag: "/Z7" |
pcloudy | 7585dcd | 2017-11-22 06:05:30 -0800 | [diff] [blame] | 1016 | flag: "/DDEBUG" |
Yun Peng | 997992d | 2017-04-18 13:33:28 +0200 | [diff] [blame] | 1017 | } |
| 1018 | } |
| 1019 | flag_set { |
| 1020 | action: 'c++-link-executable' |
| 1021 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 1022 | action: "c++-link-nodeps-dynamic-library" |
Yun Peng | 997992d | 2017-04-18 13:33:28 +0200 | [diff] [blame] | 1023 | flag_group { |
Yun Peng | 09a6a9f | 2017-12-11 07:24:45 -0800 | [diff] [blame] | 1024 | flag: "%{fastbuild_mode_debug}" |
Yun Peng | 997992d | 2017-04-18 13:33:28 +0200 | [diff] [blame] | 1025 | flag: "/INCREMENTAL:NO" |
| 1026 | } |
| 1027 | } |
| 1028 | implies: 'generate_pdb_file' |
| 1029 | } |
| 1030 | |
| 1031 | feature { |
| 1032 | name: 'opt' |
| 1033 | flag_set { |
| 1034 | action: 'c-compile' |
| 1035 | action: 'c++-compile' |
| 1036 | flag_group { |
| 1037 | flag: "/O2" |
pcloudy | ebdb4ac | 2017-11-22 05:14:23 -0800 | [diff] [blame] | 1038 | flag: "/DNDEBUG" |
Yun Peng | 997992d | 2017-04-18 13:33:28 +0200 | [diff] [blame] | 1039 | } |
| 1040 | } |
| 1041 | } |
| 1042 | |
hlopko | 646cfd8 | 2017-08-01 22:26:37 +0200 | [diff] [blame] | 1043 | feature { |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 1044 | name: 'user_compile_flags' |
hlopko | 646cfd8 | 2017-08-01 22:26:37 +0200 | [diff] [blame] | 1045 | flag_set { |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 1046 | expand_if_all_available: 'user_compile_flags' |
hlopko | 646cfd8 | 2017-08-01 22:26:37 +0200 | [diff] [blame] | 1047 | action: 'preprocess-assemble' |
| 1048 | action: 'c-compile' |
| 1049 | action: 'c++-compile' |
| 1050 | action: 'c++-header-parsing' |
| 1051 | action: 'c++-header-preprocessing' |
| 1052 | action: 'c++-module-compile' |
| 1053 | action: 'c++-module-codegen' |
| 1054 | flag_group { |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 1055 | iterate_over: 'user_compile_flags' |
| 1056 | flag: '%{user_compile_flags}' |
hlopko | 646cfd8 | 2017-08-01 22:26:37 +0200 | [diff] [blame] | 1057 | } |
| 1058 | } |
| 1059 | } |
| 1060 | |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 1061 | feature { |
hlopko | b05bff6 | 2017-09-12 10:51:44 +0200 | [diff] [blame] | 1062 | name: 'sysroot' |
| 1063 | flag_set { |
| 1064 | expand_if_all_available: 'sysroot' |
| 1065 | action: 'assemble' |
| 1066 | action: 'preprocess-assemble' |
| 1067 | action: 'c-compile' |
| 1068 | action: 'c++-compile' |
| 1069 | action: 'c++-header-parsing' |
| 1070 | action: 'c++-header-preprocessing' |
| 1071 | action: 'c++-module-compile' |
| 1072 | action: 'c++-module-codegen' |
| 1073 | action: 'c++-link-executable' |
| 1074 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 1075 | action: "c++-link-nodeps-dynamic-library" |
hlopko | b05bff6 | 2017-09-12 10:51:44 +0200 | [diff] [blame] | 1076 | flag_group { |
| 1077 | iterate_over: 'sysroot' |
| 1078 | flag: '--sysroot=%{sysroot}' |
| 1079 | } |
| 1080 | } |
| 1081 | } |
| 1082 | |
| 1083 | feature { |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 1084 | name: 'unfiltered_compile_flags' |
| 1085 | flag_set { |
| 1086 | expand_if_all_available: 'unfiltered_compile_flags' |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 1087 | action: 'preprocess-assemble' |
| 1088 | action: 'c-compile' |
| 1089 | action: 'c++-compile' |
| 1090 | action: 'c++-header-parsing' |
| 1091 | action: 'c++-header-preprocessing' |
| 1092 | action: 'c++-module-compile' |
| 1093 | action: 'c++-module-codegen' |
| 1094 | flag_group { |
| 1095 | iterate_over: 'unfiltered_compile_flags' |
| 1096 | flag: '%{unfiltered_compile_flags}' |
| 1097 | } |
| 1098 | } |
| 1099 | } |
| 1100 | |
Yun Peng | 394211b | 2017-09-15 15:59:14 +0200 | [diff] [blame] | 1101 | feature { |
Yun Peng | 9cc954a | 2017-11-14 01:45:02 -0800 | [diff] [blame] | 1102 | name : 'def_file', |
Yun Peng | 394211b | 2017-09-15 15:59:14 +0200 | [diff] [blame] | 1103 | flag_set { |
| 1104 | expand_if_all_available: 'def_file_path' |
| 1105 | action: 'c++-link-executable' |
| 1106 | action: 'c++-link-dynamic-library' |
hlopko | dad2276 | 2018-03-01 13:17:23 -0800 | [diff] [blame^] | 1107 | action: "c++-link-nodeps-dynamic-library" |
Yun Peng | 394211b | 2017-09-15 15:59:14 +0200 | [diff] [blame] | 1108 | flag_group { |
| 1109 | flag: "/DEF:%{def_file_path}" |
| 1110 | # We can specify a different DLL name in DEF file, /ignore:4070 suppresses |
| 1111 | # the warning message about DLL name doesn't match the default one. |
| 1112 | # See https://msdn.microsoft.com/en-us/library/sfkk2fz7.aspx |
| 1113 | flag: "/ignore:4070" |
| 1114 | } |
| 1115 | } |
| 1116 | } |
| 1117 | |
| 1118 | feature { |
Yun Peng | 9cc954a | 2017-11-14 01:45:02 -0800 | [diff] [blame] | 1119 | name: 'windows_export_all_symbols' |
| 1120 | } |
| 1121 | |
| 1122 | feature { |
Yun Peng | 394211b | 2017-09-15 15:59:14 +0200 | [diff] [blame] | 1123 | name: 'no_windows_export_all_symbols' |
| 1124 | } |
| 1125 | |
| 1126 | linking_mode_flags { mode: DYNAMIC } |
hlopko | f322ba7 | 2017-09-08 15:17:18 +0200 | [diff] [blame] | 1127 | |
Yun Peng | 284a611 | 2017-06-06 05:32:34 -0400 | [diff] [blame] | 1128 | %{compilation_mode_content} |
Yun Peng | 997992d | 2017-04-18 13:33:28 +0200 | [diff] [blame] | 1129 | |
Lukacs Berki | 76a2bbc | 2016-08-22 14:53:38 +0000 | [diff] [blame] | 1130 | } |