about summary refs log tree commit diff
path: root/src/libpanic_unwind
AgeCommit message (Collapse)AuthorLines
2019-11-12Remove no longer needed mutabilityMark Rousskov-1/+1
2019-11-12Snap cfgsMark Rousskov-22/+2
2019-11-11Remove trampoline, pass `ret` and `unwind` when handling intrinsicsAaron Hill-8/+0
2019-11-11Fix tidyAaron Hill-2/+0
2019-11-11Move to miri.rs and re-export itAaron Hill-4/+9
2019-11-11Add commentAaron Hill-0/+2
2019-11-11Add miri trampoline, fix handling of intrinsic returnAaron Hill-0/+3
2019-11-11Use proper intrinsic typeAaron Hill-2/+1
2019-11-11More work on miri_start_panicAaron Hill-1/+9
2019-11-11Fix up intrinsic implementationAaron Hill-2/+6
2019-11-11Add explicit Miri support to libpanic_unwindAaron Hill-1/+16
2019-11-05improper_ctypes: `extern "C"` fnsDavid Wood-0/+1
2019-11-03Make Emscripten unwinding use a valid type_infoAmanieu d'Antras-12/+45
This allows catch_panic to ignore C++ exceptions.
2019-11-03Make SEH exceptions use a rust_panic type instead of unsigned __int64*Amanieu d'Antras-136/+46
2019-11-03Allow foreign exceptions to unwind through Rust codeAmanieu d'Antras-254/+173
2019-10-25Merge branch 'master' into rusty-hermit, resolve conflictsStefan Lankes-7/+7
2019-10-22Apply clippy::needless_return suggestionsMateusz Mikuła-7/+7
2019-10-06redesign of the interface to the unikernel HermitCoreStefan Lankes-0/+24
- the old interface between HermitCore and the Rust Standard Library based on a small C library (newlib) - remove this interface and call directly the unikernel - remove the dependency to the HermitCore linker - use rust-lld as linker
2019-08-02libpanic_unwind: Unconfigure tests during normal buildVadim Petrochenkov-18/+22
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-2/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-07-22add support for hexagon-unknown-linux-muslBrian Cain-0/+3
2019-06-17Make use of `ptr::null(_mut)` instead of casting zeroLzu Tao-4/+4
2019-06-10std: Remove internal definitions of `cfg_if!` macroAlex Crichton-39/+2
This is duplicated in a few locations throughout the sysroot to work around issues with not exporting a macro in libstd but still wanting it available to sysroot crates to define blocks. Nowadays though we can simply depend on the `cfg-if` crate on crates.io, allowing us to use it from there!
2019-04-12Stabilize the `alloc` crate.Simon Sapin-2/+0
This implements RFC 2480: * https://github.com/rust-lang/rfcs/pull/2480 * https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md Closes https://github.com/rust-lang/rust/issues/27783
2019-02-13libpanic_unwind => 2018: remove unused extern crate.Mazdak Farrokhzad-3/+0
2019-02-13libpanic_unwind => 2018Mazdak Farrokhzad-12/+13
2019-02-10rustc: doc commentsAlexander Regueiro-12/+12
2019-02-07Remove images' url to make it work even without internet connectionGuillaume Gomez-3/+1
2018-12-25Remove licensesMark Rousskov-100/+0
2018-12-19Adding unwinding support for x86_64_fortanix_unknown_sgx target.Vardhan Thigle-1/+1
2018-12-11std: Depend directly on crates.io cratesAlex Crichton-2/+2
Ever since we added a Cargo-based build system for the compiler the standard library has always been a little special, it's never been able to depend on crates.io crates for runtime dependencies. This has been a result of various limitations, namely that Cargo doesn't understand that crates from crates.io depend on libcore, so Cargo tries to build crates before libcore is finished. I had an idea this afternoon, however, which lifts the strategy from #52919 to directly depend on crates.io crates from the standard library. After all is said and done this removes a whopping three submodules that we need to manage! The basic idea here is that for any crate `std` depends on it adds an *optional* dependency on an empty crate on crates.io, in this case named `rustc-std-workspace-core`. This crate is overridden via `[patch]` in this repository to point to a local crate we write, and *that* has a `path` dependency on libcore. Note that all `no_std` crates also depend on `compiler_builtins`, but if we're not using submodules we can publish `compiler_builtins` to crates.io and all crates can depend on it anyway! The basic strategy then looks like: * The standard library (or some transitive dep) decides to depend on a crate `foo`. * The standard library adds ```toml [dependencies] foo = { version = "0.1", features = ['rustc-dep-of-std'] } ``` * The crate `foo` has an optional dependency on `rustc-std-workspace-core` * The crate `foo` has an optional dependency on `compiler_builtins` * The crate `foo` has a feature `rustc-dep-of-std` which activates these crates and any other necessary infrastructure in the crate. A sample commit for `dlmalloc` [turns out to be quite simple][commit]. After that all `no_std` crates should largely build "as is" and still be publishable on crates.io! Notably they should be able to continue to use stable Rust if necessary, since the `rename-dependency` feature of Cargo is soon stabilizing. As a proof of concept, this commit removes the `dlmalloc`, `libcompiler_builtins`, and `libc` submodules from this repository. Long thorns in our side these are now gone for good and we can directly depend on crates.io! It's hoped that in the long term we can bring in other crates as necessary, but for now this is largely intended to simply make it easier to manage these crates and remove submodules. This should be a transparent non-breaking change for all users, but one possible stickler is that this almost for sure breaks out-of-tree `std`-building tools like `xargo` and `cargo-xbuild`. I think it should be relatively easy to get them working, however, as all that's needed is an entry in the `[patch]` section used to build the standard library. Hopefully we can work with these tools to solve this problem! [commit]: https://github.com/alexcrichton/dlmalloc-rs/commit/28ee12db813a3b650a7c25d1c36d2c17dcb88ae3
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-5/+5
2018-12-07Add x86_64-fortanix-unknown-sgx target to libstd and dependenciesJethro Beekman-1/+1
The files src/libstd/sys/sgx/*.rs are mostly copied/adapted from the wasm target. This also updates the dlmalloc submodule to the very latest version.
2018-11-06refactor: use shorthand fieldsteresy-2/+2
2018-09-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-1/+1
2018-09-13Auto merge of #53621 - jordanrh1:windows-arm, r=alexcrichtonbors-1/+1
Add target thumbv7a-pc-windows-msvc This is an early draft of support for Windows/ARM. To test it, 1. Install Visual Studio 2017 and Windows SDK version 17134. 1. Obtain alexcrichton/xz2-rs#35, rust-lang-nursery/compiler-builtins#256, and the fix for [LLVM Bug 38620](https://bugs.llvm.org/show_bug.cgi?id=38620). 2. Open a command prompt and run ``` set CC_thumbv7a-pc-windows-msvc=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.11.25503\bin\HostX64\arm\CL.exe set CFLAGS_thumbv7a-pc-windows-msvc=/D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1 /nologo c:\python27\python.exe x.py build --host x86_64-pc-windows-msvc --build x86_64-pc-windows-msvc --target thumbv7a-pc-windows-msvc ``` It will build the stage 2 compiler, but fail building stage 2 test. To build an executable targeting windows/arm, 1. Copy `build\x86_64-pc-windows-msvc\stage0\bin\cargo.exe` to `build\x86_64-pc-windows-msvc\stage2\bin` 2. Open a command prompt and run ``` "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat" set PATH=build\x86_64-pc-windows-msvc\stage2\bin;%PATH% cargo new hello cd hello cargo build --target thumbv7a-pc-windows-msvc –release ``` Copy target\thumbv7a-pc-windows-msvc\release\hello.exe to your platform and run. There are a number of open issues that I'm hoping to get help with: - Error when compiling the `test` crate: `error: cannot link together two panic runtimes: panic_abort and panic_unwind` - Warnings when building the compiler_builtins crate: `warning: cl : Command line warning D9002 : ignoring unknown option '-fvisibility=hidden'`. It looks like the build system is passing GCC-style flags to MSVC. - How to specify the LIBPATH entries for ARM. Right now they are hardcoded as absolute paths in the target spec. This pull request depends on - alexcrichton/xz2-rs#35 - update vcxproj to Visual Studio 2017 - rust-lang-nursery/compiler-builtins#256 - fix compile errors when building for windows/arm - [Bug 38620 - ARM: Incorrect COFF relocation type for thumb bl instruction](https://bugs.llvm.org/show_bug.cgi?id=38620) This PR updates #52659
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-09-07Fix tidy errorsJordan Rhee-2/+0
2018-09-04Add target thumbv7a-pc-windows-msvcJordan Rhee-1/+3
2018-08-29Replace usages of 'bad_style' with 'nonstandard_style'.Corey Farwell-3/+3
`bad_style` is being deprecated in favor of `nonstandard_style`: - https://github.com/rust-lang/rust/issues/41646
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-21Rollup merge of #53329 - frewsxcv:frewsxcv-ptr-add-sub, r=RalfJungkennytm-1/+1
Replace usages of ptr::offset with ptr::{add,sub}. Rust provides these helper methods – so let's use them!
2018-08-20Replace usages of ptr::offset with ptr::{add,sub}.Corey Farwell-1/+1
2018-08-19Fix typos found by codespell.Matthias Krüger-2/+2
2018-08-15Start adding an `aarch64-pc-windows-msvc` targetAlex Crichton-29/+71
This commit adds the necessary definitions for target specs and such as well as the necessary support in libstd to compile basic `aarch64-pc-windows-msvc` binaries. The target is not currently built on CI, but it can be built locally with: ./configure --target=aarch64-pc-windows-msvc --set rust.lld ./x.py build src/libstd --target aarch64-pc-windows-msvc Currently this fails to build `libtest` due to a linker bug (seemingly in LLD?) which hasn't been investigate yet. Otherwise though with libstd you can build a hello world program (linked with LLD). I've not tried to execute it yet, but it at least links! Full support for this target is still a long road ahead, but this is hopefully a good stepping stone to get started. Points of note about this target are: * Currently defaults to `panic=abort` as support is still landing in LLVM for SEH on AArch64. * Currently defaults to LLD as a linker as I was able to get farther with it than I was with `link.exe`
2018-08-09[nll] libpanic_unwind: enable feature(nll) for bootstrapmemoryruins-0/+1
2018-08-05Fix failure on msvcvarkor-1/+0
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-1/+0
2018-07-11Deny bare trait objects in in src/libpanic_unwindljedrz-17/+18
2018-05-18NetBSD on EABI ARM does not use ARM EHABIJonathan A. Kollasch-2/+2