Auto merge of #133379 - jieyouxu:rollup-00jxo71, r=jieyouxu
Rollup of 4 pull requests Successful merges: - #133217 ([AIX] Add option -X32_64 to the "strip" command) - #133237 (Minimally constify `Add`) - #133355 (Add language tests for aggregate types) - #133374 (show abi_unsupported_vector_types lint in future breakage reports) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
15b663e684
23 changed files with 922 additions and 90 deletions
|
@ -1117,14 +1117,14 @@ fn link_natively(
|
|||
let stripcmd = "rust-objcopy";
|
||||
match (strip, crate_type) {
|
||||
(Strip::Debuginfo, _) => {
|
||||
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-S"))
|
||||
strip_symbols_with_external_utility(sess, stripcmd, out_filename, &["-S"])
|
||||
}
|
||||
// Per the manpage, `-x` is the maximum safe strip level for dynamic libraries. (#93988)
|
||||
(Strip::Symbols, CrateType::Dylib | CrateType::Cdylib | CrateType::ProcMacro) => {
|
||||
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-x"))
|
||||
strip_symbols_with_external_utility(sess, stripcmd, out_filename, &["-x"])
|
||||
}
|
||||
(Strip::Symbols, _) => {
|
||||
strip_symbols_with_external_utility(sess, stripcmd, out_filename, None)
|
||||
strip_symbols_with_external_utility(sess, stripcmd, out_filename, &[])
|
||||
}
|
||||
(Strip::None, _) => {}
|
||||
}
|
||||
|
@ -1141,7 +1141,7 @@ fn link_natively(
|
|||
match strip {
|
||||
// Always preserve the symbol table (-x).
|
||||
Strip::Debuginfo => {
|
||||
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-x"))
|
||||
strip_symbols_with_external_utility(sess, stripcmd, out_filename, &["-x"])
|
||||
}
|
||||
// Strip::Symbols is handled via the --strip-all linker option.
|
||||
Strip::Symbols => {}
|
||||
|
@ -1158,11 +1158,15 @@ fn link_natively(
|
|||
match strip {
|
||||
Strip::Debuginfo => {
|
||||
// FIXME: AIX's strip utility only offers option to strip line number information.
|
||||
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-l"))
|
||||
strip_symbols_with_external_utility(sess, stripcmd, out_filename, &[
|
||||
"-X32_64", "-l",
|
||||
])
|
||||
}
|
||||
Strip::Symbols => {
|
||||
// Must be noted this option might remove symbol __aix_rust_metadata and thus removes .info section which contains metadata.
|
||||
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-r"))
|
||||
strip_symbols_with_external_utility(sess, stripcmd, out_filename, &[
|
||||
"-X32_64", "-r",
|
||||
])
|
||||
}
|
||||
Strip::None => {}
|
||||
}
|
||||
|
@ -1181,12 +1185,10 @@ fn strip_symbols_with_external_utility(
|
|||
sess: &Session,
|
||||
util: &str,
|
||||
out_filename: &Path,
|
||||
option: Option<&str>,
|
||||
options: &[&str],
|
||||
) {
|
||||
let mut cmd = Command::new(util);
|
||||
if let Some(option) = option {
|
||||
cmd.arg(option);
|
||||
}
|
||||
cmd.args(options);
|
||||
|
||||
let mut new_path = sess.get_tools_search_paths(false);
|
||||
if let Some(path) = env::var_os("PATH") {
|
||||
|
|
|
@ -5173,7 +5173,7 @@ declare_lint! {
|
|||
Warn,
|
||||
"this function call or definition uses a vector type which is not enabled",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reason: FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps,
|
||||
reason: FutureIncompatibilityReason::FutureReleaseErrorReportInDeps,
|
||||
reference: "issue #116558 <https://github.com/rust-lang/rust/issues/116558>",
|
||||
};
|
||||
}
|
||||
|
|
|
@ -590,16 +590,7 @@ impl<'tcx> MissingStabilityAnnotations<'tcx> {
|
|||
}
|
||||
|
||||
fn check_missing_const_stability(&self, def_id: LocalDefId, span: Span) {
|
||||
// if the const impl is derived using the `derive_const` attribute,
|
||||
// then it would be "stable" at least for the impl.
|
||||
// We gate usages of it using `feature(const_trait_impl)` anyways
|
||||
// so there is no unstable leakage
|
||||
if self.tcx.is_automatically_derived(def_id.to_def_id()) {
|
||||
return;
|
||||
}
|
||||
|
||||
let is_const = self.tcx.is_const_fn(def_id.to_def_id())
|
||||
|| self.tcx.is_const_trait_impl(def_id.to_def_id());
|
||||
let is_const = self.tcx.is_const_fn(def_id.to_def_id());
|
||||
|
||||
// Reachable const fn must have a stability attribute.
|
||||
if is_const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue