diff options
| author | Colin Finck <colin.finck@rwth-aachen.de> | 2018-07-30 15:50:51 +0200 |
|---|---|---|
| committer | Colin Finck <colin.finck@rwth-aachen.de> | 2018-07-30 15:50:51 +0200 |
| commit | e50f4eeaadcea0c1dcc28e15dfe91dd38393a6da (patch) | |
| tree | c61ad5332011435e2efb2ac7feaebd227d82ffbe /src/liballoc_system/lib.rs | |
| parent | 7bbcd005b30582d07f1a39dcf50f77b54e055828 (diff) | |
| download | rust-e50f4eeaadcea0c1dcc28e15dfe91dd38393a6da.tar.gz rust-e50f4eeaadcea0c1dcc28e15dfe91dd38393a6da.zip | |
Add targets for HermitCore (https://hermitcore.org) to the Rust compiler and port libstd to it.
As a start, the port uses the simplest possible configuration (no jemalloc, abort on panic) and makes use of existing Unix-specific code wherever possible. It adds targets for x86_64 (current main HermitCore platform) and aarch64 (HermitCore platform under development). Together with the patches to "liblibc" and "llvm", this enables HermitCore applications to be written in Rust.
Diffstat (limited to 'src/liballoc_system/lib.rs')
| -rw-r--r-- | src/liballoc_system/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs index 64348e05de7..39768301b9d 100644 --- a/src/liballoc_system/lib.rs +++ b/src/liballoc_system/lib.rs @@ -174,7 +174,7 @@ mod platform { } } - #[cfg(any(target_os = "android", target_os = "redox", target_os = "solaris"))] + #[cfg(any(target_os = "android", target_os = "hermit", target_os = "redox", target_os = "solaris"))] #[inline] unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 { // On android we currently target API level 9 which unfortunately @@ -197,7 +197,7 @@ mod platform { libc::memalign(layout.align(), layout.size()) as *mut u8 } - #[cfg(not(any(target_os = "android", target_os = "redox", target_os = "solaris")))] + #[cfg(not(any(target_os = "android", target_os = "hermit", target_os = "redox", target_os = "solaris")))] #[inline] unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 { let mut out = ptr::null_mut(); |
