Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update libc++ to LLVM 17 #2306

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 0 additions & 6 deletions ObsoleteFiles.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1014,8 +1014,6 @@ OLD_DIRS+=usr/lib/clang/16/share
OLD_DIRS+=usr/lib/clang/16

# 20231208: new libc++ import which bumps version from 16 to 17
.if 0
# CHERI libc++ is still from 15.0.0
OLD_FILES+=usr/include/c++/v1/__bsd_locale_defaults.h
OLD_FILES+=usr/include/c++/v1/__bsd_locale_fallbacks.h
OLD_FILES+=usr/include/c++/v1/__debug
Expand All @@ -1038,7 +1036,6 @@ OLD_DIRS+=usr/include/c++/v1/__tuple_dir
OLD_FILES+=usr/include/c++/v1/experimental/algorithm
OLD_FILES+=usr/include/c++/v1/experimental/coroutine
OLD_FILES+=usr/include/c++/v1/experimental/functional
.endif

# 20231117: libufs version bumped to 8
OLD_LIBS+=lib/libufs.so.7
Expand Down Expand Up @@ -1551,12 +1548,9 @@ OLD_DIRS+=usr/lib/clang/15.0.7/share
OLD_DIRS+=usr/lib/clang/15.0.7

# 20230622: new libc++ import which bumps version from 15.0.7 to 16.0.1
.if 0
# CHERI libc++ is still from 15.0.0
OLD_FILES+=usr/include/c++/v1/__bits
OLD_FILES+=usr/include/c++/v1/__tuple
OLD_FILES+=usr/include/c++/v1/__utility/transaction.h
.endif

# 20230614: caroot bundle updated
OLD_FILES+=usr/share/certs/trusted/Cybertrust_Global_Root.pem
Expand Down
74 changes: 35 additions & 39 deletions contrib/subrepo-cheri-libc++/.clang-format
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
BasedOnStyle: LLVM
# Note that we don't specify the language in this file because some files are
# detected as Cpp, but others are detected as ObjC and we want this formatting
# to apply to all types of files.

AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: Consecutive
Expand All @@ -10,49 +13,48 @@ AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortFunctionsOnASingleLine: true
AllowShortLambdasOnASingleLine: All
AttributeMacros: ['_LIBCPP_HIDE_FROM_ABI',
'_LIBCPP_CONSTEXPR',
'_LIBCPP_CONSTEXPR_AFTER_CXX11',
'_LIBCPP_CONSTEXPR_AFTER_CXX14',
'_LIBCPP_CONSTEXPR_AFTER_CXX17',
'_LIBCPP_CONSTEXPR_AFTER_CXX20',
'_LIBCPP_ALIGNOF',
AttributeMacros: [
'_ALIGNAS_TYPE',
'_ALIGNAS',
'_LIBCPP_NORETURN',
'_LIBCPP_ALIGNOF',
'_LIBCPP_ALWAYS_INLINE',
'_LIBCPP_CONSTEXPR_SINCE_CXX14',
'_LIBCPP_CONSTEXPR_SINCE_CXX17',
'_LIBCPP_CONSTEXPR_SINCE_CXX20',
'_LIBCPP_CONSTEXPR_SINCE_CXX23',
'_LIBCPP_CONSTEXPR',
'_LIBCPP_CONSTINIT',
'_LIBCPP_DEPRECATED_IN_CXX11',
'_LIBCPP_DEPRECATED_IN_CXX14',
'_LIBCPP_DEPRECATED_IN_CXX17',
'_LIBCPP_DEPRECATED_IN_CXX20',
'_LIBCPP_DEPRECATED',
'_LIBCPP_DISABLE_EXTENTSION_WARNING',
'_LIBCPP_HIDDEN',
'_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS',
'_LIBCPP_FUNC_VIS',
'_LIBCPP_TYPE_VIS',
'_LIBCPP_TEMPLATE_VIS',
'_LIBCPP_TEMPLATE_DATA_VIS',
'_LIBCPP_EXPORTED_FROM_ABI',
'_LIBCPP_OVERRIDABLE_FUNC_VIS',
'_LIBCPP_EXCEPTION_ABI',
'_LIBCPP_ENUM_VIS',
'_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS',
'_LIBCPP_INTERNAL_LINKAGE',
'_LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION',
'_LIBCPP_EXPORTED_FROM_ABI',
'_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS',
'_LIBCPP_FALLTHROUGH',
'_LIBCPP_HIDDEN',
'_LIBCPP_HIDE_FROM_ABI_AFTER_V1',
'_LIBCPP_HIDE_FROM_ABI',
'_LIBCPP_INLINE_VISIBILITY',
'_LIBCPP_CONSTEVAL',
'_LIBCPP_INTERNAL_LINKAGE',
'_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS',
'_LIBCPP_NO_DESTROY',
'_LIBCPP_NO_SANITIZE',
'_LIBCPP_NO_UNIQUE_ADDRESS',
'_LIBCPP_NOALIAS',
'_LIBCPP_USING_IF_EXISTS',
'_LIBCPP_DEPRECATED',
'_LIBCPP_DEPRECATED_IN_CXX11',
'_LIBCPP_DEPRECATED_IN_CXX14',
'_LIBCPP_DEPRECATED_IN_CXX17',
'_LIBCPP_DEPRECATED_IN_CXX20',
'_LIBCPP_NODISCARD',
'_LIBCPP_NODISCARD_EXT',
'_LIBCPP_NO_DESTROY',
'_LIBCPP_WEAK',
'_LIBCPP_CONSTINIT',
'_LIBCPP_FALLTHROUGH',
'_LIBCPP_NODISCARD',
'_LIBCPP_NORETURN',
'_LIBCPP_OVERRIDABLE_FUNC_VIS',
'_LIBCPP_STANDALONE_DEBUG',
'_LIBCPP_NO_UNIQUE_ADDRESS',
'_LIBCPP_TEMPLATE_DATA_VIS',
'_LIBCPP_TEMPLATE_VIS',
'_LIBCPP_THREAD_SAFETY_ANNOTATION',
'_LIBCPP_USING_IF_EXISTS',
'_LIBCPP_WEAK',
]
BinPackArguments: false
BinPackParameters: false
Expand All @@ -65,23 +67,17 @@ IndentRequires: true
InsertTrailingCommas: Wrapped
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
PackConstructorInitializers: NextLine

PenaltyIndentedWhitespace: 61
PenaltyIndentedWhitespace: 2

Language: Cpp
Standard: c++20
SpacesInAngles: Leave

AlwaysBreakTemplateDeclarations: true
PointerAlignment: Left


# Disable formatting options which may break tests.
SortIncludes: false
ReflowComments: false

# libc++'s preferred indentions of preprocessor statements.
IndentPPDirectives: AfterHash

Expand Down
23 changes: 21 additions & 2 deletions contrib/subrepo-cheri-libc++/.clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Checks: >

modernize-loop-convert,
modernize-redundant-void-arg,
modernize-use-override,

readability-duplicate-include,
readability-identifier-naming,
Expand All @@ -24,6 +25,7 @@ Checks: >
readability-redundant-control-flow,
readability-redundant-function-ptr-dereference,
readability-redundant-preprocessor,
readability-simplify-boolean-expr,
readability-simplify-subscript-expr,
readability-uniqueptr-delete-release,

Expand All @@ -38,6 +40,24 @@ CheckOptions:
value: lower_case
- key: readability-identifier-naming.ParameterPrefix
value: __
- key: readability-identifier-naming.PrivateMemberCase
value: lower_case
- key: readability-identifier-naming.PrivateMemberPrefix
value: __
- key: readability-identifier-naming.PrivateMemberSuffix
value: _
- key: readability-identifier-naming.LocalVariableCase
value: lower_case
- key: readability-identifier-naming.LocalVariablePrefix
value: __
- key: readability-identifier-naming.TemplateParameterCase
value: CamelCase
- key: readability-identifier-naming.TemplateParameterPrefix
value: _
- key: readability-identifier-naming.TemplateParameterIgnoredRegexp
value: (.*\:auto|expr-type) # This is https://llvm.org/PR56464
- key: readability-identifier-naming.ValueTemplateParameterIgnoredRegexp # TODO: enforce naming of variable parameters
value: .*

# TODO: investigate these checks
# bugprone-branch-clone,
Expand All @@ -49,12 +69,11 @@ CheckOptions:
# modernize-use-equals-default,
# modernize-use-equals-delete,
# modernize-use-nullptr,
# modernize-use-override,
# portability-restrict-system-includes,
# readability-function-cognitive-complexity,
# readability-implicit-bool-conversion,
# readability-isolate-declaration,
# readability-redundant-access-specifiers,
# readability-redundant-declaration,
# readability-redundant-member-init,
# readability-simplify-boolean-expr,
#
6 changes: 3 additions & 3 deletions contrib/subrepo-cheri-libc++/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/CTSRD-CHERI/libcxx.git
branch = monorepo-mirror
commit = 2032cada639ea97cb09eb7947cc16d449f90ee6b
parent = ad8c8b997293787e2b80d5b0edf9cdf7236f770d
commit = f2afb8e0b40b8f1c4c5e33e41e388677f4800a7b
parent = 79faefc2c0c344521104d2ffb799fb54f7890bc0
method = rebase
cmdver = 0.4.6
cmdver = 0.4.9
Loading