diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java index 5485bf53fd76af..20c20b4b357e8d 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java @@ -275,6 +275,9 @@ public static ImmutableList getLegacyFeatures( " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", " action: 'c++-link-executable'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", " flag_group {", " expand_if_all_available: 'fdo_instrument_path'", " flag: '-fprofile-generate=%{fdo_instrument_path}'", @@ -316,6 +319,9 @@ public static ImmutableList getLegacyFeatures( " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", " action: 'c++-link-executable'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", " flag_group {", " expand_if_all_available: 'cs_fdo_instrument_path'", " flag: '-fcs-profile-generate=%{cs_fdo_instrument_path}'", @@ -388,6 +394,8 @@ public static ImmutableList getLegacyFeatures( " with_feature { feature: 'supports_interface_shared_libraries' }", " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", " flag_group {", " expand_if_all_available: 'generate_interface_library'", " flag: '%{generate_interface_library}'", @@ -410,6 +418,8 @@ public static ImmutableList getLegacyFeatures( " with_feature { feature: 'supports_interface_shared_libraries' }", " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", " flag_group {", " expand_if_all_available: 'generate_interface_library'", " flag: '" + cppLinkDynamicLibraryToolPath + "'", @@ -427,6 +437,9 @@ public static ImmutableList getLegacyFeatures( " action: 'c++-link-executable'", " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", " flag_group {", " expand_if_all_available: 'symbol_counts_output'", " flag: '-Wl,--print-symbol-counts=%{symbol_counts_output}'", @@ -442,6 +455,8 @@ public static ImmutableList getLegacyFeatures( " flag_set {", " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", " flag_group {", " flag: '-shared'", " }", @@ -457,6 +472,9 @@ public static ImmutableList getLegacyFeatures( " action: 'c++-link-executable'", " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", " flag_group {", " expand_if_all_available: 'linkstamp_paths'", " iterate_over: 'linkstamp_paths'", @@ -474,6 +492,9 @@ public static ImmutableList getLegacyFeatures( " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", " action: 'c++-link-executable'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", " flag_group {", " expand_if_all_available: 'output_execpath'", " flag: '-o'", @@ -492,6 +513,9 @@ public static ImmutableList getLegacyFeatures( " action: 'c++-link-executable'", " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", " flag_group {", " expand_if_all_available: 'runtime_library_search_directories'", " iterate_over: 'runtime_library_search_directories'", @@ -519,6 +543,9 @@ public static ImmutableList getLegacyFeatures( " action: 'c++-link-executable'", " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", " flag_group {", " expand_if_all_available: 'runtime_library_search_directories'", " iterate_over: 'runtime_library_search_directories'", @@ -545,6 +572,9 @@ public static ImmutableList getLegacyFeatures( " action: 'c++-link-executable'", " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", " flag_group {", " expand_if_all_available: 'library_search_directories'", " iterate_over: 'library_search_directories'", @@ -603,6 +633,9 @@ public static ImmutableList getLegacyFeatures( " action: 'c++-link-executable'", " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", ifTrue( doNotSplitLinkingCmdline, " flag_group {", @@ -769,6 +802,7 @@ public static ImmutableList getLegacyFeatures( " name: 'force_pic_flags'", " flag_set {", " action: 'c++-link-executable'", + " action: 'lto-index-for-executable'", " flag_group {", " expand_if_all_available: 'force_pic'", ifLinux(platform, "flag: '-pie'"), @@ -786,6 +820,9 @@ public static ImmutableList getLegacyFeatures( " action: 'c++-link-executable'", " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", " flag_group {", " expand_if_all_available: 'user_link_flags'", " iterate_over: 'user_link_flags'", @@ -803,6 +840,9 @@ public static ImmutableList getLegacyFeatures( " action: 'c++-link-executable'", " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", " flag_group {", " expand_if_all_available: 'legacy_link_flags'", " iterate_over: 'legacy_link_flags'", @@ -820,6 +860,8 @@ public static ImmutableList getLegacyFeatures( " flag_set {", " action: 'c++-link-executable'", " action: 'c++-link-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-executable'", " with_feature { feature: 'static_link_cpp_runtimes' }", " flag_group {", " flag: '-static-libgcc'", @@ -836,6 +878,9 @@ public static ImmutableList getLegacyFeatures( " action: 'c++-link-executable'", " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", " flag_group {", " expand_if_all_available: 'is_using_fission'", " flag: '-Wl,--gdb-index'", @@ -852,6 +897,9 @@ public static ImmutableList getLegacyFeatures( " action: 'c++-link-executable'", " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", " flag_group {", " expand_if_all_available: 'strip_debug_symbols'", " flag: '-Wl,-S'", @@ -882,6 +930,9 @@ public static ImmutableList getLegacyFeatures( " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", " action: 'c++-link-executable'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", " action: 'objc-executable'", " action: 'objc++-executable'", " flag_group {", @@ -915,6 +966,9 @@ public static ImmutableList getLegacyFeatures( " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", " action: 'c++-link-executable'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", " flag_group {", " flag: '--coverage'", " }", @@ -1329,6 +1383,8 @@ public static ImmutableList getFeaturesToAppearLastInFeature " flag_set {", " action: 'c++-link-executable'", " action: 'c++-link-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-executable'", " flag_group {", " flag: '-static'", " }", @@ -1376,6 +1432,9 @@ public static ImmutableList getFeaturesToAppearLastInFeature " action: 'c++-link-executable'", " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", " action: 'clif-match'", " action: 'lto-backend'", " flag_group {", @@ -1428,6 +1487,9 @@ public static ImmutableList getFeaturesToAppearLastInFeature " action: 'c++-link-executable'", " action: 'c++-link-dynamic-library'", " action: 'c++-link-nodeps-dynamic-library'", + " action: 'lto-index-for-dynamic-library'", + " action: 'lto-index-for-nodeps-dynamic-library'", + " action: 'lto-index-for-executable'", " flag_group {", " expand_if_all_available: 'linker_param_file'", dynamicLibraryParamFile,