Sync from rust 8e86c95671
This commit is contained in:
commit
e47c930f08
@ -1,8 +1,7 @@
|
||||
use crate::build_sysroot;
|
||||
use crate::path::Dirs;
|
||||
use crate::prepare::GitRepo;
|
||||
use crate::utils::{spawn_and_wait, CargoProject, Compiler};
|
||||
use crate::{CodegenBackend, SysrootKind};
|
||||
use crate::{build_sysroot, CodegenBackend, SysrootKind};
|
||||
|
||||
static ABI_CAFE_REPO: GitRepo = GitRepo::github(
|
||||
"Gankra",
|
||||
|
@ -1,7 +1,6 @@
|
||||
use std::env;
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::Command;
|
||||
use std::{env, fs};
|
||||
|
||||
use crate::path::{Dirs, RelPath};
|
||||
use crate::rustc_info::get_file_name;
|
||||
@ -272,7 +271,7 @@ fn build_clif_sysroot_for_triple(
|
||||
if channel == "release" {
|
||||
build_cmd.arg("--release");
|
||||
}
|
||||
build_cmd.arg("--features").arg("backtrace panic-unwind");
|
||||
build_cmd.arg("--features").arg("backtrace panic-unwind compiler-builtins-no-f16-f128");
|
||||
build_cmd.env("CARGO_PROFILE_RELEASE_DEBUG", "true");
|
||||
build_cmd.env("__CARGO_DEFAULT_LIB_METADATA", "cg_clif");
|
||||
if compiler.triple.contains("apple") {
|
||||
|
@ -1,5 +1,4 @@
|
||||
use std::fs;
|
||||
use std::process;
|
||||
use std::{fs, process};
|
||||
|
||||
fn load_config_file() -> Vec<(String, Option<String>)> {
|
||||
fs::read_to_string("config.txt")
|
||||
|
@ -2,9 +2,8 @@
|
||||
#![warn(unused_lifetimes)]
|
||||
#![warn(unreachable_pub)]
|
||||
|
||||
use std::env;
|
||||
use std::path::PathBuf;
|
||||
use std::process;
|
||||
use std::{env, process};
|
||||
|
||||
use self::utils::Compiler;
|
||||
|
||||
|
@ -3,14 +3,12 @@
|
||||
use std::path::PathBuf;
|
||||
use std::process::Command;
|
||||
|
||||
use crate::build_sysroot;
|
||||
use crate::config;
|
||||
use crate::path::{Dirs, RelPath};
|
||||
use crate::prepare::{apply_patches, GitRepo};
|
||||
use crate::rustc_info::get_default_sysroot;
|
||||
use crate::shared_utils::rustflags_from_env;
|
||||
use crate::utils::{spawn_and_wait, CargoProject, Compiler, LogGroup};
|
||||
use crate::{CodegenBackend, SysrootKind};
|
||||
use crate::{build_sysroot, config, CodegenBackend, SysrootKind};
|
||||
|
||||
static BUILD_EXAMPLE_OUT_DIR: RelPath = RelPath::BUILD.join("example");
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
use std::env;
|
||||
use std::fs;
|
||||
use std::io;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::{self, Command};
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::{env, fs, io};
|
||||
|
||||
use crate::path::{Dirs, RelPath};
|
||||
use crate::shared_utils::rustflags_to_cmd_env;
|
||||
|
@ -8,8 +8,7 @@
|
||||
#[cfg(any(windows, unix, target_os = "redox"))]
|
||||
mod realloc_fallback {
|
||||
use core::alloc::{GlobalAlloc, Layout};
|
||||
use core::cmp;
|
||||
use core::ptr;
|
||||
use core::{cmp, ptr};
|
||||
impl super::System {
|
||||
pub(crate) unsafe fn realloc_fallback(
|
||||
&self,
|
||||
@ -34,6 +33,7 @@ mod platform {
|
||||
use core::alloc::{GlobalAlloc, Layout};
|
||||
use core::ffi::c_void;
|
||||
use core::ptr;
|
||||
|
||||
use System;
|
||||
extern "C" {
|
||||
fn posix_memalign(memptr: *mut *mut c_void, align: usize, size: usize) -> i32;
|
||||
@ -71,6 +71,7 @@ unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 {
|
||||
#[allow(nonstandard_style)]
|
||||
mod platform {
|
||||
use core::alloc::{GlobalAlloc, Layout};
|
||||
|
||||
use System;
|
||||
type LPVOID = *mut u8;
|
||||
type HANDLE = LPVOID;
|
||||
|
@ -2,10 +2,8 @@
|
||||
|
||||
#![feature(arbitrary_self_types, unsize, coerce_unsized, dispatch_from_dyn)]
|
||||
|
||||
use std::{
|
||||
marker::Unsize,
|
||||
ops::{CoerceUnsized, Deref, DispatchFromDyn},
|
||||
};
|
||||
use std::marker::Unsize;
|
||||
use std::ops::{CoerceUnsized, Deref, DispatchFromDyn};
|
||||
|
||||
struct Ptr<T: ?Sized>(Box<T>);
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
coroutines,
|
||||
stmt_expr_attributes,
|
||||
coroutine_trait,
|
||||
is_sorted,
|
||||
repr_simd,
|
||||
tuple_trait,
|
||||
unboxed_closures
|
||||
|
@ -6,3 +6,5 @@ ignore = [
|
||||
version = "Two"
|
||||
use_small_heuristics = "Max"
|
||||
merge_derives = false
|
||||
group_imports = "StdExternalCrate"
|
||||
imports_granularity = "Module"
|
||||
|
@ -1,7 +1,8 @@
|
||||
//! Unwind info generation (`.eh_frame`)
|
||||
|
||||
use cranelift_codegen::ir::Endianness;
|
||||
use cranelift_codegen::isa::{unwind::UnwindInfo, TargetIsa};
|
||||
use cranelift_codegen::isa::unwind::UnwindInfo;
|
||||
use cranelift_codegen::isa::TargetIsa;
|
||||
use cranelift_object::ObjectProduct;
|
||||
use gimli::write::{CieId, EhFrame, FrameTable, Section};
|
||||
use gimli::RunTimeEndian;
|
||||
|
@ -11,8 +11,9 @@
|
||||
use rustc_codegen_ssa::back::link::ensure_removed;
|
||||
use rustc_codegen_ssa::back::metadata::create_compressed_metadata_file;
|
||||
use rustc_codegen_ssa::base::determine_cgu_reuse;
|
||||
use rustc_codegen_ssa::errors as ssa_errors;
|
||||
use rustc_codegen_ssa::{CodegenResults, CompiledModule, CrateInfo, ModuleKind};
|
||||
use rustc_codegen_ssa::{
|
||||
errors as ssa_errors, CodegenResults, CompiledModule, CrateInfo, ModuleKind,
|
||||
};
|
||||
use rustc_data_structures::profiling::SelfProfilerRef;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_data_structures::sync::{par_map, IntoDynSyncSend};
|
||||
@ -26,8 +27,9 @@
|
||||
use crate::concurrency_limiter::{ConcurrencyLimiter, ConcurrencyLimiterToken};
|
||||
use crate::debuginfo::TypeDebugContext;
|
||||
use crate::global_asm::GlobalAsmConfig;
|
||||
use crate::prelude::*;
|
||||
use crate::unwind_module::UnwindModule;
|
||||
use crate::{prelude::*, BackendConfig};
|
||||
use crate::BackendConfig;
|
||||
|
||||
struct ModuleCodegenResult {
|
||||
module_regular: CompiledModule,
|
||||
|
@ -14,9 +14,9 @@
|
||||
use rustc_span::Symbol;
|
||||
|
||||
use crate::debuginfo::TypeDebugContext;
|
||||
use crate::prelude::*;
|
||||
use crate::unwind_module::UnwindModule;
|
||||
use crate::{prelude::*, BackendConfig};
|
||||
use crate::{CodegenCx, CodegenMode};
|
||||
use crate::{BackendConfig, CodegenCx, CodegenMode};
|
||||
|
||||
struct JitState {
|
||||
jit_module: UnwindModule<JITModule>,
|
||||
|
@ -85,10 +85,9 @@
|
||||
mod prelude {
|
||||
pub(crate) use cranelift_codegen::ir::condcodes::{FloatCC, IntCC};
|
||||
pub(crate) use cranelift_codegen::ir::function::Function;
|
||||
pub(crate) use cranelift_codegen::ir::types;
|
||||
pub(crate) use cranelift_codegen::ir::{
|
||||
AbiParam, Block, FuncRef, Inst, InstBuilder, MemFlags, Signature, SourceLoc, StackSlot,
|
||||
StackSlotData, StackSlotKind, TrapCode, Type, Value,
|
||||
types, AbiParam, Block, FuncRef, Inst, InstBuilder, MemFlags, Signature, SourceLoc,
|
||||
StackSlot, StackSlotData, StackSlotKind, TrapCode, Type, Value,
|
||||
};
|
||||
pub(crate) use cranelift_codegen::Context;
|
||||
pub(crate) use cranelift_module::{self, DataDescription, FuncId, Linkage, Module};
|
||||
|
@ -1,7 +1,6 @@
|
||||
use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext};
|
||||
use rustc_hir::LangItem;
|
||||
use rustc_middle::ty::AssocKind;
|
||||
use rustc_middle::ty::GenericArg;
|
||||
use rustc_middle::ty::{AssocKind, GenericArg};
|
||||
use rustc_session::config::{sigpipe, EntryFnType};
|
||||
use rustc_span::symbol::Ident;
|
||||
use rustc_span::DUMMY_SP;
|
||||
|
@ -1,6 +1,7 @@
|
||||
//! Peephole optimizations that can be performed while creating clif ir.
|
||||
|
||||
use cranelift_codegen::ir::{condcodes::IntCC, InstructionData, Opcode, Value, ValueDef};
|
||||
use cranelift_codegen::ir::condcodes::IntCC;
|
||||
use cranelift_codegen::ir::{InstructionData, Opcode, Value, ValueDef};
|
||||
use cranelift_frontend::FunctionBuilder;
|
||||
|
||||
/// If the given value was produced by the lowering of `Rvalue::Not` return the input and true,
|
||||
|
Loading…
Reference in New Issue
Block a user