Skip to content

Commit 36f3c03

Browse files
committed
Update instructions
1 parent e5b824c commit 36f3c03

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,38 @@ git subtree push --prefix=compiler/rustc_smir url_to_your_fork_of_project_stable
1919

2020
and then open a PR of your `some_feature_branch` against https://github.com/rust-lang/project-stable-mir
2121

22-
### Updating the rustc librar
22+
### Updating the rustc library
2323

24+
First we need to bump our stack limit, as the rustc repo otherwise quickly hits that:
25+
26+
```
27+
ulimit -s 60000
28+
```
29+
30+
#### Maximum function recursion depth (1000) reached
31+
32+
Then we need to disable `dash` as the default shell for sh scripts, as otherwise we run into a
33+
hard limit of a recursion depth of 1000:
34+
35+
```
36+
sudo dpkg-reconfigure dash
37+
```
38+
39+
and then select `No` to disable dash.
40+
41+
42+
#### Patching your `git worktree`
43+
44+
The regular git worktree does not scale to repos of the size of the rustc repo.
45+
So download the `git-subtree.sh` from https://github.com/gitgitgadget/git/pull/493/files and run
46+
47+
```
48+
sudo cp --backup /path/to/patched/git-subtree.sh /usr/lib/git-core/git-subtree
49+
sudo chmod --reference=/usr/lib/git-core/git-subtree~ /usr/lib/git-core/git-subtree
50+
sudo chown --reference=/usr/lib/git-core/git-subtree~ /usr/lib/git-core/git-subtree
51+
```
52+
53+
#### Actually doing a sync
2454

2555
In the rustc repo, execute
2656

0 commit comments

Comments
 (0)