emscripten-core / emscripten-core/emscripten

Use `git subtree` to manage LLVM libraries and musl

Open
#27,515 0 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

I only recently discover this features of git but apparently it has some advantages over `git submodule` for our use case.

1. It allows us to pull in just a sub-directory with the upstream repo (e.g. just compiler-rt and not the whole llvm)
2. We can maintain patches in-tree.
3. We can make changes the sub-tree in the same commit out changes to emscripten itself.

- No need to for a separate repo to keep in sync
- No need to manage `.gitmodules` metadata.
- No need to multi-step commits. We can commit a patch to mus land and immediately use & test it in emscripten.

See https://github.com/WebAssembly/wasi-libc/pull/797 for how this was done in wasi-libc.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the referenced wasi-libc pull request 797 and the repository's current .gitmodules metadata. Determine how git subtree could manage the LLVM libraries and musl while preserving in-tree patches and same-commit changes. Done means the dependencies are migrated without requiring a separate synchronization repository or multi-step commits.

Written by the indexing model from the issue text.

Assessment

Tech stack
git
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.