[[package]]
name = "curl-sys"
-version = "0.4.44+curl-7.77.0"
+version = "0.4.45+curl-7.78.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b6d85e9322b193f117c966e79c2d6929ec08c02f339f950044aba12e20bbaf1"
+checksum = "de9e5a72b1c744eb5dd20b2be4d7eb84625070bb5c4ab9b347b70464ab1e62eb"
dependencies = [
"cc",
"libc",
add_local_native_libraries(cmd, sess, codegen_results);
}
- // Rust libraries.
+ // Upstream rust libraries and their nobundle static libraries
add_upstream_rust_crates::<B>(cmd, sess, codegen_results, crate_type, tmpdir);
- // Native libraries linked with `#[link]` attributes at and `-l` command line options.
+ // Upstream dymamic native libraries linked with `#[link]` attributes at and `-l`
+ // command line options.
// If -Zlink-native-libraries=false is set, then the assumption is that an
// external build system already has the native dependencies defined, and it
// will provide them to the linker itself.
if sess.opts.debugging_opts.link_native_libraries {
- add_upstream_native_libraries(cmd, sess, codegen_results, crate_type);
+ add_upstream_native_libraries(cmd, sess, codegen_results);
}
// Library linking above uses some global state for things like `-Bstatic`/`-Bdynamic` to make
}
}
-/// # Rust Crate linking
+/// # Linking Rust crates and their nobundle static libraries
///
/// Rust crates are not considered at all when creating an rlib output. All dependencies will be
/// linked when producing the final output (instead of the intermediate rlib version).
Linkage::NotLinked | Linkage::IncludedFromDylib => {}
Linkage::Static => {
add_static_crate::<B>(cmd, sess, codegen_results, tmpdir, crate_type, cnum);
+
+ // Link static native libs with "-bundle" modifier only if the crate they originate from
+ // is being linked statically to the current crate. If it's linked dynamically
+ // or is an rlib already included via some other dylib crate, the symbols from
+ // native libs will have already been included in that dylib.
+ //
+ // If -Zlink-native-libraries=false is set, then the assumption is that an
+ // external build system already has the native dependencies defined, and it
+ // will provide them to the linker itself.
+ if sess.opts.debugging_opts.link_native_libraries {
+ // Skip if this library is the same as the last.
+ let mut last = None;
+ for lib in &codegen_results.crate_info.native_libraries[&cnum] {
+ if lib.name.is_some()
+ && relevant_lib(sess, lib)
+ && matches!(lib.kind, NativeLibKind::Static { bundle: Some(false), .. })
+ && last != lib.name
+ {
+ cmd.link_staticlib(lib.name.unwrap(), lib.verbatim.unwrap_or(false));
+ last = lib.name;
+ }
+ }
+ }
}
Linkage::Dynamic => add_dynamic_crate(cmd, sess, &src.dylib.as_ref().unwrap().0),
}
cmd: &mut dyn Linker,
sess: &Session,
codegen_results: &CodegenResults,
- crate_type: CrateType,
) {
- // Be sure to use a topological sorting of crates because there may be
- // interdependencies between native libraries. When passing -nodefaultlibs,
- // for example, almost all native libraries depend on libc, so we have to
- // make sure that's all the way at the right (liblibc is near the base of
- // the dependency chain).
- //
- // This passes RequireStatic, but the actual requirement doesn't matter,
- // we're just getting an ordering of crate numbers, we're not worried about
- // the paths.
- let (_, data) = codegen_results
- .crate_info
- .dependency_formats
- .iter()
- .find(|(ty, _)| *ty == crate_type)
- .expect("failed to find crate type in dependency format list");
-
- let crates = &codegen_results.crate_info.used_crates;
let mut last = (NativeLibKind::Unspecified, None);
- for &cnum in crates {
+ for &cnum in &codegen_results.crate_info.used_crates {
for lib in codegen_results.crate_info.native_libraries[&cnum].iter() {
let name = match lib.name {
Some(l) => l,
NativeLibKind::Framework { as_needed } => {
cmd.link_framework(name, as_needed.unwrap_or(true))
}
- NativeLibKind::Static { bundle: Some(false), .. } => {
- // Link "static-nobundle" native libs only if the crate they originate from
- // is being linked statically to the current crate. If it's linked dynamically
- // or is an rlib already included via some other dylib crate, the symbols from
- // native libs will have already been included in that dylib.
- if data[cnum.as_usize() - 1] == Linkage::Static {
- cmd.link_staticlib(name, verbatim)
- }
- }
- // ignore statically included native libraries here as we've
- // already included them when we included the rust library
- // previously
- NativeLibKind::Static { bundle: None | Some(true), .. } => {}
+ // ignore static native libraries here as we've
+ // already included them in add_local_native_libraries and
+ // add_upstream_rust_crates
+ NativeLibKind::Static { .. } => {}
NativeLibKind::RawDylib => {}
}
}
Warn,
"use of unsupported calling convention",
@future_incompatible = FutureIncompatibleInfo {
- reference: "issue #00000 <https://github.com/rust-lang/rust/issues/00000>",
+ reference: "issue #87678 <https://github.com/rust-lang/rust/issues/87678>",
};
}
}
impl IntegerExt for Integer {
+ #[inline]
fn to_ty<'tcx>(&self, tcx: TyCtxt<'tcx>, signed: bool) -> Ty<'tcx> {
match (*self, signed) {
(I8, false) => tcx.types.u8,
}
impl PrimitiveExt for Primitive {
+ #[inline]
fn to_ty<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Ty<'tcx> {
match *self {
Int(i, signed) => i.to_ty(tcx, signed),
/// Return an *integer* type matching this primitive.
/// Useful in particular when dealing with enum discriminants.
+ #[inline]
fn to_int_ty(&self, tcx: TyCtxt<'tcx>) -> Ty<'tcx> {
match *self {
Int(i, signed) => i.to_ty(tcx, signed),
}
impl<'tcx> HasDataLayout for TyCtxt<'tcx> {
+ #[inline]
fn data_layout(&self) -> &TargetDataLayout {
&self.data_layout
}
}
impl<'tcx> HasTyCtxt<'tcx> for TyCtxt<'tcx> {
+ #[inline]
fn tcx(&self) -> TyCtxt<'tcx> {
*self
}
/// Computes the layout of a type. Note that this implicitly
/// executes in "reveal all" mode, and will normalize the input type.
+ #[inline]
fn layout_of(&self, ty: Ty<'tcx>) -> Self::TyAndLayout {
self.tcx.layout_of(self.param_env.and(ty))
}
/// Computes the layout of a type. Note that this implicitly
/// executes in "reveal all" mode, and will normalize the input type.
+ #[inline]
fn layout_of(&self, ty: Ty<'tcx>) -> Self::TyAndLayout {
self.tcx.layout_of(self.param_env.and(ty))
}
}
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for LayoutError<'tcx> {
+ #[inline]
fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
use crate::ty::layout::LayoutError::*;
mem::discriminant(self).hash_stable(hcx, hasher);
/// compiled with `-Cpanic=unwind` and referenced from another crate compiled
/// with `-Cpanic=abort` will look like they can't unwind when in fact they
/// might (from a foreign exception or similar).
+#[inline]
pub fn fn_can_unwind(
tcx: TyCtxt<'tcx>,
codegen_fn_attr_flags: CodegenFnAttrFlags,
}
}
+#[inline]
pub fn conv_from_spec_abi(tcx: TyCtxt<'_>, abi: SpecAbi) -> Conv {
use rustc_target::spec::abi::Abi::*;
match tcx.sess.target.adjust_abi(abi) {
/// to represent object size in bits. It would need to be 1 << 61 to account for this, but is
/// currently conservatively bounded to 1 << 47 as that is enough to cover the current usable
/// address space on 64-bit ARMv8 and x86_64.
+ #[inline]
pub fn obj_size_bound(&self) -> u64 {
match self.pointer_size.bits() {
16 => 1 << 15,
}
}
+ #[inline]
pub fn ptr_sized_integer(&self) -> Integer {
match self.pointer_size.bits() {
16 => I16,
}
}
+ #[inline]
pub fn vector_align(&self, vec_size: Size) -> AbiAndPrefAlign {
for &(size, align) in &self.vector_align {
if size == vec_size {
}
impl AbiAndPrefAlign {
+ #[inline]
pub fn new(align: Align) -> AbiAndPrefAlign {
AbiAndPrefAlign { abi: align, pref: align }
}
+ #[inline]
pub fn min(self, other: AbiAndPrefAlign) -> AbiAndPrefAlign {
AbiAndPrefAlign { abi: self.abi.min(other.abi), pref: self.pref.min(other.pref) }
}
+ #[inline]
pub fn max(self, other: AbiAndPrefAlign) -> AbiAndPrefAlign {
AbiAndPrefAlign { abi: self.abi.max(other.abi), pref: self.pref.max(other.pref) }
}
}
impl Integer {
+ #[inline]
pub fn size(self) -> Size {
match self {
I8 => Size::from_bytes(1),
}
/// Finds the smallest Integer type which can represent the signed value.
+ #[inline]
pub fn fit_signed(x: i128) -> Integer {
match x {
-0x0000_0000_0000_0080..=0x0000_0000_0000_007f => I8,
}
/// Finds the smallest Integer type which can represent the unsigned value.
+ #[inline]
pub fn fit_unsigned(x: u128) -> Integer {
match x {
0..=0x0000_0000_0000_00ff => I8,
I8
}
+ // FIXME(eddyb) consolidate this and other methods that find the appropriate
+ // `Integer` given some requirements.
+ #[inline]
fn from_size(size: Size) -> Result<Self, String> {
match size.bits() {
8 => Ok(Integer::I8),
}
}
+ // FIXME(eddyb) remove, it's trivial thanks to `matches!`.
+ #[inline]
pub fn is_float(self) -> bool {
matches!(self, F32 | F64)
}
+ // FIXME(eddyb) remove, it's completely unused.
+ #[inline]
pub fn is_int(self) -> bool {
matches!(self, Int(..))
}
}
impl Scalar {
+ #[inline]
pub fn is_bool(&self) -> bool {
matches!(self.value, Int(I8, false))
&& matches!(self.valid_range, WrappingRange { start: 0, end: 1 })
}
impl FieldsShape {
+ #[inline]
pub fn count(&self) -> usize {
match *self {
FieldsShape::Primitive => 0,
}
}
+ #[inline]
pub fn offset(&self, i: usize) -> Size {
match *self {
FieldsShape::Primitive => {
}
}
+ #[inline]
pub fn memory_index(&self, i: usize) -> usize {
match *self {
FieldsShape::Primitive => {
}
/// Returns `true` if this is a single signed integer scalar
+ #[inline]
pub fn is_signed(&self) -> bool {
match *self {
Abi::Scalar(ref scal) => match scal.value {
|
= note: `#[warn(unsupported_calling_conventions)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #00000 <https://github.com/rust-lang/rust/issues/00000>
+ = note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:44:1
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #00000 <https://github.com/rust-lang/rust/issues/00000>
+ = note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
error: aborting due to 6 previous errors; 2 warnings emitted
|
= note: `#[warn(unsupported_calling_conventions)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #00000 <https://github.com/rust-lang/rust/issues/00000>
+ = note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:44:1
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #00000 <https://github.com/rust-lang/rust/issues/00000>
+ = note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
error: aborting due to 6 previous errors; 2 warnings emitted
-Subproject commit e96bdb0c3d0a418e7fcd7fbd69be08abf830b4bc
+Subproject commit f559c109cc79fe413a8535fb620a5a58b3823d94