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 = ["//cc/toolchains/actions:link_actions"], 160 type = types.option(types.list(types.struct( 161 shared_libraries = types.list(types.struct( 162 name = types.string, 163 is_whole_archive = types.bool, 164 object_files = types.list(types.file), 165 path = types.file, 166 type = types.string, 167 )), 168 ))), 169) 170 171cc_variable( 172 name = "libraries_to_link.shared_libraries", 173 actions = ["//cc/toolchains/actions:link_actions"], 174 # See :libraries_to_link. 175 type = types.unknown, 176) 177 178cc_variable( 179 name = "libraries_to_link.shared_libraries.is_whole_archive", 180 actions = ["//cc/toolchains/actions:link_actions"], 181 type = types.string, 182) 183 184cc_variable( 185 name = "libraries_to_link.shared_libraries.name", 186 actions = ["//cc/toolchains/actions:link_actions"], 187 type = types.string, 188) 189 190cc_variable( 191 name = "libraries_to_link.shared_libraries.object_files", 192 actions = ["//cc/toolchains/actions:link_actions"], 193 type = types.list(types.file), 194) 195 196cc_variable( 197 name = "libraries_to_link.shared_libraries.path", 198 actions = ["//cc/toolchains/actions:link_actions"], 199 type = types.file, 200) 201 202cc_variable( 203 name = "libraries_to_link.shared_libraries.type", 204 actions = ["//cc/toolchains/actions:link_actions"], 205 type = types.string, 206) 207 208cc_variable( 209 name = "library_search_directories", 210 actions = ["//cc/toolchains/actions:link_actions"], 211 type = types.list(types.directory), 212) 213 214cc_variable( 215 name = "linker_param_file", 216 actions = ["//cc/toolchains/actions:link_actions"], 217 type = types.file, 218) 219 220cc_variable( 221 name = "linkstamp_paths", 222 actions = ["//cc/toolchains/actions:link_actions"], 223 type = types.list(types.directory), 224) 225 226cc_variable( 227 name = "lto_indexing_bitcode_file", 228 actions = ["//cc/toolchains/actions:compile_actions"], 229 type = types.option(types.file), 230) 231 232cc_variable( 233 name = "module_files", 234 actions = ["//cc/toolchains/actions:compile_actions"], 235 type = types.option(types.list(types.file)), 236) 237 238cc_variable( 239 name = "module_map_file", 240 actions = ["//cc/toolchains/actions:compile_actions"], 241 type = types.option(types.file), 242) 243 244cc_variable( 245 name = "module_name", 246 actions = ["//cc/toolchains/actions:compile_actions"], 247 type = types.option(types.string), 248) 249 250cc_variable( 251 name = "output_assembly_file", 252 actions = ["//cc/toolchains/actions:compile_actions"], 253 type = types.file, 254) 255 256cc_variable( 257 name = "output_execpath", 258 actions = ["//cc/toolchains/actions:link_actions"], 259 type = types.option(types.directory), 260) 261 262cc_variable( 263 name = "output_file", 264 actions = ["//cc/toolchains/actions:compile_actions"], 265 type = types.file, 266) 267 268cc_variable( 269 name = "output_preprocess_file", 270 actions = ["//cc/toolchains/actions:compile_actions"], 271 type = types.file, 272) 273 274cc_variable( 275 name = "per_object_debug_info_file", 276 actions = ["//cc/toolchains/actions:compile_actions"], 277 type = types.file, 278) 279 280cc_variable( 281 name = "pic", 282 actions = ["//cc/toolchains/actions:compile_actions"], 283 type = types.option(types.void), 284) 285 286cc_variable( 287 name = "preprocessor_defines", 288 actions = ["//cc/toolchains/actions:compile_actions"], 289 type = types.list(types.string), 290) 291 292cc_variable( 293 name = "propellor_optimize_ld_path", 294 actions = ["//cc/toolchains/actions:link_actions"], 295 type = types.option(types.file), 296) 297 298cc_variable( 299 name = "quote_include_paths", 300 actions = ["//cc/toolchains/actions:compile_actions"], 301 type = types.list(types.directory), 302) 303 304cc_variable( 305 name = "runtime_library_search_directories", 306 actions = ["//cc/toolchains/actions:link_actions"], 307 type = types.option(types.list(types.directory)), 308) 309 310cc_variable( 311 name = "runtime_solib_name", 312 actions = ["//cc/toolchains/actions:link_actions"], 313 type = types.option(types.string), 314) 315 316cc_variable( 317 name = "serialized_diagnostics_file", 318 actions = ["//cc/toolchains/actions:compile_actions"], 319 type = types.option(types.file), 320) 321 322cc_variable( 323 name = "source_file", 324 actions = ["//cc/toolchains/actions:compile_actions"], 325 type = types.file, 326) 327 328cc_variable( 329 name = "strip_debug_symbols", 330 actions = ["//cc/toolchains/actions:link_actions"], 331 type = types.option(types.void), 332) 333 334cc_variable( 335 name = "stripopts", 336 actions = ["//cc/toolchains/actions:strip"], 337 type = types.list(types.string), 338) 339 340cc_variable( 341 name = "sysroot", 342 type = types.directory, 343) 344 345cc_variable( 346 name = "system_include_paths", 347 actions = ["//cc/toolchains/actions:compile_actions"], 348 type = types.list(types.directory), 349) 350 351cc_variable( 352 name = "thinlto_index", 353 actions = ["//cc/toolchains/actions:compile_actions"], 354 type = types.option(types.string), 355) 356 357cc_variable( 358 name = "thinlto_indexing_param_file", 359 actions = ["//cc/toolchains/actions:link_actions"], 360 type = types.option(types.string), 361) 362 363cc_variable( 364 name = "thinlto_input_bitcode_file", 365 actions = ["//cc/toolchains/actions:compile_actions"], 366 type = types.option(types.file), 367) 368 369cc_variable( 370 name = "thinlto_merged_object_file", 371 actions = ["//cc/toolchains/actions:link_actions"], 372 type = types.option(types.file), 373) 374 375cc_variable( 376 name = "thinlto_object_suffix_replace", 377 actions = ["//cc/toolchains/actions:link_actions"], 378 type = types.option(types.string), 379) 380 381cc_variable( 382 name = "thinlto_output_object_file", 383 actions = ["//cc/toolchains/actions:compile_actions"], 384 type = types.option(types.file), 385) 386 387cc_variable( 388 name = "thinlto_param_file", 389 actions = ["//cc/toolchains/actions:link_actions"], 390 type = types.option(types.file), 391) 392 393cc_variable( 394 name = "thinlto_prefix_replace", 395 actions = ["//cc/toolchains/actions:link_actions"], 396 type = types.option(types.string), 397) 398 399cc_variable( 400 name = "unfiltered_compile_flags", 401 actions = ["//cc/toolchains/actions:compile_actions"], 402 type = types.list(types.string), 403) 404 405cc_variable( 406 name = "user_compile_flags", 407 actions = ["//cc/toolchains/actions:compile_actions"], 408 type = types.list(types.string), 409) 410 411cc_variable( 412 name = "user_link_flags", 413 actions = ["//cc/toolchains/actions:link_actions"], 414 type = types.list(types.string), 415) 416 417cc_builtin_variables( 418 name = "variables", 419 srcs = [ 420 ":cs_fdo_instrument_path", 421 ":def_file_path", 422 ":dependency_file", 423 ":dependent_module_map_files", 424 ":external_include_paths", 425 ":fdo_instrument_path", 426 ":fdo_prefetch_hints_path", 427 ":fdo_profile_path", 428 ":force_pic", 429 ":framework_include_paths", 430 ":gcov_gcno_file", 431 ":generate_interface_library", 432 ":include", 433 ":include_paths", 434 ":includes", 435 ":input_file", 436 ":interface_library_builder_path", 437 ":interface_library_input_path", 438 ":interface_library_output_path", 439 ":is_cc_test", 440 ":is_using_fission", 441 ":legacy_compile_flags", 442 ":legacy_link_flags", 443 ":libraries_to_link", 444 ":library_search_directories", 445 ":linker_param_file", 446 ":linkstamp_paths", 447 ":lto_indexing_bitcode_file", 448 ":module_files", 449 ":module_map_file", 450 ":module_name", 451 ":output_assembly_file", 452 ":output_execpath", 453 ":output_file", 454 ":output_preprocess_file", 455 ":per_object_debug_info_file", 456 ":pic", 457 ":preprocessor_defines", 458 ":propellor_optimize_ld_path", 459 ":quote_include_paths", 460 ":runtime_library_search_directories", 461 ":runtime_solib_name", 462 ":serialized_diagnostics_file", 463 ":source_file", 464 ":strip_debug_symbols", 465 ":stripopts", 466 ":sysroot", 467 ":system_include_paths", 468 ":thinlto_index", 469 ":thinlto_indexing_param_file", 470 ":thinlto_input_bitcode_file", 471 ":thinlto_merged_object_file", 472 ":thinlto_object_suffix_replace", 473 ":thinlto_output_object_file", 474 ":thinlto_param_file", 475 ":thinlto_prefix_replace", 476 ":unfiltered_compile_flags", 477 ":user_compile_flags", 478 ":user_link_flags", 479 ], 480 visibility = ["//visibility:public"], 481) 482