Skip to content

Commit 7cb5e0d

Browse files
authored
[Docs] Add process for updating musl (#20157)
This adds the process for updating musl to `process.md`. Drive-by fix of the LLVM git upstream address.
1 parent 10d156e commit 7cb5e0d

File tree

1 file changed

+38
-3
lines changed

1 file changed

+38
-3
lines changed

docs/process.md

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,11 @@ To update our libraries to a newer LLVM release:
211211
cases to run [`push_llvm_changes.py`][push_llvm_changes_emscripten] first to
212212
ensure that no emscripten changes are lost in the process.
213213
1. Create a PR to merge new LLVM release tag in the upstream repo into our new
214-
library branch. For example, if we want to merge LLVM 16.0.6 release into our
215-
`emscripten-libs-16` branch, you can do
214+
library branch. For example, if we want to merge `llvmorg-16.0.6` tag into
215+
our `emscripten-libs-16` branch, you can do
216216
```
217217
git co emscripten-libs-16
218-
git remote add upstream https://github.com/llvm/llvm-project
218+
git remote add upstream git@github.com:llvm/llvm-project.git
219219
git fetch --tags upstream
220220
git merge llvmorg-16.0.6
221221
```
@@ -234,6 +234,39 @@ To update our libraries to a newer LLVM release:
234234
An example of such PR is emscripten-core/emscripten#19515.
235235

236236

237+
## Updating musl
238+
239+
We maintain our musl in
240+
https://github.com/emscripten-core/emscripten/tree/main/system/lib/libc/musl.
241+
We maintain a fork of musl in https://github.com/emscripten-core/musl for
242+
updates and periodically update it to a newer version.
243+
244+
The process for updating musl is similar to that of updating the LLVM libraries.
245+
To update our libraries to a newer musl release:
246+
247+
1. If you are updating an existing branch the first step is to run
248+
[`push_musl_changes.py`][push_musl_changes_emscripten] to make sure the
249+
current branch is up-to-date with the current emscripten codebase.
250+
251+
If you are creating a new branch, first make sure the previous/existing
252+
branch is up-to-date using
253+
[`push_musl_changes.py`][push_musl_changes_emscripten]. Then
254+
create the new branch and cherry-pick all the emscripten-specific changes
255+
from the old branch, resolving any conflicts that might arise.
256+
1. Create a PR to merge new mrelease tag in the upstream repo into our new
257+
library branch. For example, if we want to merge musl's `v1.2.4` tag into our
258+
`merge-v1.2.4` branch, you can do
259+
```
260+
git co merge-v1.2.4
261+
git remote add upstream git://git.musl-libc.org/musl
262+
git fetch --tags upstream
263+
git merge v1.2.4
264+
```
265+
1. Now we have merged all the changes to our musl fork branch, pull those
266+
changes with the new version back into the Emscripten repo. You can use
267+
[`update_musl.py`][update_musl_emscripten] for that.
268+
269+
237270
[site_repo]: https://github.com/kripken/emscripten-site
238271
[releases_repo]: https://chromium.googlesource.com/emscripten-releases
239272
[waterfall]: https://ci.chromium.org/p/emscripten-releases/g/main/console
@@ -253,7 +286,9 @@ To update our libraries to a newer LLVM release:
253286
[llvm_repo]: https://github.com/llvm/llvm-project
254287
[llvm_emscripten_fork]: https://github.com/emscripten-core/llvm-project
255288
[push_llvm_changes_emscripten]: https://github.com/emscripten-core/emscripten/blob/main/system/lib/push_llvm_changes.py
289+
[push_musl_changes_emscripten]: https://github.com/emscripten-core/emscripten/blob/main/system/lib/push_musl_changes.py
256290
[update_compiler_rt_emscripten]: https://github.com/emscripten-core/emscripten/blob/main/system/lib/update_compiler_rt.py
257291
[update_libcxx_emscripten]: https://github.com/emscripten-core/emscripten/blob/main/system/lib/update_libcxx.py
258292
[update_libcxxabi_emscripten]: https://github.com/emscripten-core/emscripten/blob/main/system/lib/update_libcxxabi.py
259293
[update_libunwind_emscripten]: https://github.com/emscripten-core/emscripten/blob/main/system/lib/update_libunwind.py
294+
[update_musl_emscripten]: https://github.com/emscripten-core/emscripten/blob/main/system/lib/update_musl.py

0 commit comments

Comments
 (0)