Add expand_if_all_available annotation needed for fdo_instrument_path.
Without this, users of the new C++ toolchain API can hit problems when they
don't specify the variable.
RELNOTES: None.
@@ -364,6 +364,7 @@ public class CppActionConfigs {
" action: 'c++-link-nodeps-dynamic-library'",
" action: 'c++-link-executable'",
" flag_group {",
+ " expand_if_all_available: 'fdo_instrument_path'",
" flag: '-fprofile-generate=%{fdo_instrument_path}'",
" flag: '-fno-data-sections'",
" }",
@@ -377,8 +378,8 @@ public class CppActionConfigs {
" flag_set {",
" action: 'c-compile'",
" action: 'c++-compile'",
- " expand_if_all_available: 'fdo_profile_path'",
" flag_group {",
+ " expand_if_all_available: 'fdo_profile_path'",
" flag: '-fprofile-use=%{fdo_profile_path}'",
" flag: '-Xclang-only=-Wno-profile-instr-unprofiled'",
" flag: '-Xclang-only=-Wno-profile-instr-out-of-date'",
