summary refs log tree commit diff
path: root/src/librustc_back
AgeCommit message (Collapse)AuthorLines
2016-05-04Make data-layout mandatory in target specs.Eduard Burtescu-9/+53
2016-04-12std: 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-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
2016-02-17specify the cpu type for LLVM for OpenBSD targetSébastien Marie-0/+1
The initial purpose is to workaround the LLVM bug https://llvm.org/bugs/show_bug.cgi?id=26554 for OpenBSD. By default, the `cpu' is defined to `generic`. But with a 64bit processor, the optimization for `generic` will use invalid asm code as NOP (the generated code for NOP isn't a NOP). According to #20777, "x86-64" is the right thing to do for x86_64 builds. Closes: #31363
2016-02-16Auto merge of #31534 - jseyfried:restrict_noninline_mod, r=nikomatsakisbors-1/+2
This PR disallows non-inline modules without path annotations that are either in a block or in an inline module whose containing file is not a directory owner (fixes #29765). This is a [breaking-change]. r? @nikomatsakis
2016-02-14Rollup merge of #31629 - petevine:master, r=alexcrichtonManish Goregaokar-0/+29
This PR should make it easier to create a baseline x86 compiler as well as make cross-compilation possible through a separate set of rlibs. Plus, a few Linux distributions (e.g. Debian) have voiced interest in having this target available.
2016-02-13Add a new i586 Linux targetpetevine-0/+29
2016-02-13Auto merge of #31579 - ollie27:msvc_link, r=alexcrichtonbors-0/+9
/LARGEADDRESSAWARE is already enabled for i686-pc-windows-gnu so we should probably be consistent. https://msdn.microsoft.com/en-us/library/wz223b1z.aspx /SAFESEH is a good thing to enable by default. https://msdn.microsoft.com/en-us/library/9a89h429.aspx
2016-02-13Disallow non-inline modules without path annotations inside blocks and fix ↵Jeffrey Seyfried-1/+2
fallout
2016-02-12rustc: add a `--print target-list` commandJorge Aparicio-77/+78
2016-02-11rustc_back: Fix disabling jemallocAlex Crichton-3/+3
When building with Cargo we need to detect `feature = "jemalloc"` to enable jemalloc, so propagate this same change to the build system to pass the right `--cfg` argument.
2016-02-11bootstrap: Add a bunch of Cargo.toml filesAlex Crichton-0/+19
These describe the structure of all our crate dependencies.
2016-02-11Enable /SAFESEH for i686-pc-windows-msvcOliver Middleton-0/+5
2016-02-11Enable /LARGEADDRESSAWARE for i686-pc-windows-msvcOliver Middleton-0/+4
It's already enabled for i686-pc-windows-gnu.
2016-02-11[breaking-change] don't pub export ast::Lit_ variantsOliver Schneider-1/+1
2016-02-11[breaking-change] don't glob import/export syntax::abi enum variantsOliver Schneider-5/+5
2016-02-08rustc: Use llvm-ar for custom targets by defaultAlex Crichton-12/+1
The compiler currently vendors its own version of "llvm-ar" (not literally the binary but rather the library support) and uses it for all major targets by default (e.g. everything defined in `src/librustc_back/target`). All custom target specs, however, still search for an `ar` tool by default. This commit changes this default behavior to using the internally bundled llvm-ar with the GNU format. Currently all targets use the GNU format except for OSX which uses the BSD format (surely makes sense, right?), and custom targets can change the format via the `archive-format` key in custom target specs. I suspect that we can outright remove support for invoking an external `ar` utility, but I figure for now there may be some crazy target relying on that so we should leave support in for now.
2016-02-07rustc: Tweak exe allocator for MinGW/rumprunAlex Crichton-1/+1
Both of these targets have jemalloc disabled unconditionally right now, so using `maybe_jemalloc` here isn't right. This fixes the case where a Linux compiler (which is itself configured to use jemalloc) attempts to cross-compile to MinGW, causing it to try to find an `alloc_jemalloc` crate (and failing).
2016-02-06Add support for i686-unknown-linux-muslBrian Anderson-0/+47
2016-02-06rustc: Add obj_is_bitcode to TargetOptionsBrian Anderson-0/+6
This tells trans::back::write not to LLVM codegen to create .o files but to put LLMV bitcode in .o files. Emscripten's emcc supports .o in this format, and this is, I think, slightly easier than making rlibs work without .o files.
2016-02-06Add the asmjs-unknown-emscripten triple. Add cfgs to libs.Brian Anderson-1/+39
Backtraces, and the compilation of libbacktrace for asmjs, are disabled. This port doesn't use jemalloc so, like pnacl, it disables jemalloc *for all targets* in the configure file. It disables stack protection.
2016-02-03Auto merge of #31078 - nbaksalyar:illumos, r=alexcrichtonbors-0/+61
This pull request adds support for [Illumos](http://illumos.org/)-based operating systems: SmartOS, OpenIndiana, and others. For now it's x86-64 only, as I'm not sure if 32-bit installations are widespread. This PR is based on #28589 by @potatosalad, and also closes #21000, #25845, and #25846. Required changes in libc are already merged: https://github.com/rust-lang-nursery/libc/pull/138 Here's a snapshot required to build a stage0 compiler: https://s3-eu-west-1.amazonaws.com/nbaksalyar/rustc-sunos-snapshot.tar.gz It passes all checks from `make check`. There are some changes I'm not quite sure about, e.g. macro usage in `src/libstd/num/f64.rs` and `DirEntry` structure in `src/libstd/sys/unix/fs.rs`, so any comments on how to rewrite it better would be greatly appreciated. Also, LLVM configure script might need to be patched to build it successfully, or a pre-built libLLVM should be used. Some details can be found here: https://llvm.org/bugs/show_bug.cgi?id=25409 Thanks! r? @brson
2016-02-02Auto merge of #31312 - alexcrichton:no-le-in-powerpc64le, r=alexcrichtonbors-3/+3
Currently the `mipsel-unknown-linux-gnu` target doesn't actually set the `target_arch` value to `mipsel` but it rather uses `mips`. Alternatively the `powerpc64le` target does indeed set the `target_arch` as `powerpc64le`, causing a bit of inconsistency between theset two. As these are just the same instance of one instruction set, let's use `target_endian` to switch between them and only set the `target_arch` as one value. This should cut down on the number of `#[cfg]` annotations necessary and all around be a little more ergonomic.
2016-02-01Remove "powerpc64le" and "mipsel" target_archAlex Crichton-3/+3
Currently the `mipsel-unknown-linux-gnu` target doesn't actually set the `target_arch` value to `mipsel` but it rather uses `mips`. Alternatively the `powerpc64le` target does indeed set the `target_arch` as `powerpc64le`, causing a bit of inconsistency between theset two. As these are just the same instance of one instruction set, let's use `target_endian` to switch between them and only set the `target_arch` as one value. This should cut down on the number of `#[cfg]` annotations necessary and all around be a little more ergonomic.
2016-02-01Auto merge of #31303 - alexcrichton:mips-warnings, r=aturonbors-4/+12
Currently any compilation to MIPS spits out the warning: 'generic' is not a recognized processor for this target (ignoring processor) Doesn't make for a great user experience! We don't encounter this in the normal bootstrap because the cpu/feature set are set by the makefiles. Instead let's just propagate these to the defaults for the entire target all the time (still overridable from the command line) and prevent warnings from being emitted by default.
2016-01-31Fix the armv7 linux targetpetevine-1/+1
2016-01-31Rename sunos to solarisNikita Baksalyar-7/+7
2016-01-31Apply several fixes for Illumos supportNikita Baksalyar-2/+0
2016-01-31Add Illumos supportNikita Baksalyar-0/+63
2016-01-31Auto merge of #31298 - japaric:mips-musl, r=alexcrichtonbors-0/+58
This target covers MIPS devices that run the trunk version of OpenWRT. The x86_64-unknown-linux-musl target always links statically to C libraries. For the mips(el)-unknown-linux-musl target, we opt for dynamic linking (like most of other targets do) to keep binary size down. As for the C compiler flags used in the build system, we use the same flags used for the mips(el)-unknown-linux-gnu target. r? @alexcrichton
2016-01-30rustc: set MIPS cpu/features in the compilerJorge Aparicio-5/+12
cf #31303
2016-01-29rustc: Set MIPS cpu/features in the compilerAlex Crichton-4/+12
Currently any compilation to MIPS spits out the warning: 'generic' is not a recognized processor for this target (ignoring processor) Doesn't make for a great user experience! We don't encounter this in the normal bootstrap because the cpu/feature set are set by the makefiles. Instead let's just propagate these to the defaults for the entire target all the time (still overridable from the command line) and prevent warnings from being emitted by default.