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 @@ -7,7 +7,7 @@ #===----------------------------------------------------------------------===## from libcxx.test.dsl import * -from libcxx.test.features import _isMSVC +from libcxx.test.features import _isGCC import re _warningFlags = [ @@ -179,9 +179,10 @@ # to make it link against the static libc++experimental.lib. # We can't check for the feature 'msvc' in available_features # as those features are added after processing parameters. + # TODO AppleClang: Use -fexperimental-library when updating to AppleClang 15 AddFeature('c++experimental'), - PrependLinkFlag(lambda cfg: '-llibc++experimental' if _isMSVC(cfg) else '-lc++experimental'), - AddCompileFlag('-D_LIBCPP_ENABLE_EXPERIMENTAL'), + PrependLinkFlag(lambda cfg: '-lc++experimental' if _isGCC(cfg) or _isAppleClang(cfg) else '-fexperimental-library'), + AddCompileFlag(lambda cfg: '-D_LIBCPP_ENABLE_EXPERIMENTAL' if _isGCC(cfg) or _isAppleClang(cfg) else '-fexperimental-library'), ] if experimental else [ AddFeature('libcpp-has-no-incomplete-format'), ]),