1load("//cc/toolchains/impl:variables.bzl", "cc_builtin_variables", "cc_variable", "types") 2 3package(default_visibility = ["//visibility:public"]) 4 5cc_variable( 6 name = "cs_fdo_instrument_path", 7 actions = [ 8 "//cc/toolchains/actions:link_actions", 9 "//cc/toolchains/actions:compile_actions", 10 ], 11 type = types.directory, 12) 13 14cc_variable( 15 name = "def_file_path", 16 actions = ["//cc/toolchains/actions:link_actions"], 17 type = types.option(types.file), 18) 19 20cc_variable( 21 name = "dependency_file", 22 actions = ["//cc/toolchains/actions:compile_actions"], 23 type = types.file, 24) 25 26cc_variable( 27 name = "dependent_module_map_files", 28 actions = ["//cc/toolchains/actions:compile_actions"], 29 type = types.option(types.list(types.file)), 30) 31 32cc_variable( 33 name = "external_include_paths", 34 actions = ["//cc/toolchains/actions:compile_actions"], 35 type = types.option(types.list(types.directory)), 36) 37 38cc_variable( 39 name = "fdo_instrument_path", 40 actions = [ 41 "//cc/toolchains/actions:link_actions", 42 "//cc/toolchains/actions:compile_actions", 43 ], 44 type = types.directory, 45) 46 47cc_variable( 48 name = "fdo_prefetch_hints_path", 49 actions = ["//cc/toolchains/actions:compile_actions"], 50 type = types.file, 51) 52 53cc_variable( 54 name = "fdo_profile_path", 55 actions = ["//cc/toolchains/actions:compile_actions"], 56 type = types.file, 57) 58 59cc_variable( 60 name = "force_pic", 61 actions = ["//cc/toolchains/actions:link_actions"], 62 # Provided when --force-pic is passed 63 type = types.option(types.void), 64) 65 66cc_variable( 67 name = "framework_include_paths", 68 actions = ["//cc/toolchains/actions:compile_actions"], 69 type = types.list(types.directory), 70) 71 72cc_variable( 73 name = "gcov_gcno_file", 74 actions = ["//cc/toolchains/actions:compile_actions"], 75 type = types.file, 76) 77 78cc_variable( 79 name = "generate_interface_library", 80 actions = ["//cc/toolchains/actions:link_actions"], 81 # "yes" or "no" 82 type = types.option(types.string), 83) 84 85cc_variable( 86 name = "include", 87 actions = ["//cc/toolchains/actions:compile_actions"], 88 type = types.list(types.file), 89) 90 91cc_variable( 92 name = "include_paths", 93 actions = ["//cc/toolchains/actions:compile_actions"], 94 type = types.list(types.directory), 95) 96 97cc_variable( 98 name = "includes", 99 actions = ["//cc/toolchains/actions:compile_actions"], 100 type = types.option(types.list(types.file)), 101) 102 103cc_variable( 104 name = "input_file", 105 actions = ["//cc/toolchains/actions:strip"], 106 type = types.file, 107) 108 109cc_variable( 110 name = "interface_library_builder_path", 111 actions = ["//cc/toolchains/actions:link_actions"], 112 # Should be a file, but contains the string "ignored" when there's no value. 113 type = types.option(types.string), 114) 115 116cc_variable( 117 name = "interface_library_input_path", 118 actions = ["//cc/toolchains/actions:link_actions"], 119 # Should be a file, but contains the string "ignored" when there's no value. 120 type = types.option(types.string), 121) 122 123cc_variable( 124 name = "interface_library_output_path", 125 actions = ["//cc/toolchains/actions:link_actions"], 126 # Should be a file, but contains the string "ignored" when there's no value. 127 type = types.option(types.string), 128) 129 130cc_variable( 131 name = "is_cc_test", 132 actions = ["//cc/toolchains/actions:link_actions"], 133 type = types.option(types.bool), 134) 135 136cc_variable( 137 name = "is_using_fission", 138 actions = [ 139 "//cc/toolchains/actions:link_actions", 140 "//cc/toolchains/actions:compile_actions", 141 ], 142 type = types.option(types.void), 143) 144 145cc_variable( 146 name = "legacy_compile_flags", 147 actions = ["//cc/toolchains/actions:compile_actions"], 148 type = types.list(types.string), 149) 150 151cc_variable( 152 name = "legacy_link_flags", 153 actions = ["//cc/toolchains/actions:link_actions"], 154 type = types.list(types.string), 155) 156 157cc_variable( 158 name = "libraries_to_link", 159 actions = [ 160 "//cc/toolchains/actions:cpp_link_static_library", 161 "//cc/toolchains/actions:link_actions", 162 ], 163 type = types.option(types.list(types.struct( 164 name = types.string, 165 is_whole_archive = types.bool, 166 object_files = types.list(types.file), 167 path = types.string, 168 shared_libraries = types.list(types.struct( 169 name = types.string, 170 is_whole_archive = types.bool, 171 object_files = types.list(types.file), 172 path = types.file, 173 type = types.string, 174 )), 175 type = types.string, 176 ))), 177) 178 179cc_variable( 180 name = "libraries_to_link.type", 181 actions = [ 182 "//cc/toolchains/actions:cpp_link_static_library", 183 "//cc/toolchains/actions:link_actions", 184 ], 185 # See :libraries_to_link. 186 type = types.string, 187) 188 189cc_variable( 190 name = "libraries_to_link.name", 191 actions = [ 192 "//cc/toolchains/actions:cpp_link_static_library", 193 "//cc/toolchains/actions:link_actions", 194 ], 195 # See :libraries_to_link. 196 type = types.string, 197) 198 199cc_variable( 200 name = "libraries_to_link.path", 201 actions = [ 202 "//cc/toolchains/actions:cpp_link_static_library", 203 "//cc/toolchains/actions:link_actions", 204 ], 205 # See :libraries_to_link. 206 type = types.string, 207) 208 209cc_variable( 210 name = "libraries_to_link.object_files", 211 actions = [ 212 "//cc/toolchains/actions:cpp_link_static_library", 213 "//cc/toolchains/actions:link_actions", 214 ], 215 # See :libraries_to_link. 216 type = types.list(types.file), 217) 218 219cc_variable( 220 name = "libraries_to_link.is_whole_archive", 221 actions = ["//cc/toolchains/actions:link_actions"], 222 type = types.bool, 223) 224 225cc_variable( 226 name = "libraries_to_link.shared_libraries", 227 actions = ["//cc/toolchains/actions:link_actions"], 228 # See :libraries_to_link. 229 type = types.unknown, 230) 231 232cc_variable( 233 name = "libraries_to_link.shared_libraries.is_whole_archive", 234 actions = ["//cc/toolchains/actions:link_actions"], 235 type = types.string, 236) 237 238cc_variable( 239 name = "libraries_to_link.shared_libraries.name", 240 actions = ["//cc/toolchains/actions:link_actions"], 241 type = types.string, 242) 243 244cc_variable( 245 name = "libraries_to_link.shared_libraries.object_files", 246 actions = ["//cc/toolchains/actions:link_actions"], 247 type = types.list(types.file), 248) 249 250cc_variable( 251 name = "libraries_to_link.shared_libraries.path", 252 actions = ["//cc/toolchains/actions:link_actions"], 253 type = types.file, 254) 255 256cc_variable( 257 name = "libraries_to_link.shared_libraries.type", 258 actions = ["//cc/toolchains/actions:link_actions"], 259 type = types.string, 260) 261 262cc_variable( 263 name = "library_search_directories", 264 actions = ["//cc/toolchains/actions:link_actions"], 265 type = types.list(types.directory), 266) 267 268cc_variable( 269 name = "linker_param_file", 270 actions = [ 271 "//cc/toolchains/actions:cpp_link_static_library", 272 "//cc/toolchains/actions:link_actions", 273 ], 274 type = types.option(types.file), 275) 276 277cc_variable( 278 name = "linkstamp_paths", 279 actions = ["//cc/toolchains/actions:link_actions"], 280 type = types.list(types.directory), 281) 282 283cc_variable( 284 name = "lto_indexing_bitcode_file", 285 actions = ["//cc/toolchains/actions:compile_actions"], 286 type = types.option(types.file), 287) 288 289cc_variable( 290 name = "module_files", 291 actions = ["//cc/toolchains/actions:compile_actions"], 292 type = types.option(types.list(types.file)), 293) 294 295cc_variable( 296 name = "module_map_file", 297 actions = ["//cc/toolchains/actions:compile_actions"], 298 type = types.option(types.file), 299) 300 301cc_variable( 302 name = "module_name", 303 actions = ["//cc/toolchains/actions:compile_actions"], 304 type = types.option(types.string), 305) 306 307cc_variable( 308 name = "output_assembly_file", 309 actions = ["//cc/toolchains/actions:compile_actions"], 310 type = types.file, 311) 312 313cc_variable( 314 name = "output_execpath", 315 actions = [ 316 "//cc/toolchains/actions:cpp_link_static_library", 317 "//cc/toolchains/actions:link_actions", 318 ], 319 type = types.option(types.directory), 320) 321 322cc_variable( 323 name = "output_file", 324 actions = [ 325 "//cc/toolchains/actions:compile_actions", 326 "//cc/toolchains/actions:strip", 327 ], 328 type = types.file, 329) 330 331cc_variable( 332 name = "output_preprocess_file", 333 actions = ["//cc/toolchains/actions:compile_actions"], 334 type = types.file, 335) 336 337cc_variable( 338 name = "per_object_debug_info_file", 339 actions = ["//cc/toolchains/actions:compile_actions"], 340 type = types.file, 341) 342 343cc_variable( 344 name = "pic", 345 actions = ["//cc/toolchains/actions:compile_actions"], 346 type = types.option(types.void), 347) 348 349cc_variable( 350 name = "preprocessor_defines", 351 actions = ["//cc/toolchains/actions:compile_actions"], 352 type = types.list(types.string), 353) 354 355cc_variable( 356 name = "propellor_optimize_ld_path", 357 actions = ["//cc/toolchains/actions:link_actions"], 358 type = types.option(types.file), 359) 360 361cc_variable( 362 name = "quote_include_paths", 363 actions = ["//cc/toolchains/actions:compile_actions"], 364 type = types.list(types.directory), 365) 366 367cc_variable( 368 name = "runtime_library_search_directories", 369 actions = ["//cc/toolchains/actions:link_actions"], 370 type = types.option(types.list(types.directory)), 371) 372 373cc_variable( 374 name = "runtime_solib_name", 375 actions = ["//cc/toolchains/actions:link_actions"], 376 type = types.option(types.string), 377) 378 379cc_variable( 380 name = "serialized_diagnostics_file", 381 actions = ["//cc/toolchains/actions:compile_actions"], 382 type = types.option(types.file), 383) 384 385cc_variable( 386 name = "source_file", 387 actions = ["//cc/toolchains/actions:compile_actions"], 388 type = types.file, 389) 390 391cc_variable( 392 name = "strip_debug_symbols", 393 actions = ["//cc/toolchains/actions:link_actions"], 394 type = types.option(types.void), 395) 396 397cc_variable( 398 name = "stripopts", 399 actions = ["//cc/toolchains/actions:strip"], 400 type = types.list(types.string), 401) 402 403# Instead of the "sysroot" variable, use the cc_sysroot macro in 404# //cc/toolchains/args:sysroot.bzl 405 406cc_variable( 407 name = "system_include_paths", 408 actions = ["//cc/toolchains/actions:compile_actions"], 409 type = types.list(types.directory), 410) 411 412cc_variable( 413 name = "thinlto_index", 414 actions = ["//cc/toolchains/actions:compile_actions"], 415 type = types.option(types.string), 416) 417 418cc_variable( 419 name = "thinlto_indexing_param_file", 420 actions = ["//cc/toolchains/actions:link_actions"], 421 type = types.option(types.string), 422) 423 424cc_variable( 425 name = "thinlto_input_bitcode_file", 426 actions = ["//cc/toolchains/actions:compile_actions"], 427 type = types.option(types.file), 428) 429 430cc_variable( 431 name = "thinlto_merged_object_file", 432 actions = ["//cc/toolchains/actions:link_actions"], 433 type = types.option(types.file), 434) 435 436cc_variable( 437 name = "thinlto_object_suffix_replace", 438 actions = ["//cc/toolchains/actions:link_actions"], 439 type = types.option(types.string), 440) 441 442cc_variable( 443 name = "thinlto_output_object_file", 444 actions = ["//cc/toolchains/actions:compile_actions"], 445 type = types.option(types.file), 446) 447 448cc_variable( 449 name = "thinlto_param_file", 450 actions = ["//cc/toolchains/actions:link_actions"], 451 type = types.option(types.file), 452) 453 454cc_variable( 455 name = "thinlto_prefix_replace", 456 actions = ["//cc/toolchains/actions:link_actions"], 457 type = types.option(types.string), 458) 459 460cc_variable( 461 name = "unfiltered_compile_flags", 462 actions = ["//cc/toolchains/actions:compile_actions"], 463 type = types.list(types.string), 464) 465 466cc_variable( 467 name = "user_compile_flags", 468 actions = ["//cc/toolchains/actions:compile_actions"], 469 type = types.list(types.string), 470) 471 472cc_variable( 473 name = "user_link_flags", 474 actions = ["//cc/toolchains/actions:link_actions"], 475 type = types.list(types.string), 476) 477 478cc_builtin_variables( 479 name = "variables", 480 srcs = [ 481 ":cs_fdo_instrument_path", 482 ":def_file_path", 483 ":dependency_file", 484 ":dependent_module_map_files", 485 ":external_include_paths", 486 ":fdo_instrument_path", 487 ":fdo_prefetch_hints_path", 488 ":fdo_profile_path", 489 ":force_pic", 490 ":framework_include_paths", 491 ":gcov_gcno_file", 492 ":generate_interface_library", 493 ":include", 494 ":include_paths", 495 ":includes", 496 ":input_file", 497 ":interface_library_builder_path", 498 ":interface_library_input_path", 499 ":interface_library_output_path", 500 ":is_cc_test", 501 ":is_using_fission", 502 ":legacy_compile_flags", 503 ":legacy_link_flags", 504 ":libraries_to_link", 505 ":library_search_directories", 506 ":linker_param_file", 507 ":linkstamp_paths", 508 ":lto_indexing_bitcode_file", 509 ":module_files", 510 ":module_map_file", 511 ":module_name", 512 ":output_assembly_file", 513 ":output_execpath", 514 ":output_file", 515 ":output_preprocess_file", 516 ":per_object_debug_info_file", 517 ":pic", 518 ":preprocessor_defines", 519 ":propellor_optimize_ld_path", 520 ":quote_include_paths", 521 ":runtime_library_search_directories", 522 ":runtime_solib_name", 523 ":serialized_diagnostics_file", 524 ":source_file", 525 ":strip_debug_symbols", 526 ":stripopts", 527 ":system_include_paths", 528 ":thinlto_index", 529 ":thinlto_indexing_param_file", 530 ":thinlto_input_bitcode_file", 531 ":thinlto_merged_object_file", 532 ":thinlto_object_suffix_replace", 533 ":thinlto_output_object_file", 534 ":thinlto_param_file", 535 ":thinlto_prefix_replace", 536 ":unfiltered_compile_flags", 537 ":user_compile_flags", 538 ":user_link_flags", 539 ], 540 visibility = ["//visibility:public"], 541) 542