Rollup merge of #58257 - taiki-e:librustc_target-2018, r=Centril
librustc_target => 2018 Transitions `librustc_target` to Rust 2018; cc #58099 r? @Centril
This commit is contained in:
commit
869135ceda
@ -2,6 +2,7 @@
|
||||
authors = ["The Rust Project Developers"]
|
||||
name = "rustc_target"
|
||||
version = "0.0.0"
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
name = "rustc_target"
|
||||
|
@ -1,5 +1,5 @@
|
||||
use abi::call::{FnType, ArgType, Reg, RegKind, Uniform};
|
||||
use abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
use crate::abi::call::{FnType, ArgType, Reg, RegKind, Uniform};
|
||||
use crate::abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
|
||||
fn is_homogeneous_aggregate<'a, Ty, C>(cx: &C, arg: &mut ArgType<'a, Ty>)
|
||||
-> Option<Uniform>
|
||||
|
@ -1,5 +1,5 @@
|
||||
use abi::call::{ArgType, FnType, };
|
||||
use abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
use crate::abi::call::{ArgType, FnType, };
|
||||
use crate::abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
|
||||
fn classify_ret_ty<'a, Ty, C>(_cx: &C, ret: &mut ArgType<'a, Ty>)
|
||||
where Ty: TyLayoutMethods<'a, C> + Copy,
|
||||
|
@ -1,6 +1,6 @@
|
||||
use abi::call::{Conv, FnType, ArgType, Reg, RegKind, Uniform};
|
||||
use abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
use spec::HasTargetSpec;
|
||||
use crate::abi::call::{Conv, FnType, ArgType, Reg, RegKind, Uniform};
|
||||
use crate::abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
use crate::spec::HasTargetSpec;
|
||||
|
||||
fn is_homogeneous_aggregate<'a, Ty, C>(cx: &C, arg: &mut ArgType<'a, Ty>)
|
||||
-> Option<Uniform>
|
||||
|
@ -1,5 +1,5 @@
|
||||
use abi::call::{FnType, ArgType, Uniform};
|
||||
use abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
use crate::abi::call::{FnType, ArgType, Uniform};
|
||||
use crate::abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
|
||||
// Data layout: e-p:32:32-i64:64-v128:32:128-n32-S128
|
||||
|
||||
@ -26,7 +26,7 @@ fn classify_ret_ty<'a, Ty, C>(cx: &C, ret: &mut ArgType<'a, Ty>)
|
||||
}
|
||||
}
|
||||
|
||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<Ty>) {
|
||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>) {
|
||||
if arg.layout.is_aggregate() {
|
||||
arg.make_indirect_byval();
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
use abi::call::{FnType, ArgType};
|
||||
use crate::abi::call::{FnType, ArgType};
|
||||
|
||||
fn classify_ret_ty<Ty>(ret: &mut ArgType<Ty>) {
|
||||
fn classify_ret_ty<Ty>(ret: &mut ArgType<'_, Ty>) {
|
||||
if ret.layout.is_aggregate() && ret.layout.size.bits() > 64 {
|
||||
ret.make_indirect();
|
||||
} else {
|
||||
@ -10,7 +10,7 @@ fn classify_ret_ty<Ty>(ret: &mut ArgType<Ty>) {
|
||||
}
|
||||
}
|
||||
|
||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<Ty>) {
|
||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>) {
|
||||
if arg.layout.is_aggregate() && arg.layout.size.bits() > 64 {
|
||||
arg.make_indirect();
|
||||
} else {
|
||||
@ -18,7 +18,7 @@ fn classify_arg_ty<Ty>(arg: &mut ArgType<Ty>) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<Ty>(fty: &mut FnType<Ty>) {
|
||||
pub fn compute_abi_info<Ty>(fty: &mut FnType<'_,Ty>) {
|
||||
if !fty.ret.is_ignore() {
|
||||
classify_ret_ty(&mut fty.ret);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
use abi::call::{ArgType, FnType, Reg, Uniform};
|
||||
use abi::{HasDataLayout, LayoutOf, Size, TyLayoutMethods};
|
||||
use crate::abi::call::{ArgType, FnType, Reg, Uniform};
|
||||
use crate::abi::{HasDataLayout, LayoutOf, Size, TyLayoutMethods};
|
||||
|
||||
fn classify_ret_ty<'a, Ty, C>(cx: &C, ret: &mut ArgType<Ty>, offset: &mut Size)
|
||||
fn classify_ret_ty<'a, Ty, C>(cx: &C, ret: &mut ArgType<'_, Ty>, offset: &mut Size)
|
||||
where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout
|
||||
{
|
||||
if !ret.layout.is_aggregate() {
|
||||
@ -12,7 +12,7 @@ fn classify_ret_ty<'a, Ty, C>(cx: &C, ret: &mut ArgType<Ty>, offset: &mut Size)
|
||||
}
|
||||
}
|
||||
|
||||
fn classify_arg_ty<'a, Ty, C>(cx: &C, arg: &mut ArgType<Ty>, offset: &mut Size)
|
||||
fn classify_arg_ty<'a, Ty, C>(cx: &C, arg: &mut ArgType<'_, Ty>, offset: &mut Size)
|
||||
where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout
|
||||
{
|
||||
let dl = cx.data_layout();
|
||||
@ -34,7 +34,7 @@ fn classify_arg_ty<'a, Ty, C>(cx: &C, arg: &mut ArgType<Ty>, offset: &mut Size)
|
||||
*offset = offset.align_to(align) + size.align_to(align);
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fty: &mut FnType<Ty>)
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fty: &mut FnType<'_, Ty>)
|
||||
where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout
|
||||
{
|
||||
let mut offset = Size::ZERO;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use abi::call::{ArgAttribute, ArgType, CastTarget, FnType, PassMode, Reg, RegKind, Uniform};
|
||||
use abi::{self, HasDataLayout, LayoutOf, Size, TyLayout, TyLayoutMethods};
|
||||
use crate::abi::call::{ArgAttribute, ArgType, CastTarget, FnType, PassMode, Reg, RegKind, Uniform};
|
||||
use crate::abi::{self, HasDataLayout, LayoutOf, Size, TyLayout, TyLayoutMethods};
|
||||
|
||||
fn extend_integer_width_mips<Ty>(arg: &mut ArgType<Ty>, bits: u64) {
|
||||
fn extend_integer_width_mips<Ty>(arg: &mut ArgType<'_, Ty>, bits: u64) {
|
||||
// Always sign extend u32 values on 64-bit mips
|
||||
if let abi::Abi::Scalar(ref scalar) = arg.layout.abi {
|
||||
if let abi::Int(i, signed) = scalar.value {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use abi::{self, Abi, Align, FieldPlacement, Size};
|
||||
use abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
use spec::HasTargetSpec;
|
||||
use crate::abi::{self, Abi, Align, FieldPlacement, Size};
|
||||
use crate::abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
use crate::spec::{self, HasTargetSpec};
|
||||
|
||||
mod aarch64;
|
||||
mod amdgpu;
|
||||
@ -42,13 +42,13 @@ pub enum PassMode {
|
||||
|
||||
// Hack to disable non_upper_case_globals only for the bitflags! and not for the rest
|
||||
// of this module
|
||||
pub use self::attr_impl::ArgAttribute;
|
||||
pub use attr_impl::ArgAttribute;
|
||||
|
||||
#[allow(non_upper_case_globals)]
|
||||
#[allow(unused)]
|
||||
mod attr_impl {
|
||||
// The subset of llvm::Attribute needed for arguments, packed into a bitfield.
|
||||
bitflags! {
|
||||
bitflags::bitflags! {
|
||||
#[derive(Default)]
|
||||
pub struct ArgAttribute: u16 {
|
||||
const ByVal = 1 << 0;
|
||||
@ -526,22 +526,22 @@ pub struct FnType<'a, Ty> {
|
||||
}
|
||||
|
||||
impl<'a, Ty> FnType<'a, Ty> {
|
||||
pub fn adjust_for_cabi<C>(&mut self, cx: &C, abi: ::spec::abi::Abi) -> Result<(), String>
|
||||
pub fn adjust_for_cabi<C>(&mut self, cx: &C, abi: spec::abi::Abi) -> Result<(), String>
|
||||
where Ty: TyLayoutMethods<'a, C> + Copy,
|
||||
C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout + HasTargetSpec
|
||||
{
|
||||
match &cx.target_spec().arch[..] {
|
||||
"x86" => {
|
||||
let flavor = if abi == ::spec::abi::Abi::Fastcall {
|
||||
let flavor = if abi == spec::abi::Abi::Fastcall {
|
||||
x86::Flavor::Fastcall
|
||||
} else {
|
||||
x86::Flavor::General
|
||||
};
|
||||
x86::compute_abi_info(cx, self, flavor);
|
||||
},
|
||||
"x86_64" => if abi == ::spec::abi::Abi::SysV64 {
|
||||
"x86_64" => if abi == spec::abi::Abi::SysV64 {
|
||||
x86_64::compute_abi_info(cx, self);
|
||||
} else if abi == ::spec::abi::Abi::Win64 || cx.target_spec().options.is_like_windows {
|
||||
} else if abi == spec::abi::Abi::Win64 || cx.target_spec().options.is_like_windows {
|
||||
x86_win64::compute_abi_info(self);
|
||||
} else {
|
||||
x86_64::compute_abi_info(cx, self);
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Reference: MSP430 Embedded Application Binary Interface
|
||||
// http://www.ti.com/lit/an/slaa534/slaa534.pdf
|
||||
|
||||
use abi::call::{ArgType, FnType};
|
||||
use crate::abi::call::{ArgType, FnType};
|
||||
|
||||
// 3.5 Structures or Unions Passed and Returned by Reference
|
||||
//
|
||||
@ -9,7 +9,7 @@ use abi::call::{ArgType, FnType};
|
||||
// returned by reference. To pass a structure or union by reference, the caller
|
||||
// places its address in the appropriate location: either in a register or on
|
||||
// the stack, according to its position in the argument list. (..)"
|
||||
fn classify_ret_ty<Ty>(ret: &mut ArgType<Ty>) {
|
||||
fn classify_ret_ty<Ty>(ret: &mut ArgType<'_, Ty>) {
|
||||
if ret.layout.is_aggregate() && ret.layout.size.bits() > 32 {
|
||||
ret.make_indirect();
|
||||
} else {
|
||||
@ -17,7 +17,7 @@ fn classify_ret_ty<Ty>(ret: &mut ArgType<Ty>) {
|
||||
}
|
||||
}
|
||||
|
||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<Ty>) {
|
||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>) {
|
||||
if arg.layout.is_aggregate() && arg.layout.size.bits() > 32 {
|
||||
arg.make_indirect();
|
||||
} else {
|
||||
@ -25,7 +25,7 @@ fn classify_arg_ty<Ty>(arg: &mut ArgType<Ty>) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<Ty>(fty: &mut FnType<Ty>) {
|
||||
pub fn compute_abi_info<Ty>(fty: &mut FnType<'_, Ty>) {
|
||||
if !fty.ret.is_ignore() {
|
||||
classify_ret_ty(&mut fty.ret);
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
// Reference: PTX Writer's Guide to Interoperability
|
||||
// http://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability
|
||||
|
||||
use abi::call::{ArgType, FnType};
|
||||
use crate::abi::call::{ArgType, FnType};
|
||||
|
||||
fn classify_ret_ty<Ty>(ret: &mut ArgType<Ty>) {
|
||||
fn classify_ret_ty<Ty>(ret: &mut ArgType<'_, Ty>) {
|
||||
if ret.layout.is_aggregate() && ret.layout.size.bits() > 32 {
|
||||
ret.make_indirect();
|
||||
} else {
|
||||
@ -11,7 +11,7 @@ fn classify_ret_ty<Ty>(ret: &mut ArgType<Ty>) {
|
||||
}
|
||||
}
|
||||
|
||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<Ty>) {
|
||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>) {
|
||||
if arg.layout.is_aggregate() && arg.layout.size.bits() > 32 {
|
||||
arg.make_indirect();
|
||||
} else {
|
||||
@ -19,7 +19,7 @@ fn classify_arg_ty<Ty>(arg: &mut ArgType<Ty>) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<Ty>(fty: &mut FnType<Ty>) {
|
||||
pub fn compute_abi_info<Ty>(fty: &mut FnType<'_, Ty>) {
|
||||
if !fty.ret.is_ignore() {
|
||||
classify_ret_ty(&mut fty.ret);
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
// Reference: PTX Writer's Guide to Interoperability
|
||||
// http://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability
|
||||
|
||||
use abi::call::{ArgType, FnType};
|
||||
use crate::abi::call::{ArgType, FnType};
|
||||
|
||||
fn classify_ret_ty<Ty>(ret: &mut ArgType<Ty>) {
|
||||
fn classify_ret_ty<Ty>(ret: &mut ArgType<'_, Ty>) {
|
||||
if ret.layout.is_aggregate() && ret.layout.size.bits() > 64 {
|
||||
ret.make_indirect();
|
||||
} else {
|
||||
@ -11,7 +11,7 @@ fn classify_ret_ty<Ty>(ret: &mut ArgType<Ty>) {
|
||||
}
|
||||
}
|
||||
|
||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<Ty>) {
|
||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>) {
|
||||
if arg.layout.is_aggregate() && arg.layout.size.bits() > 64 {
|
||||
arg.make_indirect();
|
||||
} else {
|
||||
@ -19,7 +19,7 @@ fn classify_arg_ty<Ty>(arg: &mut ArgType<Ty>) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<Ty>(fty: &mut FnType<Ty>) {
|
||||
pub fn compute_abi_info<Ty>(fty: &mut FnType<'_, Ty>) {
|
||||
if !fty.ret.is_ignore() {
|
||||
classify_ret_ty(&mut fty.ret);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
use abi::call::{ArgType, FnType, Reg, Uniform};
|
||||
use abi::{HasDataLayout, LayoutOf, Size, TyLayoutMethods};
|
||||
use crate::abi::call::{ArgType, FnType, Reg, Uniform};
|
||||
use crate::abi::{HasDataLayout, LayoutOf, Size, TyLayoutMethods};
|
||||
|
||||
fn classify_ret_ty<'a, Ty, C>(cx: &C, ret: &mut ArgType<Ty>, offset: &mut Size)
|
||||
fn classify_ret_ty<'a, Ty, C>(cx: &C, ret: &mut ArgType<'_, Ty>, offset: &mut Size)
|
||||
where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout
|
||||
{
|
||||
if !ret.layout.is_aggregate() {
|
||||
@ -12,7 +12,7 @@ fn classify_ret_ty<'a, Ty, C>(cx: &C, ret: &mut ArgType<Ty>, offset: &mut Size)
|
||||
}
|
||||
}
|
||||
|
||||
fn classify_arg_ty<'a, Ty, C>(cx: &C, arg: &mut ArgType<Ty>, offset: &mut Size)
|
||||
fn classify_arg_ty<'a, Ty, C>(cx: &C, arg: &mut ArgType<'_, Ty>, offset: &mut Size)
|
||||
where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout
|
||||
{
|
||||
let dl = cx.data_layout();
|
||||
@ -34,7 +34,7 @@ fn classify_arg_ty<'a, Ty, C>(cx: &C, arg: &mut ArgType<Ty>, offset: &mut Size)
|
||||
*offset = offset.align_to(align) + size.align_to(align);
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fty: &mut FnType<Ty>)
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fty: &mut FnType<'_, Ty>)
|
||||
where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout
|
||||
{
|
||||
let mut offset = Size::ZERO;
|
||||
|
@ -2,16 +2,16 @@
|
||||
// Alignment of 128 bit types is not currently handled, this will
|
||||
// need to be fixed when PowerPC vector support is added.
|
||||
|
||||
use abi::call::{FnType, ArgType, Reg, RegKind, Uniform};
|
||||
use abi::{Endian, HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
use spec::HasTargetSpec;
|
||||
use crate::abi::call::{FnType, ArgType, Reg, RegKind, Uniform};
|
||||
use crate::abi::{Endian, HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
use crate::spec::HasTargetSpec;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
enum ABI {
|
||||
ELFv1, // original ABI used for powerpc64 (big-endian)
|
||||
ELFv2, // newer ABI used for powerpc64le and musl (both endians)
|
||||
}
|
||||
use self::ABI::*;
|
||||
use ABI::*;
|
||||
|
||||
fn is_homogeneous_aggregate<'a, Ty, C>(cx: &C, arg: &mut ArgType<'a, Ty>, abi: ABI)
|
||||
-> Option<Uniform>
|
||||
|
@ -1,9 +1,9 @@
|
||||
// Reference: RISC-V ELF psABI specification
|
||||
// https://github.com/riscv/riscv-elf-psabi-doc
|
||||
|
||||
use abi::call::{ArgType, FnType};
|
||||
use crate::abi::call::{ArgType, FnType};
|
||||
|
||||
fn classify_ret_ty<Ty>(arg: &mut ArgType<Ty>, xlen: u64) {
|
||||
fn classify_ret_ty<Ty>(arg: &mut ArgType<'_, Ty>, xlen: u64) {
|
||||
// "Scalars wider than 2✕XLEN are passed by reference and are replaced in
|
||||
// the argument list with the address."
|
||||
// "Aggregates larger than 2✕XLEN bits are passed by reference and are
|
||||
@ -19,7 +19,7 @@ fn classify_ret_ty<Ty>(arg: &mut ArgType<Ty>, xlen: u64) {
|
||||
arg.extend_integer_width_to(xlen); // this method only affects integer scalars
|
||||
}
|
||||
|
||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<Ty>, xlen: u64) {
|
||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>, xlen: u64) {
|
||||
// "Scalars wider than 2✕XLEN are passed by reference and are replaced in
|
||||
// the argument list with the address."
|
||||
// "Aggregates larger than 2✕XLEN bits are passed by reference and are
|
||||
@ -35,7 +35,7 @@ fn classify_arg_ty<Ty>(arg: &mut ArgType<Ty>, xlen: u64) {
|
||||
arg.extend_integer_width_to(xlen); // this method only affects integer scalars
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<Ty>(fty: &mut FnType<Ty>, xlen: u64) {
|
||||
pub fn compute_abi_info<Ty>(fty: &mut FnType<'_, Ty>, xlen: u64) {
|
||||
if !fty.ret.is_ignore() {
|
||||
classify_ret_ty(&mut fty.ret, xlen);
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
// FIXME: The assumes we're using the non-vector ABI, i.e., compiling
|
||||
// for a pre-z13 machine or using -mno-vx.
|
||||
|
||||
use abi::call::{FnType, ArgType, Reg};
|
||||
use abi::{self, HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
use crate::abi::call::{FnType, ArgType, Reg};
|
||||
use crate::abi::{self, HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
|
||||
fn classify_ret_ty<'a, Ty, C>(ret: &mut ArgType<Ty>)
|
||||
fn classify_ret_ty<'a, Ty, C>(ret: &mut ArgType<'_, Ty>)
|
||||
where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout
|
||||
{
|
||||
if !ret.layout.is_aggregate() && ret.layout.size.bits() <= 64 {
|
||||
|
@ -1,7 +1,7 @@
|
||||
use abi::call::{ArgType, FnType, Reg, Uniform};
|
||||
use abi::{HasDataLayout, LayoutOf, Size, TyLayoutMethods};
|
||||
use crate::abi::call::{ArgType, FnType, Reg, Uniform};
|
||||
use crate::abi::{HasDataLayout, LayoutOf, Size, TyLayoutMethods};
|
||||
|
||||
fn classify_ret_ty<'a, Ty, C>(cx: &C, ret: &mut ArgType<Ty>, offset: &mut Size)
|
||||
fn classify_ret_ty<'a, Ty, C>(cx: &C, ret: &mut ArgType<'_, Ty>, offset: &mut Size)
|
||||
where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout
|
||||
{
|
||||
if !ret.layout.is_aggregate() {
|
||||
@ -12,7 +12,7 @@ fn classify_ret_ty<'a, Ty, C>(cx: &C, ret: &mut ArgType<Ty>, offset: &mut Size)
|
||||
}
|
||||
}
|
||||
|
||||
fn classify_arg_ty<'a, Ty, C>(cx: &C, arg: &mut ArgType<Ty>, offset: &mut Size)
|
||||
fn classify_arg_ty<'a, Ty, C>(cx: &C, arg: &mut ArgType<'_, Ty>, offset: &mut Size)
|
||||
where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout
|
||||
{
|
||||
let dl = cx.data_layout();
|
||||
@ -34,7 +34,7 @@ fn classify_arg_ty<'a, Ty, C>(cx: &C, arg: &mut ArgType<Ty>, offset: &mut Size)
|
||||
*offset = offset.align_to(align) + size.align_to(align);
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fty: &mut FnType<Ty>)
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fty: &mut FnType<'_, Ty>)
|
||||
where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout
|
||||
{
|
||||
let mut offset = Size::ZERO;
|
||||
|
@ -1,7 +1,7 @@
|
||||
// FIXME: This needs an audit for correctness and completeness.
|
||||
|
||||
use abi::call::{FnType, ArgType, Reg, RegKind, Uniform};
|
||||
use abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
use crate::abi::call::{FnType, ArgType, Reg, RegKind, Uniform};
|
||||
use crate::abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
|
||||
fn is_homogeneous_aggregate<'a, Ty, C>(cx: &C, arg: &mut ArgType<'a, Ty>)
|
||||
-> Option<Uniform>
|
||||
|
@ -1,14 +1,14 @@
|
||||
use abi::call::{FnType, ArgType};
|
||||
use crate::abi::call::{FnType, ArgType};
|
||||
|
||||
fn classify_ret_ty<Ty>(ret: &mut ArgType<Ty>) {
|
||||
fn classify_ret_ty<Ty>(ret: &mut ArgType<'_, Ty>) {
|
||||
ret.extend_integer_width_to(32);
|
||||
}
|
||||
|
||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<Ty>) {
|
||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>) {
|
||||
arg.extend_integer_width_to(32);
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<Ty>(fty: &mut FnType<Ty>) {
|
||||
pub fn compute_abi_info<Ty>(fty: &mut FnType<'_, Ty>) {
|
||||
if !fty.ret.is_ignore() {
|
||||
classify_ret_ty(&mut fty.ret);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
use abi::call::{ArgAttribute, FnType, PassMode, Reg, RegKind};
|
||||
use abi::{self, HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
use spec::HasTargetSpec;
|
||||
use crate::abi::call::{ArgAttribute, FnType, PassMode, Reg, RegKind};
|
||||
use crate::abi::{self, HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
use crate::spec::HasTargetSpec;
|
||||
|
||||
#[derive(PartialEq)]
|
||||
pub enum Flavor {
|
||||
|
@ -1,8 +1,8 @@
|
||||
// The classification code for the x86_64 ABI is taken from the clay language
|
||||
// https://github.com/jckarter/clay/blob/master/compiler/src/externals.cpp
|
||||
|
||||
use abi::call::{ArgType, CastTarget, FnType, Reg, RegKind};
|
||||
use abi::{self, Abi, HasDataLayout, LayoutOf, Size, TyLayout, TyLayoutMethods};
|
||||
use crate::abi::call::{ArgType, CastTarget, FnType, Reg, RegKind};
|
||||
use crate::abi::{self, Abi, HasDataLayout, LayoutOf, Size, TyLayout, TyLayoutMethods};
|
||||
|
||||
/// Classification of "eightbyte" components.
|
||||
// N.B., the order of the variants is from general to specific,
|
||||
|
@ -1,10 +1,10 @@
|
||||
use abi::call::{ArgType, FnType, Reg};
|
||||
use abi::Abi;
|
||||
use crate::abi::call::{ArgType, FnType, Reg};
|
||||
use crate::abi::Abi;
|
||||
|
||||
// Win64 ABI: http://msdn.microsoft.com/en-us/library/zthk2dkh.aspx
|
||||
|
||||
pub fn compute_abi_info<Ty>(fty: &mut FnType<Ty>) {
|
||||
let fixup = |a: &mut ArgType<Ty>| {
|
||||
pub fn compute_abi_info<Ty>(fty: &mut FnType<'_, Ty>) {
|
||||
let fixup = |a: &mut ArgType<'_, Ty>| {
|
||||
match a.layout.abi {
|
||||
Abi::Uninhabited => {}
|
||||
Abi::ScalarPair(..) |
|
||||
|
@ -1,7 +1,7 @@
|
||||
pub use self::Integer::*;
|
||||
pub use self::Primitive::*;
|
||||
pub use Integer::*;
|
||||
pub use Primitive::*;
|
||||
|
||||
use spec::Target;
|
||||
use crate::spec::Target;
|
||||
|
||||
use std::fmt;
|
||||
use std::ops::{Add, Deref, Sub, Mul, AddAssign, Range, RangeInclusive};
|
||||
@ -533,13 +533,13 @@ pub enum FloatTy {
|
||||
}
|
||||
|
||||
impl fmt::Debug for FloatTy {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
fmt::Display::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for FloatTy {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "{}", self.ty_to_string())
|
||||
}
|
||||
}
|
||||
|
@ -15,11 +15,11 @@
|
||||
#![feature(slice_patterns)]
|
||||
#![feature(step_trait)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
extern crate serialize;
|
||||
#![deny(rust_2018_idioms)]
|
||||
|
||||
#[macro_use] extern crate log;
|
||||
|
||||
#[allow(unused_extern_crates)]
|
||||
extern crate serialize as rustc_serialize; // used by deriving
|
||||
|
||||
// See librustc_cratesio_shim/Cargo.toml for a comment explaining this.
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use super::apple_ios_base::{opts, Arch};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LldFlavor, LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LldFlavor, LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::fuchsia_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
// See https://developer.android.com/ndk/guides/abis.html#arm64-v8a
|
||||
// for target ABI requirements.
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult, PanicStrategy};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult, PanicStrategy};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::windows_msvc_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::cloudabi_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::freebsd_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::hermit_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::linux_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::linux_musl_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::netbsd_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::openbsd_base::opts();
|
||||
|
@ -96,7 +96,7 @@ impl Abi {
|
||||
}
|
||||
|
||||
impl fmt::Display for Abi {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "\"{}\"", self.name())
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, TargetOptions};
|
||||
use crate::spec::{LinkerFlavor, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
let mut base = super::linux_base::opts();
|
||||
|
@ -1,6 +1,6 @@
|
||||
use std::env;
|
||||
|
||||
use spec::{LinkArgs, TargetOptions};
|
||||
use crate::spec::{LinkArgs, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
// ELF TLS is only available in macOS 10.7+. If you try to compile for 10.6
|
||||
|
@ -1,8 +1,8 @@
|
||||
use std::io;
|
||||
use std::process::Command;
|
||||
use spec::{LinkArgs, LinkerFlavor, TargetOptions};
|
||||
use crate::spec::{LinkArgs, LinkerFlavor, TargetOptions};
|
||||
|
||||
use self::Arch::*;
|
||||
use Arch::*;
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
#[derive(Copy, Clone)]
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::abi::Abi;
|
||||
use crate::spec::abi::Abi;
|
||||
|
||||
// All the calling conventions trigger an assertion(Unsupported calling convention) in llvm on arm
|
||||
pub fn abi_blacklist() -> Vec<Abi> {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::android_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::linux_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::linux_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::linux_musl_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::linux_musl_base::opts();
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Targets the Big endian Cortex-R4/R5 processor (ARMv7-R)
|
||||
|
||||
use std::default::Default;
|
||||
use spec::{LinkerFlavor, LldFlavor, PanicStrategy, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, LldFlavor, PanicStrategy, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
Ok(Target {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Targets the Cortex-R4F/R5F processor (ARMv7-R)
|
||||
|
||||
use std::default::Default;
|
||||
use spec::{LinkerFlavor, LldFlavor, PanicStrategy, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, LldFlavor, PanicStrategy, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
Ok(Target {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let base = super::linux_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let base = super::linux_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let base = super::linux_musl_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::netbsd_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use super::apple_ios_base::{opts, Arch};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
// This target if is for the baseline of the Android v7a ABI
|
||||
// in thumb mode. It's named armv7-* instead of thumbv7-*
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::cloudabi_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
// This target is for glibc Linux on ARMv7 without NEON or
|
||||
// thumb-mode. See the thumbv7neon variant for enabling both.
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
// This target is for musl Linux on ARMv7 without thumb-mode or NEON.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let base = super::netbsd_base::opts();
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Targets the Little-endian Cortex-R4/R5 processor (ARMv7-R)
|
||||
|
||||
use std::default::Default;
|
||||
use spec::{LinkerFlavor, LldFlavor, PanicStrategy, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, LldFlavor, PanicStrategy, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
Ok(Target {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Targets the Little-endian Cortex-R4F/R5F processor (ARMv7-R)
|
||||
|
||||
use std::default::Default;
|
||||
use spec::{LinkerFlavor, LldFlavor, PanicStrategy, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, LldFlavor, PanicStrategy, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
Ok(Target {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use super::apple_ios_base::{opts, Arch};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{TargetOptions, RelroLevel};
|
||||
use crate::spec::{TargetOptions, RelroLevel};
|
||||
use std::default::Default;
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkArgs, LinkerFlavor, TargetOptions, RelroLevel};
|
||||
use crate::spec::{LinkArgs, LinkerFlavor, TargetOptions, RelroLevel};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
let mut args = LinkArgs::new();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkArgs, LinkerFlavor, TargetOptions, RelroLevel};
|
||||
use crate::spec::{LinkArgs, LinkerFlavor, TargetOptions, RelroLevel};
|
||||
use std::default::Default;
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkArgs, LinkerFlavor, TargetOptions, RelroLevel};
|
||||
use crate::spec::{LinkArgs, LinkerFlavor, TargetOptions, RelroLevel};
|
||||
use std::default::Default;
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LldFlavor, LinkArgs, LinkerFlavor, TargetOptions};
|
||||
use crate::spec::{LldFlavor, LinkArgs, LinkerFlavor, TargetOptions};
|
||||
use std::default::Default;
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{TargetOptions, RelroLevel};
|
||||
use crate::spec::{TargetOptions, RelroLevel};
|
||||
use std::default::Default;
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkArgs, LinkerFlavor, PanicStrategy, TargetOptions};
|
||||
use crate::spec::{LinkArgs, LinkerFlavor, PanicStrategy, TargetOptions};
|
||||
use std::default::Default;
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use super::apple_ios_base::{opts, Arch};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::TargetResult;
|
||||
use crate::spec::TargetResult;
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::i686_pc_windows_msvc::target()?;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::TargetResult;
|
||||
use crate::spec::TargetResult;
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::i686_unknown_linux_gnu::target()?;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::TargetResult;
|
||||
use crate::spec::TargetResult;
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::i686_unknown_linux_musl::target()?;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::apple_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
// See https://developer.android.com/ndk/guides/abis.html#x86
|
||||
// for target ABI requirements.
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::windows_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::windows_msvc_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::cloudabi_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::dragonfly_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::freebsd_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::haiku_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::linux_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::linux_musl_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::netbsd_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::openbsd_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkArgs, LinkerFlavor, PanicStrategy, TargetOptions};
|
||||
use crate::spec::{LinkArgs, LinkerFlavor, PanicStrategy, TargetOptions};
|
||||
use std::default::Default;
|
||||
//use std::process::Command;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkArgs, LinkerFlavor, TargetOptions, RelroLevel};
|
||||
use crate::spec::{LinkArgs, LinkerFlavor, TargetOptions, RelroLevel};
|
||||
use std::default::Default;
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, TargetOptions};
|
||||
use crate::spec::{LinkerFlavor, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
let mut base = super::linux_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
Ok(Target {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
Ok(Target {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
Ok(Target {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::linux_musl_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
Ok(Target {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
Ok(Target {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::linux_musl_base::opts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
Ok(Target {
|
||||
|
@ -40,7 +40,7 @@ use std::default::Default;
|
||||
use std::{fmt, io};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::str::FromStr;
|
||||
use spec::abi::{Abi, lookup as lookup_abi};
|
||||
use crate::spec::abi::{Abi, lookup as lookup_abi};
|
||||
|
||||
pub mod abi;
|
||||
mod android_base;
|
||||
@ -1408,7 +1408,7 @@ impl TargetTriple {
|
||||
}
|
||||
|
||||
impl fmt::Display for TargetTriple {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "{}", self.debug_triple())
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, PanicStrategy, Target, TargetOptions, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, PanicStrategy, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
Ok(Target {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkArgs, LinkerFlavor, TargetOptions, RelroLevel};
|
||||
use crate::spec::{LinkArgs, LinkerFlavor, TargetOptions, RelroLevel};
|
||||
use std::default::Default;
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
|
@ -1,5 +1,5 @@
|
||||
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult, PanicStrategy, MergeFunctions};
|
||||
use spec::abi::Abi;
|
||||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult, PanicStrategy, MergeFunctions};
|
||||
use crate::spec::abi::Abi;
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
Ok(Target {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkArgs, LinkerFlavor, TargetOptions, RelroLevel};
|
||||
use crate::spec::{LinkArgs, LinkerFlavor, TargetOptions, RelroLevel};
|
||||
use std::default::Default;
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use spec::{LinkerFlavor, Target, TargetResult};
|
||||
use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::freebsd_base::opts();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user