about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Readme.md3
-rw-r--r--src/base.rs2
-rw-r--r--src/lib.rs4
3 files changed, 6 insertions, 3 deletions
diff --git a/Readme.md b/Readme.md
index 95fc6374c09..20871ceb814 100644
--- a/Readme.md
+++ b/Readme.md
@@ -295,6 +295,9 @@ git pull origin master
 git checkout -b subtree-update_cg_gcc_YYYY-MM-DD
 PATH="$HOME/bin:$PATH" ~/bin/git-subtree pull --prefix=compiler/rustc_codegen_gcc/ https://github.com/rust-lang/rustc_codegen_gcc.git master
 git push
+
+# Immediately merge the merge commit into cg_gcc to prevent merge conflicts when syncing from rust-lang/rust later.
+PATH="$HOME/bin:$PATH" ~/bin/git-subtree push -P compiler/rustc_codegen_gcc/ ../rustc_codegen_gcc/ sync_branch_name
 ```
 
 TODO: write a script that does the above.
diff --git a/src/base.rs b/src/base.rs
index 3ffdab8b16c..b0788718da4 100644
--- a/src/base.rs
+++ b/src/base.rs
@@ -88,7 +88,7 @@ pub fn compile_codegen_unit(tcx: TyCtxt<'_>, cgu_name: Symbol, target_info: Lock
     fn module_codegen(tcx: TyCtxt<'_>, (cgu_name, target_info): (Symbol, LockedTargetInfo)) -> ModuleCodegen<GccContext> {
         let cgu = tcx.codegen_unit(cgu_name);
         // Instantiate monomorphizations without filling out definitions yet...
-        let context = new_context(&tcx);
+        let context = new_context(tcx);
 
         if tcx.sess.panic_strategy() == PanicStrategy::Unwind {
             context.add_command_line_option("-fexceptions");
diff --git a/src/lib.rs b/src/lib.rs
index fb60d771332..8c7bae0c886 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -246,7 +246,7 @@ impl CodegenBackend for GccCodegenBackend {
     }
 }
 
-fn new_context<'gcc, 'tcx>(tcx: &TyCtxt<'tcx>) -> Context<'gcc> {
+fn new_context<'gcc, 'tcx>(tcx: TyCtxt<'tcx>) -> Context<'gcc> {
     let context = Context::default();
     if tcx.sess.target.arch == "x86" || tcx.sess.target.arch == "x86_64" {
         context.add_command_line_option("-masm=intel");
@@ -268,7 +268,7 @@ fn new_context<'gcc, 'tcx>(tcx: &TyCtxt<'tcx>) -> Context<'gcc> {
 impl ExtraBackendMethods for GccCodegenBackend {
     fn codegen_allocator<'tcx>(&self, tcx: TyCtxt<'tcx>, module_name: &str, kind: AllocatorKind, alloc_error_handler_kind: AllocatorKind) -> Self::Module {
         let mut mods = GccContext {
-            context: new_context(&tcx),
+            context: new_context(tcx),
             should_combine_object_files: false,
             temp_dir: None,
         };