about summary refs log tree commit diff
path: root/src/librustc_back
AgeCommit message (Collapse)AuthorLines
2016-05-24std: Stabilize APIs for the 1.10 releaseAlex Crichton-4/+7
This commit applies the FCP decisions made by the libs team for the 1.10 cycle, including both new stabilizations and deprecations. Specifically, the list of APIs is: Stabilized: * `os::windows::fs::OpenOptionsExt::access_mode` * `os::windows::fs::OpenOptionsExt::share_mode` * `os::windows::fs::OpenOptionsExt::custom_flags` * `os::windows::fs::OpenOptionsExt::attributes` * `os::windows::fs::OpenOptionsExt::security_qos_flags` * `os::unix::fs::OpenOptionsExt::custom_flags` * `sync::Weak::new` * `Default for sync::Weak` * `panic::set_hook` * `panic::take_hook` * `panic::PanicInfo` * `panic::PanicInfo::payload` * `panic::PanicInfo::location` * `panic::Location` * `panic::Location::file` * `panic::Location::line` * `ffi::CStr::from_bytes_with_nul` * `ffi::CStr::from_bytes_with_nul_unchecked` * `ffi::FromBytesWithNulError` * `fs::Metadata::modified` * `fs::Metadata::accessed` * `fs::Metadata::created` * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange` * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak` * `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key` * `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}` * `SocketAddr::is_unnamed` * `SocketAddr::as_pathname` * `UnixStream::connect` * `UnixStream::pair` * `UnixStream::try_clone` * `UnixStream::local_addr` * `UnixStream::peer_addr` * `UnixStream::set_read_timeout` * `UnixStream::set_write_timeout` * `UnixStream::read_timeout` * `UnixStream::write_Timeout` * `UnixStream::set_nonblocking` * `UnixStream::take_error` * `UnixStream::shutdown` * Read/Write/RawFd impls for `UnixStream` * `UnixListener::bind` * `UnixListener::accept` * `UnixListener::try_clone` * `UnixListener::local_addr` * `UnixListener::set_nonblocking` * `UnixListener::take_error` * `UnixListener::incoming` * RawFd impls for `UnixListener` * `UnixDatagram::bind` * `UnixDatagram::unbound` * `UnixDatagram::pair` * `UnixDatagram::connect` * `UnixDatagram::try_clone` * `UnixDatagram::local_addr` * `UnixDatagram::peer_addr` * `UnixDatagram::recv_from` * `UnixDatagram::recv` * `UnixDatagram::send_to` * `UnixDatagram::send` * `UnixDatagram::set_read_timeout` * `UnixDatagram::set_write_timeout` * `UnixDatagram::read_timeout` * `UnixDatagram::write_timeout` * `UnixDatagram::set_nonblocking` * `UnixDatagram::take_error` * `UnixDatagram::shutdown` * RawFd impls for `UnixDatagram` * `{BTree,Hash}Map::values_mut` * `<[_]>::binary_search_by_key` Deprecated: * `StaticCondvar` - this, and all other static synchronization primitives below, are usable today through the lazy-static crate on stable Rust today. Additionally, we'd like the non-static versions to be directly usable in a static context one day, so they're unlikely to be the final forms of the APIs in any case. * `CONDVAR_INIT` * `StaticMutex` * `MUTEX_INIT` * `StaticRwLock` * `RWLOCK_INIT` * `iter::Peekable::is_empty` Closes #27717 Closes #27720 cc #27784 (but encode methods still exist) Closes #30014 Closes #30425 Closes #30449 Closes #31190 Closes #31399 Closes #31767 Closes #32111 Closes #32281 Closes #32312 Closes #32551 Closes #33018
2016-05-21Improve internal documentation and code styleTicki-22/+19
Fix some code layout, remove some unnecessary returns, fix typos, punctuation, and comment consistency.
2016-05-16Auto merge of #33651 - Nercury:update-i686-android-target-to-match-abi, ↵bors-1/+5
r=alexcrichton Update i686-linux-android features to match android x86 ABI. Based on [android's official x86 ABI info](http://developer.android.com/ndk/guides/abis.html#x86), the x86 baseline CPU can be safely updated to `pentiumpro`, with the addition of `MMX`, `SSE`, `SSE2`, `SSE3`, `SSSE3` features. r? @alexcrichton
2016-05-15Update i686-linux-android features to match android ABI.Nerijus Arlauskas-1/+5
2016-05-14Add all possible features (NEON, FP) to aarch64 android target.Nerijus Arlauskas-0/+3
2016-05-14Add missing "max_atomic_width" to new armv7 android target.Nerijus Arlauskas-0/+1
2016-05-14Remove "gnu" from "target_env" because it does not matter for android.Nerijus Arlauskas-3/+3
2016-05-09Add #[cfg(target_has_atomic)] to get atomic support for the current targetAmanieu d'Antras-8/+68
2016-05-08Auto merge of #33414 - Nercury:master, r=alexcrichtonbors-0/+29
Add armv7-linux-androideabi target This PR adds `armv7-linux-androideabi` target that matches `armeabi-v7a` Android ABI, ~~downscales `arm-linux-androideabi` target to match `armeabi` Android ABI~~ (TBD later if needed). This should allow us to get the best performance from every [Android ABI level](http://developer.android.com/ndk/guides/abis.html). Currently existing target `arm-linux-androideabi` started gaining features out of the supported range of [android `armeabi`](http://developer.android.com/ndk/guides/abis.html). While android compiler does not use a different target for later supported `armv7` architecture, it has distinct ABI name `armeabi-v7a`. We decided to add rust target `armv7-linux-androideabi` to match it. Note that `NEON`, `VFPv3-D32`, and `ThumbEE` instruction sets are not added, because not all android devices are guaranteed to support all or some of these, and [their availability should be checked at runtime](http://developer.android.com/ndk/guides/abis.html#v7a). ~~This reduces performance of existing `arm-linux-androideabi` and may make it _much_ slower (we are talking more than order of magnitude in some random ad-hoc fp benchmark that I did).~~ Part of #33278.
2016-05-08Auto merge of #33091 - sanxiyn:unused-trait-import-3, r=nrcbors-2/+2
Warn unused trait imports, rebased Rebase of #30021. Fix #25730.
2016-05-08Auto merge of #33403 - alexcrichton:consistent-env, r=brsonbors-3/+3
rustc: Change target_env for ARM targets to `gnu` Right now they're `gnueabihf` and `gnueabi`, but when adding new platforms like musl on ARM it's unfortunate to have to test for all three (`musl`, `musleabi`, and `musleabihf`). This PR switches everything currently to `gnu`, and the new musl targets can also use `musl` when they land. Closes #33244
2016-05-07Rollup merge of #33430 - phil-opp:patch-1, r=alexcrichtonSteve Klabnik-1/+1
[Doc] Default cpu is "generic" (and not "default") See [line 305](https://github.com/phil-opp/rust/blob/a22ca2872ef6782306012e6817dc4b8b778c43e9/src/librustc_back/target/mod.rs#L305).
2016-05-07Auto merge of #33359 - tamird:consolidate-musl, r=alexcrichtonbors-73/+74
rustc_back: use a common musl base extracted from #33327. cc #33189. r? @alexcrichton
2016-05-07Add armv7-linux-androideabi target.Nerijus Arlauskas-0/+29
2016-05-05[Doc] Default cpu is "generic" (and not "default")Philipp Oppermann-1/+1
2016-05-04refactor: if -> matchJorge Aparicio-12/+11
2016-05-04rustc: Change target_env for ARM targets to `gnu`Alex Crichton-3/+3
Right now they're `gnueabihf` and `gnueabi`, but when adding new platforms like musl on ARM it's unfortunate to have to test for all three (`musl`, `musleabi`, and `musleabihf`). This PR switches everything currently to `gnu`, and the new musl targets can also use `musl` when they land. Closes #33244
2016-05-03fix breaking changesAriel Ben-Yehuda-1/+1
2016-05-03Fix more testsSeo Sanghyeon-2/+2
2016-05-02fix built-in target detectionJorge Aparicio-2/+1
previously the logic was accepting wrong triples (like `x86_64_unknown-linux-musl`) as valid ones (like `x86_64-unknown-linux-musl`) if they contained an underscore instead of a dash. fixes #33329
2016-05-02rustc_back: use a common musl baseTamir Duberstein-73/+74
2016-04-25Auto merge of #33115 - mbrubeck:vfp3-d16, r=nrcbors-1/+1
Enable vfp3-d16 for ARMv7 Android target Android's [armeabi-v7a ABI][1] guarantees at least VFPv3-d16 hardware FPU support, so Rust should include this in the default features for the `arm-linux-androideabi` target. [1]: https://developer.android.com/ndk/guides/abis.html
2016-04-24librustc_back: fix typoTamir Duberstein-1/+1
2016-04-24librustc_back: remove explicit linkerTamir Duberstein-7/+0
"cc" is already the default.
2016-04-20Enable vfp3-d16 for ARMv7 Android targetMatt Brubeck-1/+1
Android's [armeabi-v7a ABI][1] guarantees at least VFPv3-d16 hardware FPU support, so Rust should include this in the default features for the arm-linux-androideabi target. [1]: https://developer.android.com/ndk/guides/abis.html
2016-04-19Make data-layout mandatory in target specs.Eduard Burtescu-9/+53
2016-04-14Rollup merge of #32856 - cardoe:target-spec-path, r=alexcrichtonSteve Klabnik-2/+1
librustc_back: fix incorrect comment about RUST_TARGET_PATH The path `/etc/rustc/` is not the default last entry in RUST_TARGET_PATH. This was in RFC131 but was never implemented in rustc so it was removed as part of #31117 and rust-lang/rfcs#1473. Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2016-04-12Auto merge of #32804 - alexcrichton:stabilize-1.9, r=brsonbors-1/+0
std: Stabilize APIs for the 1.9 release This commit applies all stabilizations, renamings, and deprecations that the library team has decided on for the upcoming 1.9 release. All tracking issues have gone through a cycle-long "final comment period" and the specific APIs stabilized/deprecated are: Stable * `std::panic` * `std::panic::catch_unwind` (renamed from `recover`) * `std::panic::resume_unwind` (renamed from `propagate`) * `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`) * `std::panic::UnwindSafe` (renamed from `RecoverSafe`) * `str::is_char_boundary` * `<*const T>::as_ref` * `<*mut T>::as_ref` * `<*mut T>::as_mut` * `AsciiExt::make_ascii_uppercase` * `AsciiExt::make_ascii_lowercase` * `char::decode_utf16` * `char::DecodeUtf16` * `char::DecodeUtf16Error` * `char::DecodeUtf16Error::unpaired_surrogate` * `BTreeSet::take` * `BTreeSet::replace` * `BTreeSet::get` * `HashSet::take` * `HashSet::replace` * `HashSet::get` * `OsString::with_capacity` * `OsString::clear` * `OsString::capacity` * `OsString::reserve` * `OsString::reserve_exact` * `OsStr::is_empty` * `OsStr::len` * `std::os::unix::thread` * `RawPthread` * `JoinHandleExt` * `JoinHandleExt::as_pthread_t` * `JoinHandleExt::into_pthread_t` * `HashSet::hasher` * `HashMap::hasher` * `CommandExt::exec` * `File::try_clone` * `SocketAddr::set_ip` * `SocketAddr::set_port` * `SocketAddrV4::set_ip` * `SocketAddrV4::set_port` * `SocketAddrV6::set_ip` * `SocketAddrV6::set_port` * `SocketAddrV6::set_flowinfo` * `SocketAddrV6::set_scope_id` * `<[T]>::copy_from_slice` * `ptr::read_volatile` * `ptr::write_volatile` * The `#[deprecated]` attribute * `OpenOptions::create_new` Deprecated * `std::raw::Slice` - use raw parts of `slice` module instead * `std::raw::Repr` - use raw parts of `slice` module instead * `str::char_range_at` - use slicing plus `chars()` plus `len_utf8` * `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8` * `str::char_at` - use slicing plus `chars()` * `str::char_at_reverse` - use slicing plus `chars().rev()` * `str::slice_shift_char` - use `chars()` plus `Chars::as_str` * `CommandExt::session_leader` - use `before_exec` instead. Closes #27719 cc #27751 (deprecating the `Slice` bits) Closes #27754 Closes #27780 Closes #27809 Closes #27811 Closes #27830 Closes #28050 Closes #29453 Closes #29791 Closes #29935 Closes #30014 Closes #30752 Closes #31262 cc #31398 (still need to deal with `before_exec`) Closes #31405 Closes #31572 Closes #31755 Closes #31756
2016-04-11std: Stabilize APIs for the 1.9 releaseAlex Crichton-1/+0
This commit applies all stabilizations, renamings, and deprecations that the library team has decided on for the upcoming 1.9 release. All tracking issues have gone through a cycle-long "final comment period" and the specific APIs stabilized/deprecated are: Stable * `std::panic` * `std::panic::catch_unwind` (renamed from `recover`) * `std::panic::resume_unwind` (renamed from `propagate`) * `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`) * `std::panic::UnwindSafe` (renamed from `RecoverSafe`) * `str::is_char_boundary` * `<*const T>::as_ref` * `<*mut T>::as_ref` * `<*mut T>::as_mut` * `AsciiExt::make_ascii_uppercase` * `AsciiExt::make_ascii_lowercase` * `char::decode_utf16` * `char::DecodeUtf16` * `char::DecodeUtf16Error` * `char::DecodeUtf16Error::unpaired_surrogate` * `BTreeSet::take` * `BTreeSet::replace` * `BTreeSet::get` * `HashSet::take` * `HashSet::replace` * `HashSet::get` * `OsString::with_capacity` * `OsString::clear` * `OsString::capacity` * `OsString::reserve` * `OsString::reserve_exact` * `OsStr::is_empty` * `OsStr::len` * `std::os::unix::thread` * `RawPthread` * `JoinHandleExt` * `JoinHandleExt::as_pthread_t` * `JoinHandleExt::into_pthread_t` * `HashSet::hasher` * `HashMap::hasher` * `CommandExt::exec` * `File::try_clone` * `SocketAddr::set_ip` * `SocketAddr::set_port` * `SocketAddrV4::set_ip` * `SocketAddrV4::set_port` * `SocketAddrV6::set_ip` * `SocketAddrV6::set_port` * `SocketAddrV6::set_flowinfo` * `SocketAddrV6::set_scope_id` * `<[T]>::copy_from_slice` * `ptr::read_volatile` * `ptr::write_volatile` * The `#[deprecated]` attribute * `OpenOptions::create_new` Deprecated * `std::raw::Slice` - use raw parts of `slice` module instead * `std::raw::Repr` - use raw parts of `slice` module instead * `str::char_range_at` - use slicing plus `chars()` plus `len_utf8` * `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8` * `str::char_at` - use slicing plus `chars()` * `str::char_at_reverse` - use slicing plus `chars().rev()` * `str::slice_shift_char` - use `chars()` plus `Chars::as_str` * `CommandExt::session_leader` - use `before_exec` instead. Closes #27719 cc #27751 (deprecating the `Slice` bits) Closes #27754 Closes #27780 Closes #27809 Closes #27811 Closes #27830 Closes #28050 Closes #29453 Closes #29791 Closes #29935 Closes #30014 Closes #30752 Closes #31262 cc #31398 (still need to deal with `before_exec`) Closes #31405 Closes #31572 Closes #31755 Closes #31756
2016-04-09librustc_back: fix incorrect comment about RUST_TARGET_PATHDoug Goldstein-2/+1
The path `/etc/rustc/` is not the default last entry in RUST_TARGET_PATH. This was in RFC131 but was never implemented in rustc so it was removed as part of #31117 and rust-lang/rfcs#1473. Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2016-04-08Read "is-like-msvc" target option from JSONpravic-0/+1
cc #32818
2016-04-06rustc: move rustc_front to rustc::hir.Eduard Burtescu-442/+0
2016-03-29Remove unnecessary dependencies on rustc_llvm.Eduard Burtescu-2/+0
2016-03-25Compute a salt from arguments passed via -Cmetadata.Michael Woerister-4/+4
2016-03-22fix alignmentJorge Aparicio-1/+1
2016-03-22sprinkle feature gates here and thereJorge Aparicio-0/+1
2016-03-22try! -> ?Jorge Aparicio-5/+5
Automated conversion using the untry tool [1] and the following command: ``` $ find -name '*.rs' -type f | xargs untry ``` at the root of the Rust repo. [1]: https://github.com/japaric/untry
2016-03-20The `data-layout` field is no longer required, but the `os` field isPhilipp Oppermann-2/+2
The `data-layout` field was made optional in 958d5638254958ea42652de7444b63f2e67e7fe3. The `os` field is always required.
2016-03-17hir, mir: Separate HIR expressions / MIR operands from InlineAsm.Eduard Burtescu-1/+1
2016-03-17trans: Combine cabi and back::abi into abi.Eduard Burtescu-25/+0
2016-03-12std: Clean out deprecated APIsAlex Crichton-0/+317
Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that are deprecated in the 1.8 release are sticking around for the rest of this cycle. Some notable changes are: * The `dynamic_lib` module was moved into `rustc_back` as the compiler still relies on a few bits and pieces. * The `DebugTuple` formatter now special-cases an empty struct name with only one field to append a trailing comma.
2016-03-10Auto merge of #32034 - alexcrichton:old-x86-msvc, r=aturonbors-14/+23
rustc: Add an i586-pc-windows-msvc target Similarly to #31629 where an i586-unknown-linux-gnu target was added, there is sometimes a desire to compile for x86 Windows as well where SSE2 is disabled. This commit mirrors the i586-unknown-linux-gnu target and simply adds a variant for Windows as well. This is motivated by a recent [Gecko bug][ff] where crashes were seen on 32-bit Windows due to users having CPUs that don't support SSE2 instructions. It was requested that we could have non-SSE2 builds of the standard library available so they could continue to use vanilla releases and nightlies. [ff]: https://bugzilla.mozilla.org/show_bug.cgi?id=1253202
2016-03-04rustc: Add an i586-pc-windows-msvc targetAlex Crichton-14/+23
Similarly to #31629 where an i586-unknown-linux-gnu target was added, there is sometimes a desire to compile for x86 Windows as well where SSE2 is disabled. This commit mirrors the i586-unknown-linux-gnu target and simply adds a variant for Windows as well. This is motivated by a recent [Gecko bug][ff] where crashes were seen on 32-bit Windows due to users having CPUs that don't support SSE2 instructions. It was requested that we could have non-SSE2 builds of the standard library available so they could continue to use vanilla releases and nightlies. [ff]: https://bugzilla.mozilla.org/show_bug.cgi?id=1253202
2016-02-27fallout from removing hir::ExprRangeAlex Burka-2/+0
A whole bunch of stuff gets folded into struct handling! Plus, removes an ugly hack from trans and accidentally fixes a bug with constructing ranges from references (see later commits with tests).
2016-02-26Use .copy_from_slice() where applicableUlrik Sverdrup-3/+4
.copy_from_slice() does the same job of .clone_from_slice(), but the former is explicitly for Copy elements and calls `memcpy` directly, and thus is it efficient without optimization too.
2016-02-23Auto merge of #31814 - petevine:master, r=alexcrichtonbors-1/+1
The `vfp2` option was a leftover from `armv6` compatibility features of the original armhf target. Gcc defaults to `vfp3`on `armv7` hard-float linux systems so we should make it the default for rustc too.
2016-02-22Eradicate last vestiges of armv6petevine-1/+1
2016-02-22Fix broken Solaris buildNikita Baksalyar-0/+1
2016-02-19Auto merge of #31735 - aliclark:freebsd-link-defs, r=alexcrichtonbors-3/+10
The FreeBSD linker config is missing some options present in the other BSD configs. This seems accidental, with other BSDs having the flags added in platform-specific commits, or with the flags present from day 1. Some other BSD commits for reference: https://github.com/aliclark/rust/commit/fcb30a0b67b1bd4acbc3422ff74fac5d031ae1ae#diff-db69d903e469b7769aefaa31786fc2c4R1 https://github.com/aliclark/rust/commit/0b7c4f57f6ba59dabe4db2808fe45e8bd8bbce22#diff-1c7b74536ce0291d1f89953035f26a71R1 https://github.com/aliclark/rust/commit/cfd2a5cfa148b1c927571cc2e9f06e242831b696
2016-02-17bring freebsd linker config up-to-date (same as dragonfly)Ali Clark-3/+10