about summary refs log tree commit diff
path: root/src/librustc_target
AgeCommit message (Collapse)AuthorLines
2020-02-11Rollup merge of #66498 - bjorn3:less_feature_flags, r=Dylan-DPCDylan DPC-1/+0
Remove unused feature gates I think many of the remaining unstable things can be easily be replaced with stable things. I have kept the `#![feature(nll)]` even though it is only necessary in `libstd`, to make regressions of it harder.
2020-02-08Auto merge of #68452 - msizanoen1:riscv-abi, r=nagisa,eddybbors-15/+330
Implement proper C ABI lowering for RISC-V This is necessary for full RISC-V psABI compliance when passing argument across C FFI boundary. cc @lenary
2020-02-08rustc_target: treat enum variants like union members, in call ABIs.Eduard-Mihai Burtescu-9/+43
2020-02-08rustc_target: switch homogeneous_aggregate to returning Result.Eduard-Mihai Burtescu-67/+86
2020-02-07Remove unused feature gate from librustc_targetbjorn3-1/+0
2020-02-04Implement proper C ABI lowering for RISC-Vmsizanoen1-15/+330
2020-01-31Drop cfg(bootstrap) codeMark Rousskov-1/+0
2020-01-28Set lld flavor for MSVC to link.exeJohn Kåre Alsaker-2/+5
2020-01-22Rollup merge of #68361 - t6:patch-freebsd-lld-i386, r=alexcrichtonTyler Mandry-1/+3
Unbreak linking with lld 9 on FreeBSD 13.0-CURRENT i386 Add -Wl,-znotext to default linker flags to link with lld 9 on FreeBSD 13.0-CURRENT i386 where rust-nightly has been failing to link since 2019-12-10 with variations of ``` = note: ld: error: relocation R_386_PC32 cannot be used against symbol __rust_probestack; recompile with -fPIC >>> defined in /wrkdirs/usr/ports/lang/rust-nightly/work/rustc-nightly-src/build/i686-unknown-freebsd/stage1/lib/rustlib/i686-unknown-freebsd/lib/libcompiler_builtins-6570a75fe85f0e1a.rlib(compiler_builtins-6570a75fe85f0e1a.compiler_builtins.2i519eqi-cgu.15.rcgu.o) >>> referenced by std.4xivr03c-cgu.14 >>> std-9bd70afd58e204b7.std.4xivr03c-cgu.14.rcgu.o:(_$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::h1c78ed6e734a2bfc (.llvm.10122419023709863394)) in archive /wrkdirs/usr/ports/lang/rust-nightly/work/rustc-nightly-src/build/i686-unknown-freebsd/stage1/lib/rustlib/i686-unknown-freebsd/lib/libstd-9bd70afd58e204b7.rlib ld: error: relocation R_386_PC32 cannot be used against symbol __rust_probestack; recompile with -fPIC >>> defined in /wrkdirs/usr/ports/lang/rust-nightly/work/rustc-nightly-src/build/i686-unknown-freebsd/stage1/lib/rustlib/i686-unknown-freebsd/lib/libcompiler_builtins-6570a75fe85f0e1a.rlib(compiler_builtins-6570a75fe85f0e1a.compiler_builtins.2i519eqi-cgu.15.rcgu.o) >>> referenced by std.4xivr03c-cgu.14 >>> std-9bd70afd58e204b7.std.4xivr03c-cgu.14.rcgu.o:(std::io::util::copy::h9115f048f2203467) in archive /wrkdirs/usr/ports/lang/rust-nightly/work/rustc-nightly-src/build/i686-unknown-freebsd/stage1/lib/rustlib/i686-unknown-freebsd/lib/libstd-9bd70afd58e204b7.rlib clang-cpp: error: linker command failed with exit code 1 (use -v to see invocation) error: aborting due to previous error error: could not compile `rustc_macros`. ``` Full log: http://beefy17.nyi.freebsd.org/data/head-i386-default/p523508_s356869/logs/rust-nightly-1.42.0.20200118.log AFAICT it stopped building after bumping compiler_builtins to 0.1.22 in https://github.com/rust-lang/rust/pull/67110.
2020-01-20Merge branch 'master' into bare-metal-cortex-aJorge Aparicio-1/+1
2020-01-19Add -Wl,-znotext to default linker flags to link with lld 9 on FreeBSD ↵Tobias Kortkamp-1/+3
13.0-CURRENT i386 rust-nightly has been failing to link since 2019-12-10 with variations of ``` = note: ld: error: relocation R_386_PC32 cannot be used against symbol __rust_probestack; recompile with -fPIC >>> defined in /wrkdirs/usr/ports/lang/rust-nightly/work/rustc-nightly-src/build/i686-unknown-freebsd/stage1/lib/rustlib/i686-unknown-freebsd/lib/libcompiler_builtins-6570a75fe85f0e1a.rlib(compiler_builtins-6570a75fe85f0e1a.compiler_builtins.2i519eqi-cgu.15.rcgu.o) >>> referenced by std.4xivr03c-cgu.14 >>> std-9bd70afd58e204b7.std.4xivr03c-cgu.14.rcgu.o:(_$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::h1c78ed6e734a2bfc (.llvm.10122419023709863394)) in archive /wrkdirs/usr/ports/lang/rust-nightly/work/rustc-nightly-src/build/i686-unknown-freebsd/stage1/lib/rustlib/i686-unknown-freebsd/lib/libstd-9bd70afd58e204b7.rlib ld: error: relocation R_386_PC32 cannot be used against symbol __rust_probestack; recompile with -fPIC >>> defined in /wrkdirs/usr/ports/lang/rust-nightly/work/rustc-nightly-src/build/i686-unknown-freebsd/stage1/lib/rustlib/i686-unknown-freebsd/lib/libcompiler_builtins-6570a75fe85f0e1a.rlib(compiler_builtins-6570a75fe85f0e1a.compiler_builtins.2i519eqi-cgu.15.rcgu.o) >>> referenced by std.4xivr03c-cgu.14 >>> std-9bd70afd58e204b7.std.4xivr03c-cgu.14.rcgu.o:(std::io::util::copy::h9115f048f2203467) in archive /wrkdirs/usr/ports/lang/rust-nightly/work/rustc-nightly-src/build/i686-unknown-freebsd/stage1/lib/rustlib/i686-unknown-freebsd/lib/libstd-9bd70afd58e204b7.rlib clang-cpp: error: linker command failed with exit code 1 (use -v to see invocation) error: aborting due to previous error error: could not compile `rustc_macros`. ``` Full log: http://beefy17.nyi.freebsd.org/data/head-i386-default/p523508_s356869/logs/rust-nightly-1.42.0.20200118.log AFAICT it stopped building after bumping compiler_builtins to 0.1.22 in https://github.com/rust-lang/rust/pull/67110.
2020-01-18slice_patterns: remove internal uses of gateMazdak Farrokhzad-1/+1
2020-01-15add bare metal ARM Cortex-A targets to rustcJorge Aparicio-0/+87
-> `rustc --target armv7-none-eabi` will work also build rust-std (rustup) components for them -> `rustup target add armv7-none-eabi` will work
2020-01-13Auto merge of #67900 - nikic:prepare-llvm-10, r=nagisabors-44/+105
Prepare for LLVM 10 upgrade Split off from #67759, this just adds the necessary compatibility bits and updates codegen tests, without performing the actual LLVM upgrade. r? @alexcrichton
2020-01-10Added tvOS as a backendSebastian Imlay-0/+170
2020-01-10Allow specifying LLVM args in target specificationsJethro Beekman-0/+6
2020-01-07Update data layouts to include new X86 address spacesNikita Popov-44/+105
2020-01-05Add backticks to various diagnosticsvarkor-1/+1
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-2/+2
2019-12-30Make things build againVadim Petrochenkov-1/+1
2019-12-25tidy: change msdn links to newer locationsLzu Tao-2/+2
see accouncement at https://docs.microsoft.com/welcome-to-docs
2019-12-22Format the worldMark Rousskov-1076/+984
2019-12-15Rollup merge of #67255 - tuxillo:remove-i686-unknown-dragonfly, r=alexcrichtonMazdak Farrokhzad-24/+0
Remove i686-unknown-dragonfly target DragonFly BSD removed support for i386 a while ago. It only supports x86_64 right now.
2019-12-14Auto merge of #67084 - Pagten:feature/print-msg-from-elf-entrypoint, r=Amanieubors-1/+1
SGX: Change ELF entrypoint This fixes [rust-sgx issue #148](https://github.com/fortanix/rust-sgx/issues/148). A new entry point is created for the ELF file generated by `rustc`, separate from the enclave entry point. When the ELF file is executed as a Linux binary, the error message below is written to stderr. > Error: This file is an SGX enclave which cannot be executed as a standard Linux binary. > See the installation guide at https://edp.fortanix.com/docs/installation/guide/ on how to use 'cargo run' or follow the steps at https://edp.fortanix.com/docs/tasks/deployment/ for manual deployment. When the ELF file is converted to an SGXS using `elf2sgxs`, the old entry point is still set as the enclave entry point. In a future pull request in the rust-sgx repository, `elf2sgxs` will be modified to remove the code in the ELF entry point, since this code is not needed in the enclave.
2019-12-12Remove i686-unknown-dragonfly targetAntonio Huete Jimenez-24/+0
2019-12-11Rollup merge of #67015 - osa1:issue66971, r=wesleywiserMazdak Farrokhzad-0/+8
Fix constant propagation for scalar pairs We now only propagate a scalar pair if the Rvalue is a tuple with two scalars. This for example avoids propagating a (u8, u8) value when Rvalue has type `((), u8, u8)` (see the regression test). While this is a correct thing to do, implementation is tricky and will be done later. Fixes #66971 Fixes #66339 Fixes #67019
2019-12-06const-prop: Restrict scalar pair propagationÖmer Sinan Ağacan-0/+8
We now only propagate a scalar pair if the Rvalue is a tuple with two scalars. This for example avoids propagating a (u8, u8) value when Rvalue has type `((), u8, u8)` (see the regression test). While this is a correct thing to do, implementation is tricky and will be done later. Fixes #66971 Fixes #66339 Fixes #67019
2019-12-06Rename to `then_some` and `then`varkor-5/+5
2019-12-06Use `to_option` in various placesvarkor-37/+6
2019-12-05Processed review commentsPieter Agten-1/+0
2019-12-05Auto merge of #66520 - alexcrichton:disable-gdb-wasm, r=eddybbors-0/+3
Disable gdb pretty printer global section on wasm targets The wasm targets don't support gdb anyway so there's no need for this section there.
2019-12-04Disable gdb pretty printer global section on wasm targetsAlex Crichton-0/+3
The wasm targets don't support gdb anyway so there's no need for this section there.
2019-12-04Create a separate entry point for the ELF file, instead of using the SGX ↵Pieter Agten-1/+2
entry point
2019-12-04Auto merge of #65947 - eddyb:fn-abi, r=oli-obk,nagisabors-0/+5
rustc: split FnAbi's into definitions/direct calls ("of_instance") and indirect calls ("of_fn_ptr"). After this PR: * `InstanceDef::Virtual` is only used for "direct" virtual calls, and shims around those calls use `InstanceDef::ReifyShim` (i.e. for `<dyn Trait as Trait>::f as fn(_)`) * this could easily be done for intrinsics as well, to allow their reification, but I didn't do it * `FnAbi::of_instance` is **always** used for declaring/defining an `fn`, and for direct calls to an `fn` * this is great for e.g. https://github.com/rust-lang/rust/pull/65881 (`#[track_caller]`), which can introduce the "caller location" argument into "codegen signatures" by only changing `FnAbi::of_instance`, after this PR * `FnAbi::of_fn_ptr` is used primarily for indirect calls, i.e. to `fn` pointers * *not* virtual calls (which use `FnAbi::of_instance` with `InstanceDef::Virtual`) * there's also a couple uses where the `rustc_codegen_llvm` needs to declare (i.e. FFI-import) an LLVM function that has no Rust declaration available at all * at least one of them could probably be a "weak lang item" instead As there are many steps, this PR is best reviewed commit by commit - some of which arguably should be in their own PRs, I may have gotten carried away a bit. cc @nagisa @rkruppe @oli-obk @anp
2019-12-03rustc_target: add abi::call::Conv::Rust distinct from Conv::C.Eduard-Mihai Burtescu-0/+5
2019-12-03Change linker for x86_64-fortanix-unknown-sgx to rust-lldParth Sane-27/+31
For SGX, the relocation using the relocation table is done by the code in rust/src/libstd/sys/sgx/abi/reloc.rs and this code should not require relocation. Setting RelaxELFRelocations flag if allows this to happen, hence adding a Target Option for it.
2019-11-29Auto merge of #66645 - RalfJung:dereferenceable, r=pnkfelixbors-0/+2
remove the 'dereferenceable' attribute from Box Fixes https://github.com/rust-lang/rust/issues/66600 r? @eddyb @rkruppe
2019-11-27Rollup merge of #66798 - bwignall:typo, r=varkorTyler Mandry-1/+1
Fix spelling typos Should be non-semantic. Uses https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines to find likely typos.
2019-11-26Fix spelling typosBrian Wignall-1/+1
2019-11-26Rollup merge of #66713 - hermitcore:hermit, r=alexcrichtonTyler Mandry-0/+54
introduce a target to build the kernel of the unikernel HermitCore We are developing the unikernel HermitCore, where the kernel is written in Rust and is already supported by the Rust Standard Library. To compile the kernel with the new build flag "-Z build-std", we introduce a new target, which avoids the usage of SSE & AVX within the kernel.
2019-11-26Rollup merge of #66711 - mattico:aarch-msvc-fp, r=nagisaTyler Mandry-0/+1
Add hardware floating point features to aarch64-pc-windows-msvc Fixes #66701
2019-11-26Rollup merge of #66661 - msizanoen1:riscv-gnu, r=alexcrichtonTyler Mandry-0/+26
Add riscv64gc-unknown-linux-gnu target This PR add the target, but doesn't build std on CI yet. I have a port for `libc` crate and std which I will upstream soon after this target is added. r? @alexcrichton
2019-11-25review feedback: comments and spacingRalf Jung-1/+2
2019-11-24disable redzoneStefan Lankes-0/+1
2019-11-24use nicer code style to pass tidy checkStefan Lankes-1/+3
2019-11-24introduce a target to build the kernel HermitCoreStefan Lankes-0/+51
- the target avoids the usage of SSE & AVX within the kernel
2019-11-24Add hardware floating point features to aarch64-pc-windows-msvcMatt Ickstadt-0/+1
2019-11-23Rename StableHashingContextLike to HashStableContext.Camille GILLOT-1/+1
2019-11-23Add riscv64gc-unknown-linux-gnu targetmsizanoen1-0/+26
2019-11-22remove the 'dereferenceable' attribute from BoxRalf Jung-0/+1