Skip to content

Commit

Permalink
Revert "Rollup merge of rust-lang#126938 - RalfJung:link_section, r=c…
Browse files Browse the repository at this point in the history
…ompiler-errors"

This reverts commit 5c4ede8, reversing
changes made to 95332b8.
  • Loading branch information
lqd committed Jun 28, 2024
1 parent c4c0897 commit 224cb3f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
12 changes: 10 additions & 2 deletions compiler/rustc_passes/src/reachable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use rustc_hir::def_id::{DefId, LocalDefId};
use rustc_hir::intravisit::{self, Visitor};
use rustc_hir::Node;
use rustc_middle::bug;
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs};
use rustc_middle::middle::privacy::{self, Level};
use rustc_middle::mir::interpret::{ConstAllocation, ErrorHandled, GlobalAlloc};
use rustc_middle::query::Providers;
Expand Down Expand Up @@ -178,7 +178,15 @@ impl<'tcx> ReachableContext<'tcx> {
if !self.any_library {
// If we are building an executable, only explicitly extern
// types need to be exported.
if has_custom_linkage(self.tcx, search_item) {
let codegen_attrs = if self.tcx.def_kind(search_item).has_codegen_attrs() {
self.tcx.codegen_fn_attrs(search_item)
} else {
CodegenFnAttrs::EMPTY
};
let is_extern = codegen_attrs.contains_extern_indicator();
let std_internal =
codegen_attrs.flags.contains(CodegenFnAttrFlags::RUSTC_STD_INTERNAL_SYMBOL);
if is_extern || std_internal {
self.reachable_symbols.insert(search_item);
}
} else {
Expand Down
16 changes: 0 additions & 16 deletions src/tools/miri/tests/pass/tls/win_tls_callback.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/tools/miri/tests/pass/tls/win_tls_callback.stderr

This file was deleted.

0 comments on commit 224cb3f

Please sign in to comment.