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

Commits on Nov 23, 2024

  1. Configuration menu
    Copy the full SHA
    cdbf682 View commit details
    Browse the repository at this point in the history
  2. Add new files

    aheejin committed Nov 23, 2024
    Configuration menu
    Copy the full SHA
    f619917 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2024

  1. Restore deleted __config_site

    This is our emscripten-specific configuration file and was mistakenly
    deleted when I ran update_libcxx.py.
    aheejin committed Dec 4, 2024
    Configuration menu
    Copy the full SHA
    b74dda1 View commit details
    Browse the repository at this point in the history
  2. Re-add + update __assertion_handler from default_assertion_handler.in

    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`.
    aheejin committed Dec 4, 2024
    Configuration menu
    Copy the full SHA
    41f8037 View commit details
    Browse the repository at this point in the history
  3. Restore deleted Emscripten-specific files

    These Emscripten-specific files were mistakenly deleted when I ran
    update_libcxx.py.
    aheejin committed Dec 4, 2024
    Configuration menu
    Copy the full SHA
    6eec95b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4b969c3 View commit details
    Browse the repository at this point in the history
  5. Build libc++ / libc++abi with C++23

    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
    aheejin committed Dec 4, 2024
    Configuration menu
    Copy the full SHA
    8b0bfdf View commit details
    Browse the repository at this point in the history
  6. Exclude compiler_rt_shims.cpp

    aheejin committed Dec 4, 2024
    Configuration menu
    Copy the full SHA
    5bbcbf0 View commit details
    Browse the repository at this point in the history
  7. Disable time zone support

    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.
    aheejin committed Dec 4, 2024
    Configuration menu
    Copy the full SHA
    a5f2cbe View commit details
    Browse the repository at this point in the history
  8. Remove basic_string<unsigned_char> from embind

    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.
    aheejin committed Dec 4, 2024
    Configuration menu
    Copy the full SHA
    643050f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9f291d8 View commit details
    Browse the repository at this point in the history
  10. Rebaseline size tests

    Not sure why but some of them decreasd by ~3%. Increases don't seem to
    be meaningful; they are usually ~0.3%.
    aheejin committed Dec 4, 2024
    Configuration menu
    Copy the full SHA
    1fb1316 View commit details
    Browse the repository at this point in the history
  11. Remove basic_string<unsigned_char> from embind

    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.
    aheejin committed Dec 4, 2024
    Configuration menu
    Copy the full SHA
    ba8abf7 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b132cff View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    d7aa36b View commit details
    Browse the repository at this point in the history