[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
Thu May 4 09:29:48 PDT 2023
philnik updated this revision to Diff 519529.
philnik marked an inline comment as done.
philnik added a comment.
Address comments
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
@@ -7,7 +7,7 @@
#===----------------------------------------------------------------------===##
from libcxx.test.dsl import *
-from libcxx.test.features import _isMSVC
+from libcxx.test.features import _isGCC, _isAppleClang
import re
_warningFlags = [
@@ -174,14 +174,10 @@
Parameter(name='enable_experimental', choices=[True, False], type=bool, 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.
+ # 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'),
]),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149794.519529.patch
Type: text/x-patch
Size: 1772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230504/1e6e4c81/attachment-0001.bin>
More information about the libcxx-commits
mailing list