diff options
| author | bors <bors@rust-lang.org> | 2022-09-13 04:00:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-13 04:00:24 +0000 |
| commit | 9da4644d5685aa0c4daa4aea6ddc9eb834ae51cc (patch) | |
| tree | 2e1a170648c34c92b6847a271028e52e026c2f7c /compiler/rustc_session/src | |
| parent | 0df1ddc185af0d1b8d476851a50c42a31ebbb741 (diff) | |
| parent | ffa83596fe216c19e9d58c8318786edd07d23d5f (diff) | |
| download | rust-9da4644d5685aa0c4daa4aea6ddc9eb834ae51cc.tar.gz rust-9da4644d5685aa0c4daa4aea6ddc9eb834ae51cc.zip | |
Auto merge of #100101 - BelovDV:issue-99429, r=petrochenkov
change rlib format to distinguish native dependencies Another one method to solve problem mentioned in #99429. Changed .rlib format, it contains all bundled native libraries as archieves. At link time rlib is unpacked and native dependencies linked separately. New behavior hidden under separate_native_rlib_dependencies flag.
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/cstore.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_session/src/options.rs | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/cstore.rs b/compiler/rustc_session/src/cstore.rs index 11ef75bb2d4..7d4a1e212a4 100644 --- a/compiler/rustc_session/src/cstore.rs +++ b/compiler/rustc_session/src/cstore.rs @@ -68,6 +68,8 @@ pub enum LinkagePreference { pub struct NativeLib { pub kind: NativeLibKind, pub name: Option<Symbol>, + /// If packed_bundled_libs enabled, actual filename of library is stored. + pub filename: Option<Symbol>, pub cfg: Option<ast::MetaItem>, pub foreign_module: Option<DefId>, pub wasm_import_module: Option<Symbol>, diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index a25e3362a0c..d7f1bc0be84 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -1441,6 +1441,8 @@ options! { "pass `-install_name @rpath/...` to the macOS linker (default: no)"), diagnostic_width: Option<usize> = (None, parse_opt_number, [UNTRACKED], "set the current output width for diagnostic truncation"), + packed_bundled_libs: bool = (false, parse_bool, [TRACKED], + "change rlib format to store native libraries as archives"), panic_abort_tests: bool = (false, parse_bool, [TRACKED], "support compiling tests with panic=abort (default: no)"), panic_in_drop: PanicStrategy = (PanicStrategy::Unwind, parse_panic_strategy, [TRACKED], |
