Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 5 pull requests #133378

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions compiler/rustc_codegen_ssa/src/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, _) => {}
}
Expand All @@ -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 => {}
Expand All @@ -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 => {}
}
Expand All @@ -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") {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>",
};
}
11 changes: 1 addition & 10 deletions compiler/rustc_passes/src/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
Loading