File tree 2 files changed +52
-45
lines changed
2 files changed +52
-45
lines changed Original file line number Diff line number Diff line change @@ -269,51 +269,6 @@ COLLECT_NO_DEMANGLE=1
269
269
* Build the stage2 compiler (`rustup toolchain link debug-current build/x86_64-unknown-linux-gnu/stage2`).
270
270
* Clean and rebuild the codegen with `debug-current` in the file `rust-toolchain`.
271
271
272
- ### How to install a forked git-subtree
273
-
274
- Using git-subtree with `rustc` requires a patched git to make it work.
275
- The PR that is needed is [here](https://github.com/gitgitgadget/git/pull/493).
276
- Use the following instructions to install it:
277
-
278
- ```bash
279
- git clone [email protected] :tqc/git.git
280
- cd git
281
- git checkout tqc/subtree
282
- make
283
- make install
284
- cd contrib/subtree
285
- make
286
- cp git-subtree ~/bin
287
- ```
288
-
289
- Then, do a sync with this command:
290
-
291
- ``` bash
292
- PATH=" $HOME /bin:$PATH " ~ /bin/git-subtree push -P compiler/rustc_codegen_gcc/ ../rustc_codegen_gcc/ sync_branch_name
293
- cd ../rustc_codegen_gcc
294
- git checkout master
295
- git pull
296
- git checkout sync_branch_name
297
- git merge master
298
- ```
299
-
300
- To send the changes to the rust repo:
301
-
302
- ``` bash
303
- cd ../rust
304
- git pull origin master
305
- git checkout -b subtree-update_cg_gcc_YYYY-MM-DD
306
- PATH=" $HOME /bin:$PATH " ~ /bin/git-subtree pull --prefix=compiler/rustc_codegen_gcc/ https://github.com/rust-lang/rustc_codegen_gcc.git master
307
- git push
308
-
309
- # Immediately merge the merge commit into cg_gcc to prevent merge conflicts when syncing from rust-lang/rust later.
310
- PATH=" $HOME /bin:$PATH " ~ /bin/git-subtree push -P compiler/rustc_codegen_gcc/ ../rustc_codegen_gcc/ sync_branch_name
311
- ```
312
-
313
- TODO: write a script that does the above.
314
-
315
- https://rust-lang.zulipchat.com/#narrow/stream/301329-t-devtools/topic/subtree.20madness/near/258877725
316
-
317
272
### How to use [mem-trace](https://github.com/antoyo/mem-trace)
318
273
319
274
`rustc` needs to be built without `jemalloc` so that `mem-trace` can overload `malloc` since `jemalloc` is linked statically, so a `LD_PRELOAD`-ed library won't a chance to intercept the calls to `malloc`.
Original file line number Diff line number Diff line change
1
+ # git subtree sync
2
+
3
+ ` rustc_codegen_gcc ` is a subtree of the rust compiler. As such, it needs to be
4
+ sync from time to time to ensure changes that happened on their side are also
5
+ included on our side.
6
+
7
+ ### How to install a forked git-subtree
8
+
9
+ Using git-subtree with ` rustc ` requires a patched git to make it work.
10
+ The PR that is needed is [ here] ( https://github.com/gitgitgadget/git/pull/493 ) .
11
+ Use the following instructions to install it:
12
+
13
+ ``` bash
14
+ git clone
[email protected] :tqc/git.git
15
+ cd git
16
+ git checkout tqc/subtree
17
+ make
18
+ make install
19
+ cd contrib/subtree
20
+ make
21
+ cp git-subtree ~ /bin
22
+ ```
23
+
24
+ ### Syncing with rust compiler
25
+
26
+ Do a sync with this command:
27
+
28
+ ``` bash
29
+ PATH=" $HOME /bin:$PATH " ~ /bin/git-subtree push -P compiler/rustc_codegen_gcc/ ../rustc_codegen_gcc/ sync_branch_name
30
+ cd ../rustc_codegen_gcc
31
+ git checkout master
32
+ git pull
33
+ git checkout sync_branch_name
34
+ git merge master
35
+ ```
36
+
37
+ To send the changes to the rust repo:
38
+
39
+ ``` bash
40
+ cd ../rust
41
+ git pull origin master
42
+ git checkout -b subtree-update_cg_gcc_YYYY-MM-DD
43
+ PATH=" $HOME /bin:$PATH " ~ /bin/git-subtree pull --prefix=compiler/rustc_codegen_gcc/ https://github.com/rust-lang/rustc_codegen_gcc.git master
44
+ git push
45
+
46
+ # Immediately merge the merge commit into cg_gcc to prevent merge conflicts when syncing from rust-lang/rust later.
47
+ PATH=" $HOME /bin:$PATH " ~ /bin/git-subtree push -P compiler/rustc_codegen_gcc/ ../rustc_codegen_gcc/ sync_branch_name
48
+ ```
49
+
50
+ TODO: write a script that does the above.
51
+
52
+ https://rust-lang.zulipchat.com/#narrow/stream/301329-t-devtools/topic/subtree.20madness/near/258877725
You can’t perform that action at this time.
0 commit comments