Skip to content

Commit bcd0bf5

Browse files
authored
Merge pull request rust-lang#388 from rust-lang/sync_from_rust_2023_11_21
Sync from rust 2023/11/21
2 parents 2e8386e + fbb97bd commit bcd0bf5

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,9 @@ git pull origin master
295295
git checkout -b subtree-update_cg_gcc_YYYY-MM-DD
296296
PATH="$HOME/bin:$PATH" ~/bin/git-subtree pull --prefix=compiler/rustc_codegen_gcc/ https://github.com/rust-lang/rustc_codegen_gcc.git master
297297
git push
298+
299+
# Immediately merge the merge commit into cg_gcc to prevent merge conflicts when syncing from rust-lang/rust later.
300+
PATH="$HOME/bin:$PATH" ~/bin/git-subtree push -P compiler/rustc_codegen_gcc/ ../rustc_codegen_gcc/ sync_branch_name
298301
```
299302

300303
TODO: write a script that does the above.

src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pub fn compile_codegen_unit(tcx: TyCtxt<'_>, cgu_name: Symbol, target_info: Lock
8888
fn module_codegen(tcx: TyCtxt<'_>, (cgu_name, target_info): (Symbol, LockedTargetInfo)) -> ModuleCodegen<GccContext> {
8989
let cgu = tcx.codegen_unit(cgu_name);
9090
// Instantiate monomorphizations without filling out definitions yet...
91-
let context = new_context(&tcx);
91+
let context = new_context(tcx);
9292

9393
if tcx.sess.panic_strategy() == PanicStrategy::Unwind {
9494
context.add_command_line_option("-fexceptions");

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ impl CodegenBackend for GccCodegenBackend {
246246
}
247247
}
248248

249-
fn new_context<'gcc, 'tcx>(tcx: &TyCtxt<'tcx>) -> Context<'gcc> {
249+
fn new_context<'gcc, 'tcx>(tcx: TyCtxt<'tcx>) -> Context<'gcc> {
250250
let context = Context::default();
251251
if tcx.sess.target.arch == "x86" || tcx.sess.target.arch == "x86_64" {
252252
context.add_command_line_option("-masm=intel");
@@ -268,7 +268,7 @@ fn new_context<'gcc, 'tcx>(tcx: &TyCtxt<'tcx>) -> Context<'gcc> {
268268
impl ExtraBackendMethods for GccCodegenBackend {
269269
fn codegen_allocator<'tcx>(&self, tcx: TyCtxt<'tcx>, module_name: &str, kind: AllocatorKind, alloc_error_handler_kind: AllocatorKind) -> Self::Module {
270270
let mut mods = GccContext {
271-
context: new_context(&tcx),
271+
context: new_context(tcx),
272272
should_combine_object_files: false,
273273
temp_dir: None,
274274
};

0 commit comments

Comments
 (0)