| """Defined mock toolchain features.""" | |
| # Load features used elsewhere in rules_cc if possible. | |
| load("//cc/common:feature_names.bzl", "feature_names") | |
| FEATURE_NAMES = struct( | |
| absolute_path_directories = "absolute_path_directories", | |
| archive_param_file = feature_names.ARCHIVE_PARAM_FILE, | |
| autofdo = feature_names.AUTOFDO, | |
| autofdo_implicit_memprof_optimize = "autofdo_implicit_memprof_optimize", | |
| autofdo_implicit_thinlto = "autofdo_implicit_thinlto", | |
| change_tool = "change_tool", | |
| check_additional_variables = "check_additional_variables_feature", | |
| compiler_param_file = "compiler_param_file", | |
| copy_dynamic_libraries_to_binary = feature_names.COPY_DYNAMIC_LIBRARIES_TO_BINARY, | |
| cpp_compile_with_requirements = "cpp_compile_with_requirements", | |
| cpp_modules = feature_names.CPP_MODULES, | |
| dbg = "dbg", | |
| debug_variables = "debug_variables", | |
| def_feature = "def", | |
| define_with_space = "define_with_space", | |
| disable_cpp_link_path_mapping = feature_names.DISABLE_CPP_LINK_PATH_MAPPING, | |
| disable_pbh = "disable_pbh", | |
| do_not_split_linking_cmdline = "do_not_split_linking_cmdline", | |
| dwp_env = "dwp_env", | |
| dynamic_linking_mode = "dynamic_linking_mode", | |
| enable_afdo_thinlto = feature_names.ENABLE_AFDO_THINLTO, | |
| enable_autofdo_memprof_optimize = feature_names.ENABLE_AUTOFDO_MEMPROF_OPTIMIZE, | |
| enable_fdo_memprof_optimize = feature_names.ENABLE_FDO_MEMPROF_OPTIMIZE, | |
| enable_fdo_split_functions = feature_names.ENABLE_FDO_SPLIT_FUNCTIONS, | |
| enable_fdo_thinlto = feature_names.ENABLE_FDO_THINLTO, | |
| enable_fsafdo = feature_names.ENABLE_FSAFDO, | |
| enable_xbinaryfdo_thinlto = feature_names.ENABLE_XBINARYFDO_THINLTO, | |
| env_feature = "env_feature", | |
| external_include_paths = feature_names.EXTERNAL_INCLUDE_PATHS, | |
| fastbuild = "fastbuild", | |
| fdo_implicit_memprof_optimize = "fdo_implicit_memprof_optimize", | |
| fdo_implicit_thinlto = "fdo_implicit_thinlto", | |
| fdo_instrument = feature_names.FDO_INSTRUMENT, | |
| fdo_optimize = feature_names.FDO_OPTIMIZE, | |
| fdo_prefetch_hints = "fdo_prefetch_hints", | |
| fdo_split_functions = "fdo_split_functions", | |
| fission_flags_for_lto_backend = "fission_flags_for_lto_backend", | |
| foo = "foo_feature", | |
| force_pic_flags = "force_pic_flags", | |
| from_package = "from_package", | |
| fsafdo = feature_names.FSAFDO, | |
| gcc_quoting_for_param_files = feature_names.GCC_QUOTING_FOR_PARAM_FILES, | |
| generate_linkmap = feature_names.GENERATE_LINKMAP, | |
| generate_pdb_file = feature_names.GENERATE_PDB_FILE, | |
| generate_submodules = feature_names.GENERATE_SUBMODULES, | |
| header_module_codegen = feature_names.HEADER_MODULE_CODEGEN, | |
| header_module_compile = "header_module_compile", | |
| header_modules = feature_names.HEADER_MODULES, | |
| host = "host", | |
| implicit_fsafdo = "implicit_fsafdo", | |
| include_directories = "include_directories", | |
| is_cc_fake_binary = "is_cc_fake_binary", | |
| java_launcher_link = "java_launcher_link", | |
| layering_check = "layering_check", | |
| ld_embed_flags = "ld_embed_flags", | |
| libraries_to_link = "libraries_to_link", | |
| library_search_directories = "library_search_directories", | |
| link_env = "link_env", | |
| llvm_profdata_env = "llvm_profdata_env", | |
| memprof_optimize = feature_names.MEMPROF_OPTIMIZE, | |
| min_os_version_flag = "min_os_version_flag", | |
| module_map_home_cwd = feature_names.MODULE_MAP_HOME_CWD, | |
| module_map_without_extern_module = feature_names.MODULE_MAP_WITHOUT_EXTERN_MODULE, | |
| module_maps = feature_names.MODULE_MAPS, | |
| native_deps_link = "native_deps_link", | |
| no_copts_tokenization = feature_names.NO_COPTS_TOKENIZATION, | |
| no_dotd_file = "no_dotd_file", | |
| no_legacy_features = "no_legacy_features", | |
| no_use_lto_indexing_bitcode_file = feature_names.NO_USE_LTO_INDEXING_BITCODE_FILE, | |
| nonhost = "nonhost", | |
| objcopy_embed_flags = "objcopy_embed_flags", | |
| opt = "opt", | |
| optional_cc_flags_feature = "optional_cc_flags_feature", | |
| parse_headers = feature_names.PARSE_HEADERS, | |
| per_object_debug_info = feature_names.PER_OBJECT_DEBUG_INFO, | |
| pic = feature_names.PIC, | |
| prefer_pic_for_opt_binaries = feature_names.PREFER_PIC_FOR_OPT_BINARIES, | |
| preprocessor_defines = "preprocessor_defines", | |
| propeller_optimize = "propeller_optimize", | |
| propeller_optimize_thinlto_compile_actions = "propeller_optimize_thinlto_compile_actions", | |
| py_launcher_link = "py_launcher_link", | |
| runtime_library_search_directories = "runtime_library_search_directories", | |
| shorten_virtual_includes = feature_names.SHORTEN_VIRTUAL_INCLUDES, | |
| simple_compile_feature = "simple_compile_feature", | |
| simple_link_feature = "simple_link_feature", | |
| skip_virtual_includes = feature_names.SKIP_VIRTUAL_INCLUDES, | |
| split_functions = feature_names.SPLIT_FUNCTIONS, | |
| static_env_feature = "static_env_feature", | |
| static_link_cpp_runtimes = feature_names.STATIC_LINK_CPP_RUNTIMES, | |
| static_linking_mode = "static_linking_mode", | |
| strip_debug_symbols = "strip_debug_symbols", | |
| supports_dynamic_linker = feature_names.SUPPORTS_DYNAMIC_LINKER, | |
| supports_interface_shared_libraries = feature_names.SUPPORTS_INTERFACE_SHARED_LIBRARIES, | |
| supports_pic = feature_names.SUPPORTS_PIC, | |
| supports_start_end_lib = feature_names.SUPPORTS_START_END_LIB, | |
| targets_windows = feature_names.TARGETS_WINDOWS, | |
| thin_lto = feature_names.THIN_LTO, | |
| thin_lto_all_linkstatic_use_shared_nonlto_backends = feature_names.THIN_LTO_ALL_LINKSTATIC_USE_SHARED_NONLTO_BACKENDS, | |
| thin_lto_linkstatic_tests_use_shared_nonlto_backends = feature_names.THIN_LTO_LINKSTATIC_TESTS_USE_SHARED_NONLTO_BACKENDS, | |
| use_header_modules = feature_names.USE_HEADER_MODULES, | |
| use_lto_native_object_directory = feature_names.USE_LTO_NATIVE_OBJECT_DIRECTORY, | |
| user_compile_flags = "user_compile_flags", | |
| uses_ifso_variables = "uses_ifso_variables", | |
| uses_is_cc_test = "uses_is_cc_test", | |
| uses_is_using_fission = "uses_is_using_fission", | |
| uses_output_execpath = "uses_output_execpath", | |
| uses_strip_debug_symbols = "uses_strip_debug_symbols", | |
| uses_sysroot = "uses_sysroot", | |
| uses_user_link_flags = "uses_user_link_flags", | |
| uses_whole_archive = "uses_whole_archive", | |
| windows_export_all_symbols = "windows_export_all_symbols", | |
| xbinaryfdo = feature_names.XBINARYFDO, | |
| xbinaryfdo_implicit_thinlto = "xbinaryfdo_implicit_thinlto", | |
| ) |