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 @@ -11,7 +11,7 @@ from pathlib import Path from libcxx.test.dsl import * -from libcxx.test.features import _isMSVC +from libcxx.test.features import _isGCC _warningFlags = [ @@ -253,14 +253,9 @@ default=True, help="Whether to enable tests for experimental C++ Library features.", actions=lambda experimental: [ - # When linking in MSVC mode via the Clang driver, a -l - # maps to .lib, so we need to use -llibc++experimental here - # 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. 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) else "-fexperimental-library"), + AddCompileFlag(lambda cfg: "-D_LIBCPP_ENABLE_EXPERIMENTAL" if _isGCC(cfg) else "-fexperimental-library"), ] if experimental else [