about summary refs log tree commit diff
path: root/compiler/rustc_metadata/src/native_libs.rs
AgeCommit message (Collapse)AuthorLines
2021-10-08Rollup merge of #89649 - matthiaskrgr:clippycompl, r=jyn514Guillaume Gomez-1/+1
clippy::complexity fixes
2021-10-08clippy::complexity fixesMatthias Krüger-1/+1
2021-10-07Rollup merge of #89025 - ricobbe:raw-dylib-link-ordinal, r=michaelwoeristerJubilee-1/+7
Implement `#[link_ordinal(n)]` Allows the use of `#[link_ordinal(n)]` with `#[link(kind = "raw-dylib")]`, allowing Rust to link against DLLs that export symbols by ordinal rather than by name. As long as the ordinal matches, the name of the function in Rust is not required to match the name of the corresponding function in the exporting DLL. Part of #58713.
2021-10-05Auto merge of #89266 - cjgillot:session-ich, r=michaelwoeristerbors-1/+1
Move ICH to rustc_query_system Based on https://github.com/rust-lang/rust/pull/89183 The StableHashingContext does not need to be in rustc_middle. This PR moves it to rustc_query_system. This will avoid a dependency between rustc_ast_lowering and rustc_middle in https://github.com/rust-lang/rust/pull/89124.
2021-10-03Move rustc_middle::middle::cstore to rustc_session.Camille GILLOT-1/+1
2021-10-03Practice diagnostic message conventionHirochika Matsumoto-2/+2
2021-09-29Avoid more invocations of hir_crate query.Camille GILLOT-1/+1
2021-09-20Implement #[link_ordinal] attribute in the context of #[link(kind = ↵Richard Cobbe-1/+7
"raw-dylib")].
2021-09-20Do not store visibility in *ItemRef.Camille GILLOT-2/+2
2021-08-21Remove `Session.used_attrs` and move logic to `CheckAttrVisitor`Aaron Hill-2/+1
Instead of updating global state to mark attributes as used, we now explicitly emit a warning when an attribute is used in an unsupported position. As a side effect, we are to emit more detailed warning messages (instead of just a generic "unused" message). `Session.check_name` is removed, since its only purpose was to mark the attribute as used. All of the callers are modified to use `Attribute.has_name` Additionally, `AttributeType::AssumedUsed` is removed - an 'assumed used' attribute is implemented by simply not performing any checks in `CheckAttrVisitor` for a particular attribute. We no longer emit unused attribute warnings for the `#[rustc_dummy]` attribute - it's an internal attribute used for tests, so it doesn't mark sense to treat it as 'unused'. With this commit, a large source of global untracked state is removed.
2021-08-08 Fix feature gate checking of static-nobundle and native_link_modifiers12101111-11/+9
2021-07-09Add support for raw-dylib with stdcall, fastcall functions on ↵Richard Cobbe-15/+57
i686-pc-windows-msvc.
2021-06-04Add first cut of functionality for #58713: support for #[link(kind = ↵Richard Cobbe-11/+61
"raw-dylib")]. This does not yet support #[link_name] attributes on functions, the #[link_ordinal] attribute, #[link(kind = "raw-dylib")] on extern blocks in bin crates, or stdcall functions on 32-bit x86.
2021-05-05Implement RFC 2951: Native link modifiersLuqman Aden-22/+100
This commit implements both the native linking modifiers infrastructure as well as an initial attempt at the individual modifiers from the RFC. It also introduces a feature flag for the general syntax along with individual feature flags for each modifier.
2021-03-09Remove hir::Item::attrs.Camille GILLOT-1/+2
2021-02-15Only store a LocalDefId in hir::Item.Camille GILLOT-1/+1
Items are guaranteed to be HIR owner.
2021-01-14Use Option::map_or instead of `.map(..).unwrap_or(..)`LingMan-1/+1
2021-01-02reduce borrowing and (de)referencing around match patterns ↵Matthias Krüger-4/+4
(clippy::match_ref_pats)
2020-12-30Rename kw::Invalid -> kw::EmptyJoshua Nelson-1/+1
See https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Is.20there.20a.20symbol.20for.20the.20empty.20string.3F/near/220054471 for context.
2020-11-26Remove ForeignMod struct.Camille GILLOT-3/+3
2020-11-26Store ForeignItem in a side table.Camille GILLOT-0/+1
2020-11-08Collapse all uses of `target.options.foo` into `target.foo`Vadim Petrochenkov-1/+1
with an eye on merging `TargetOptions` into `Target`. `TargetOptions` as a separate structure is mostly an implementation detail of `Target` construction, all its fields logically belong to `Target` and available from `Target` through `Deref` impls.
2020-10-15Replace target.target with target and target.ptr_width with target.pointer_widthest31-1/+1
Preparation for a subsequent change that replaces rustc_target::config::Config with its wrapped Target. On its own, this commit breaks the build. I don't like making build-breaking commits, but in this instance I believe that it makes review easier, as the "real" changes of this PR can be seen much more easily. Result of running: find compiler/ -type f -exec sed -i -e 's/target\.target\([)\.,; ]\)/target\1/g' {} \; find compiler/ -type f -exec sed -i -e 's/target\.target$/target/g' {} \; find compiler/ -type f -exec sed -i -e 's/target.ptr_width/target.pointer_width/g' {} \; ./x.py fmt
2020-09-15don't lazily evaulate some trivial values for Option::None replacements ↵Matthias Krüger-2/+2
(clippy::unnecessary_lazy_evaluations)
2020-08-30mv compiler to compiler/mark-0/+269