about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/back
AgeCommit message (Collapse)AuthorLines
2022-12-19Rollup merge of #105864 - matthiaskrgr:compl, r=NilstriebDylan DPC-1/+1
clippy::complexity fixes filter_next needless_question_mark bind_instead_of_map manual_find derivable_impls map_identity redundant_slicing skip_while_next unnecessary_unwrap needless_bool r? `@compiler-errors`
2022-12-19clippy::complexity fixesMatthias Krüger-1/+1
filter_next needless_question_mark bind_instead_of_map manual_find derivable_impls map_identity redundant_slicing skip_while_next unnecessary_unwrap needless_bool
2022-12-18don't restuct references just to reborrowMatthias Krüger-2/+2
2022-12-16don't copy symbols from dylibs with -Zdylib-ltoRémy Rakic-1/+1
2022-12-14Auto merge of #105221 - alex:fat-archive-cleanup, r=bjorn3bors-36/+34
Avoid a temporary file when processing macOS fat archives r? `@bjorn3`
2022-12-08Rollup merge of #105423 - oli-obk:symbols, r=jackh726Matthias Krüger-1/+1
Use `Symbol` for the crate name instead of `String`/`str` It always got converted to a symbol anyway
2022-12-07Use `Symbol` for the crate name instead of `String`/`str`Oli Scherer-1/+1
2022-12-07fix: remove hack from link.rs (moved to libc)Daniil Belov-9/+0
2022-12-03Avoid a temporary file when processing macOS fat archivesAlex Gaynor-36/+34
2022-12-03Auto merge of #97485 - bjorn3:new_archive_writer, r=wesleywiserbors-2/+229
Rewrite LLVM's archive writer in Rust This allows it to be used by other codegen backends. Fixes https://github.com/bjorn3/rustc_codegen_cranelift/issues/1155
2022-12-03Make sure all input archives are unmapped before persisting the output archivebjorn3-1/+7
2022-12-02Write to temp file before renaming to the final namebjorn3-4/+22
2022-11-28Rollup merge of #104360 - petrochenkov:stabverb, r=TaKO8KiDylan DPC-11/+7
Stabilize native library modifier `verbatim` Stabilization report - https://github.com/rust-lang/rust/pull/104360#issuecomment-1312724787. cc https://github.com/rust-lang/rust/issues/81490 Closes https://github.com/rust-lang/rust/issues/99425
2022-11-27Stabilize native library modifier `verbatim`Vadim Petrochenkov-11/+7
2022-11-27Prefer doc comments over `//`-comments in compilerMaybe Waffle-45/+45
2022-11-26Rewrite LLVM's archive writer in Rustbjorn3-2/+205
This allows it to be used by other codegen backends
2022-11-24rustc_codegen_ssa: write `.dwp` in a streaming fashionWeihang Lo-4/+5
2022-11-19Rollup merge of #104001 - Ayush1325:custom-entry, r=bjorn3Dylan DPC-1/+2
Improve generating Custom entry function This commit is aimed at making compiler-generated entry functions (Basically just C `main` right now) more generic so other targets can do similar things for custom entry. This was initially implemented as part of https://github.com/rust-lang/rust/pull/100316. Currently, this moves the entry function name and Call convention to the target spec. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-14Issue error when `-C link-self-contained` option is used on unsupported ↵StackDoubleFlow-0/+3
platforms Document supported targets for `-C link-self-contained` Move `LinkSelfContainedDefault::True` from wasm_base to wasm32_wasi
2022-11-15Auto merge of #104091 - BelovDV:issue-103044, r=petrochenkovbors-15/+31
Wrap bundled static libraries into object files Fixes #103044 (not sure, couldn't test locally) Bundled static libraries should be wrapped into object files as it's done for metadata file. r? `@petrochenkov`
2022-11-14Wrap bundlen static libraries into object filesDaniil Belov-15/+31
2022-11-12linker: Link `profiler_builtins` even if it's marked as `NotLinked`Vadim Petrochenkov-3/+4
2022-11-12linker: Support mixing crates built with different values of ↵Vadim Petrochenkov-9/+7
`-Zpacked_bundled_libs` So you can change the value of `-Zpacked_bundled_libs` without rebuilding standard library
2022-11-12linker: Move some inner functions to the outsideVadim Petrochenkov-133/+127
Inline `fn unlib`
2022-11-12linker: Simplify linking of `compiler_builtins` and `profiler_builtins`Vadim Petrochenkov-68/+33
This also fixes linking of native libraries bundled into these crates when `-Zpacked-bundled-libs` is enabled
2022-11-12linker: Factor out native library linking to a separate functionVadim Petrochenkov-213/+207
2022-11-11Rollup merge of #102215 - alexcrichton:wasm-link-whole-archive, r=estebankManish Goregaokar-2/+2
Implement the `+whole-archive` modifier for `wasm-ld` This implements the `Linker::{link_whole_staticlib,link_whole_rlib}` methods for the `WasmLd` linker used on wasm targets. Previously these methods were noops since I think historically `wasm-ld` did not have support for `--whole-archive` but nowadays it does, so the flags are passed through.
2022-11-11Improve generating Custom entry functionAyush Singh-1/+2
This commit is aimed at making compiler generated entry functions (Basically just C `main` right now) more generic so other targets can do similar things for custom entry. This was initially implemented as part of https://github.com/rust-lang/rust/pull/100316. Currently, this moves the entry function name and Call convention to the target spec. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-09Add constructor for `Diagnostic` that takes `Vec<(DiagnosticMessage, Style)>`SLASHLogin-2/+1
2022-11-09Add `replace_args` method for `rustc_errors::diagnostic::Diagnostic`SLASHLogin-3/+1
2022-11-09Delay diagnostic translation in `rustc_codegen_ssa`SLASHLogin-9/+18
2022-11-05Rollup merge of #103660 - ozkanonur:master, r=jyn514Dylan DPC-1/+2
improve `filesearch::get_or_default_sysroot` `fn get_or_default_sysroot` is now improved and used in `miri` and `clippy`, and tests are still passing as they should. So we no longer need to implement custom workarounds/hacks to find sysroot in tools like miri/clippy. Resolves https://github.com/rust-lang/rust/issues/98832 re-opened from #103581
2022-11-04improve `filesearch::get_or_default_sysroot` r=ozkanonurOnur Özkan-1/+2
Signed-off-by: Onur Özkan <work@onurozkan.dev>
2022-11-04UPDATE - accept dyn error and make Box<dyn error> conform to IntoDiagnosticArgJhonny Bill Mena-15/+14
2022-11-04UPDATE - address PR CommentsJhonny Bill Mena-39/+20
FIX - StrippingDebugInfoFailed typo DELETE - unneeded FIXME comment UPDATE - only declare the error with ExtractBundledLibsError as an enum and use the Diagnostic derive macro
2022-11-04FIX - Migrate missing errors in link.rsJhonny Bill Mena-4/+4
2022-11-04ADD - ExtractBundledLibsError. Migrated extract_bundled_libs to translatable ↵Jhonny Bill Mena-19/+42
diagnostics
2022-11-04UPDATE - Complete link.rs migration to new diagnostics infraestructureJhonny Bill Mena-80/+43
2022-10-31Rewrite implementation of `#[alloc_error_handler]`Amanieu d'Antras-2/+5
The new implementation doesn't use weak lang items and instead changes `#[alloc_error_handler]` to an attribute macro just like `#[global_allocator]`. The attribute will generate the `__rg_oom` function which is called by the compiler-generated `__rust_alloc_error_handler`. If no `__rg_oom` function is defined in any crate then the compiler shim will call `__rdl_oom` in the alloc crate which will simply panic. This also fixes link errors with `-C link-dead-code` with `default_alloc_error_handler`: `__rg_oom` was previously defined in the alloc crate and would attempt to reference the `oom` lang item, even if it didn't exist. This worked as long as `__rg_oom` was excluded from linking since it was not called. This is a prerequisite for the stabilization of `default_alloc_error_handler` (#102318).
2022-10-24Support raw-dylib functions being used inside inlined functionsDaniel Paoliello-5/+37
2022-10-23Introduce dedicated `-Zdylib-lto` flag for enabling LTO on `dylib`sJakub Beránek-4/+9
2022-10-23Allow LTO for dylibsbjorn3-11/+29
2022-10-23Add missing export for the oom strategy symbolbjorn3-1/+10
2022-10-22Auto merge of #103240 - BelovDV:issue-102290, r=petrochenkovbors-0/+4
Add architectures to fn create_object_file Fixes #102290 r? `@petrochenkov`
2022-10-22Auto merge of #103196 - Nilstrieb:no-meta-query, r=cjgillotbors-1/+1
Get rid of native_library projection queries They don't seem particularly useful as I don't expect native libraries to change frequently. Maybe they do provide significant value of keeping incremental compilation green though, I'm not sure.
2022-10-20Auto merge of #103092 - petrochenkov:weaklto, r=wesleywiserbors-1/+1
linker: Fix weak lang item linking with combination windows-gnu + LLD + LTO In https://github.com/rust-lang/rust/pull/100404 this logic was originally disabled for MSVC due to issues with LTO, but the same issues appear on windows-gnu with LLD because that LLD uses the same underlying logic as MSVC LLD, just with re-syntaxed command line options. So this PR just disables it for LTO builds in general.
2022-10-19Get rid of native_library projection queriesnils-1/+1
They don't seem particularly useful as I don't expect native libraries to change frequently.
2022-10-19Add architectures to fn create_object_fileDaniil Belov-0/+4
2022-10-18Auto merge of #102418 - citrus-it:illumos-strip-debug, r=nagisabors-9/+40
The illumos linker does not support --strip-debug When building and testing rust 1.64.0 on illumos, we saw a large number of failing tests associated with: ``` = note: ld: fatal: unrecognized option '--strip-debug' ld: fatal: use the -z help option for usage information collect2: error: ld returned 1 exit status ``` The illumos linker does not support the `--strip-debug` option (although it does support `--strip-all`).
2022-10-15linker: Fix weak lang item linking with combination windows-gnu + LLD + LTOVadim Petrochenkov-1/+1