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 libcxx and libcxxabi to LLVM 19.1.4 #22994

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

aheejin
Copy link
Member

@aheejin aheejin commented Nov 23, 2024

No description provided.

@aheejin
Copy link
Member Author

aheejin commented Nov 23, 2024

Not tested yet. Will mark as ready for review after testing

This is our emscripten-specific configuration file and was mistakenly
deleted when I ran update_libcxx.py.
This file was added as a part of LLVM 18 update (emscripten-core#21638) in
emscripten-core@8d51927
and mistakenly deleted when I ran update_libcxx.py. This file was copied
from
https://github.com/llvm/llvm-project/blob/aadaa00de76ed0c4987b97450dd638f63a385bed/libcxx/vendor/llvm/default_assertion_handler.in, so this also updates the file with the newest `default_assertion_handler.in`.
These Emscripten-specific files were mistakenly deleted when I ran
update_libcxx.py.
https://github.com/llvm/llvm-project/blob/aadaa00de76ed0c4987b97450dd638f63a385bed/libcxx/src/expected.cpp
was added in llvm/llvm-project#87390 and this
file assumes C++23 to be compiled. Apparently libc++ sources are always
built with C++23 so they don't guard things against it in `src/`:
llvm/llvm-project#87390 (comment)

This also bumps libc++abi to C++23 because... why not
We disabled C++20 time zone support in LLVM 18 update (emscripten-core#21638):
emscripten-core@df9af64

The list of source files related to time zone support has changed in
llvm/llvm-project#74928, so this commit reflects
it.
Only `char`, `wchar`, `char8`, `char16`, and `char32` are valid
specialization for `std::basic_string`:
https://en.cppreference.com/w/cpp/string/basic_string

But libc++ had a base template for `basic_string` that allows any type
to be passed for a long time. It looks there have been several attempts
to remove this but they restored it afterwards due to some complaints,
in chronological order:
llvm/llvm-project@aeecef0
llvm/llvm-project@08a0faf
llvm/llvm-project@e30a148
llvm/llvm-project#66153
llvm/llvm-project#72694

The last one, llvm/llvm-project#72694,
eventually removed it. So `std::basic_string<unsigned_char>` is not
allowed anymore.
Not sure why but some of them decreasd by ~3%. Increases don't seem to
be meaningful; they are usually ~0.3%.
Only `char`, `wchar`, `char8`, `char16`, and `char32` are valid
specialization for `std::basic_string`:
https://en.cppreference.com/w/cpp/string/basic_string

But libc++ had a base template for `basic_string` that allowed any type
to be passed for a long time. It looks there have been several attempts
to remove this after which they restored it due to complaints, in
chronological order:
llvm/llvm-project@aeecef0
llvm/llvm-project@08a0faf
llvm/llvm-project@e30a148
llvm/llvm-project#66153
llvm/llvm-project#72694

The last one, llvm/llvm-project#72694,
eventually removed it. So `std::basic_string<unsigned_char>` is not
allowed anymore. This removes all uses of
`std::basic_string<unsigned_char>` from embind.

This needs to be done to update libc++ to LLVM 19 (emscripten-core#22994). I'm
uploading this as a separate PR because this removes a functionality
from embind.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant