emscripten-core / emscripten-core/emscripten

Which revision of LLVM is our llvm-libc based on?

Open
#26,035 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

What revision of LLVM is https://github.com/emscripten-core/emscripten/tree/main/system/lib/llvm-libc based on?

I'm asking because we now need to update our libraries to LLVM 21 is our llvm-libc revision is likely old than that. Because a part of llvm-libc and libcxx should be in sync, I think it's desirable (if not necessary) to llvm-libc at least follow [our LLVM regular library updates](https://github.com/emscripten-core/emscripten/blob/main/docs/process.md#updating-the-llvm-libraries), in which update libcxx, libcxxabi, compiler-rt, and libunwind. (In case I was not clear, I think it's fine that llvm-libc is newer than our LLVM library version, but shouldn't be older than that)

And without knowing the base revision, it's not easy to extract our Emscripten-specific changes.

I'm not even sure whether all code in llvm-libc is based on the same revision at this point. These are the PRs we imported llvm-libc: #24507, #24530, #24604, #24710, #24765, #24818. In case you remember, what were the revisions you imported the code from? And do you remember any Emscripten-specific changes you made, in case you remember?
@sbc100 @google-yfyang

Going forward, I suggest the following:
1. To the extent possible, I suggest we import from a single revision for all llvm-libc code and write down that revision in https://github.com/emscripten-core/emscripten/blob/main/system/lib/llvm-libc/readme.txt.
2. If 1 is not strictly possible and we need to import a part of the code from a newer revision than our codebase, it should be written down in `readme.txt` as well.
3. When doing our LLVM library updates, in case the llvm-libc revision is older than the LLVM release version, we update llvm-libc to at least follow the LLVM releases.

Or, should it really be tot LLVM now? If we have most of what we need, can't it follow the same LLVM release update schedule?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.