[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
Wed May 3 15:16:49 PDT 2023
philnik created this revision.
Herald added a subscriber: arichardson.
Herald added a project: All.
philnik requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Repository:
rG LLVM Github Monorepo
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
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'),
]),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149794.519277.patch
Type: text/x-patch
Size: 1384 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230503/1d1b9c49/attachment.bin>
More information about the libcxx-commits
mailing list