[libcxx-commits] [PATCH] D149794: [libc++] Use -fexperimental-library when available to enable experimental features

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 14 15:06:30 PST 2023


philnik updated this revision to Diff 558101.
philnik added a comment.

Rebased


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149794/new/

https://reviews.llvm.org/D149794

Files:
  libcxx/utils/libcxx/test/params.py


Index: libcxx/utils/libcxx/test/params.py
===================================================================
--- libcxx/utils/libcxx/test/params.py
+++ libcxx/utils/libcxx/test/params.py
@@ -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<foo>
-            # maps to <foo>.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 [


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149794.558101.patch
Type: text/x-patch
Size: 1216 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20231114/21289783/attachment.bin>


More information about the libcxx-commits mailing list