diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py --- a/libcxx/utils/libcxx/test/config.py +++ b/libcxx/utils/libcxx/test/config.py @@ -249,6 +249,11 @@ # and regressions. Note: New failures should not be suppressed # using this feature. (Also see llvm.org/PR32730) self.config.available_features.add('LIBCXX-WINDOWS-FIXME') + if not self.target_info.is_mingw(): + # The feature 'windows' gets set by DEFAULT_FEATURES later, + # after processing DEFAULT_PARAMETERS which needs to be able + # to check this detail. + self.config.available_features.add('msvc') target_triple = getattr(self.config, 'target_triple', None) if target_triple: diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py --- a/libcxx/utils/libcxx/test/params.py +++ b/libcxx/utils/libcxx/test/params.py @@ -90,7 +90,7 @@ help="Whether to enable tests for experimental C++ libraries (typically Library Fundamentals TSes).", actions=lambda experimental: [] if not experimental else [ AddFeature('c++experimental'), - AddLinkFlag('-lc++experimental') + AddLinkFlag(lambda config: '-llibc++experimental' if 'msvc' in config.available_features else '-lc++experimental') ]), Parameter(name='long_tests', choices=[True, False], type=bool, default=True,