about summary refs log tree commit diff
path: root/src/librustc_back/target
AgeCommit message (Collapse)AuthorLines
2015-05-12Scale back changes madeAlex Crichton-8/+3
2015-05-12Very hacky MSVC hacks.Ricky Taylor-1/+73
Conflicts: mk/platform.mk src/librustc/session/config.rs src/librustc_back/target/aarch64_apple_ios.rs src/librustc_back/target/aarch64_linux_android.rs src/librustc_back/target/arm_linux_androideabi.rs src/librustc_back/target/arm_unknown_linux_gnueabi.rs src/librustc_back/target/arm_unknown_linux_gnueabihf.rs src/librustc_back/target/armv7_apple_ios.rs src/librustc_back/target/armv7s_apple_ios.rs src/librustc_back/target/i386_apple_ios.rs src/librustc_back/target/i686_apple_darwin.rs src/librustc_back/target/i686_pc_windows_gnu.rs src/librustc_back/target/i686_unknown_dragonfly.rs src/librustc_back/target/i686_unknown_linux_gnu.rs src/librustc_back/target/mips_unknown_linux_gnu.rs src/librustc_back/target/mipsel_unknown_linux_gnu.rs src/librustc_back/target/mod.rs src/librustc_back/target/powerpc_unknown_linux_gnu.rs src/librustc_back/target/x86_64_apple_darwin.rs src/librustc_back/target/x86_64_apple_ios.rs src/librustc_back/target/x86_64_pc_windows_gnu.rs src/librustc_back/target/x86_64_unknown_dragonfly.rs src/librustc_back/target/x86_64_unknown_freebsd.rs src/librustc_back/target/x86_64_unknown_linux_gnu.rs src/librustc_back/target/x86_64_unknown_openbsd.rs src/librustc_llvm/lib.rs src/librustc_trans/back/link.rs src/librustc_trans/trans/base.rs src/libstd/os.rs src/rustllvm/RustWrapper.cpp
2015-04-29Use PIE on AndroidTamir Duberstein-2/+0
This is OK to do given: - PIE is supported on Android starting with API 16. - The bots are running API 18. - API < 16 now has a 12.5% market share[0] as of 2015-04-29. Unfortunately, this breaks backtrace support. See #17520. Closes #17437. [0] https://developer.android.com/about/dashboards/index.html
2015-04-29DRY Android targetsTamir Duberstein-20/+32
2015-04-27rustc: Add support for linking arbitrary objectsAlex Crichton-6/+15
MUSL for example provides its own start/end objects in place of the standard ones shipped by gcc.
2015-04-27rustc_back: Add x86_64-unknown-linux-musl as a targetAlex Crichton-31/+96
This commit adds support for x86_64-unknown-linux-musl as a target of the compiler. There's some comments in the commit about some of the more flavorful flags passed to the linker as it's not quite as trivial as the normal specs.
2015-04-27rustc: Add target_env for triples by defaultAlex Crichton-0/+28
This adds a new `#[cfg]` matcher against the `target_env` property of the destination target triple. For example all windows triples today end with `-gnu` but we will also hopefully support non-`gnu` targets for Windows, at which point we'll need to differentiate between the two. This new `target_env` matches is provided and filled in with the target's environment name. Currently the only non-empty value of this name is `gnu`, but `musl` will be shortly added for the linux triples.
2015-04-01Fallout out rustcNiko Matsakis-1/+1
2015-03-31std: Stabilize last bits of io::ErrorAlex Crichton-2/+3
This commit stabilizes a few remaining bits of the `io::Error` type: * The `Error::new` method is now stable. The last `detail` parameter was removed and the second `desc` parameter was generalized to `E: Into<Box<Error>>` to allow creating an I/O error from any form of error. Currently there is no form of downcasting, but this will be added in time. * An implementation of `From<&str> for Box<Error>` was added to liballoc to allow construction of errors from raw strings. * The `Error::raw_os_error` method was stabilized as-is. * Trait impls for `Clone`, `Eq`, and `PartialEq` were removed from `Error` as it is not possible to use them with trait objects. This is a breaking change due to the modification of the `new` method as well as the removal of the trait implementations for the `Error` type. [breaking-change]
2015-03-28Fix some typosVadim Petrochenkov-1/+1
2015-03-23Add generic conversion traitsAaron Turon-2/+2
This commit: * Introduces `std::convert`, providing an implementation of RFC 529. * Deprecates the `AsPath`, `AsOsStr`, and `IntoBytes` traits, all in favor of the corresponding generic conversion traits. Consequently, various IO APIs now take `AsRef<Path>` rather than `AsPath`, and so on. Since the types provided by `std` implement both traits, this should cause relatively little breakage. * Deprecates many `from_foo` constructors in favor of `from`. * Changes `PathBuf::new` to take no argument (creating an empty buffer, as per convention). The previous behavior is now available as `PathBuf::from`. * De-stabilizes `IntoCow`. It's not clear whether we need this separate trait. Closes #22751 Closes #14433 [breaking-change]
2015-03-15Strip all leading/trailing newlinesTamir Duberstein-3/+0
2015-03-05std: Deprecate the old_io::process moduleAlex Crichton-8/+8
This module is now superseded by the `std::process` module. This module still has some room to expand to get quite back up to parity with the `old_io` version, and there is a [tracking issue][issue] for feature requests as well as known room for expansion. [issue]: https://github.com/rust-lang/rfcs/issues/941 [breaking-change]
2015-03-04std: Deprecate std::old_io::fsAlex Crichton-15/+19
This commit deprecates the majority of std::old_io::fs in favor of std::fs and its new functionality. Some functions remain non-deprecated but are now behind a feature gate called `old_fs`. These functions will be deprecated once suitable replacements have been implemented. The compiler has been migrated to new `std::fs` and `std::path` APIs where appropriate as part of this change.
2015-02-25Rollup merge of #22727 - alexcrichton:prep-env, r=aturonManish Goregaokar-1/+2
This commit moves `std::env` away from the `std::old_io` error type as well as the `std::old_path` module. Methods returning an error now return `io::Error` and methods consuming or returning paths use `std::path` instead of `std::old_path`. This commit does not yet mark these APIs as `#[stable]`. This commit also migrates `std::old_io::TempDir` to `std::fs::TempDir` with essentially the exact same API. This type was added to interoperate with the new path API and has its own `tempdir` feature. Finally, this commit reverts the deprecation of `std::os` APIs returning the old path API types. This deprecation can come back once the entire `std::old_path` module is deprecated. [breaking-change]
2015-02-24std: Move std::env to the new I/O APIsAlex Crichton-1/+2
This commit moves `std::env` away from the `std::old_io` error type as well as the `std::old_path` module. Methods returning an error now return `io::Error` and methods consuming or returning paths use `std::path` instead of `std::old_path`. This commit does not yet mark these APIs as `#[stable]`. This commit also migrates `std::old_io::TempDir` to `std::fs::TempDir` with essentially the exact same API. This type was added to interoperate with the new path API and has its own `tempdir` feature. Finally, this commit reverts the deprecation of `std::os` APIs returning the old path API types. This deprecation can come back once the entire `std::old_path` module is deprecated. [breaking-change]
2015-02-23openbsd: restore linker optionSébastien Marie-0/+5
The -Wl,--as-needed option was removed during first stages of bootstrapping between Linux and OpenBSD. Restore it, as it seems to be ok now.
2015-02-22Rollup merge of #22592 - nikomatsakis:deprecate-bracket-bracket, r=aturonManish Goregaokar-1/+1
r? @aturon
2015-02-21Auto merge of #21959 - dhuseby:bitrig-support, r=brsonbors-0/+59
This patch adds the necessary pieces to support rust on Bitrig https://bitrig.org
2015-02-20Remove remaining uses of `[]`. This time I tried to use deref coercions ↵Niko Matsakis-1/+1
where possible.
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-3/+3
2015-02-18 Manual merge of #22475 - alexcrichton:rollup, r=alexcrichtonHuon Wilson-2/+2
One windows bot failed spuriously.
2015-02-17rollup merge of #22191: nagisa/target-ptr-width-jsonAlex Crichton-2/+2
This aligns json target specification to match terminology used elsewhere in the code base. [breaking-change] for custom target json users. Change all appearances of target-word-size to target-pointer-width.
2015-02-17Auto merge of #21774 - ejjeong:enable-test-for-android, r=alexcrichtonbors-2/+9
- Now "make check-stage2-T-aarch64-linux-android-H-x86_64-unknown-linux-gnu" works (#21773) - Fix & enable debuginfo tests for android (#10381) - Fix & enable more tests for android (both for arm/aarch64) - Enable many already-pass tests on android (both for arm/aarch64)
2015-02-16Lower the default dwarf version for androidEunji Jeong-0/+6
2015-02-15Rollup merge of #22297 - nagisa:spring-cleanup, r=alexcrichtonManish Goregaokar-2/+1
This PR replaces uses of `os::getenv` with newly introduced `env::var{,_os}`. Mostly did this as a background activity to procrastinate from procrastinating. Tests appear to build and run fine. This includes benchmarks from test/bench directory.
2015-02-13Remove a few uses of deprecated getenvSimonas Kazlauskas-2/+1
2015-02-12Adjusting default CPUs for iOSValerii Hiora-1/+4
According to @dotdash it enables more aggressive optimizations from LLVM
2015-02-11bitrig integrationDave Huseby-0/+59
2015-02-11std: Tweak the std::env OsString/String interfaceAlex Crichton-1/+1
This commit tweaks the interface of the `std::env` module to make it more ergonomic for common usage: * `env::var` was renamed to `env::var_os` * `env::var_string` was renamed to `env::var` * `env::args` was renamed to `env::args_os` * `env::args` was re-added as a panicking iterator over string values * `env::vars` was renamed to `env::vars_os` * `env::vars` was re-added as a panicking iterator over string values. This should make common usage (e.g. unicode values everywhere) more ergonomic as well as "the default". This is also a breaking change due to the differences of what's yielded from each of these functions, but migration should be fairly easy as the defaults operate over `String` which is a common type to use. [breaking-change]
2015-02-11Change target-word-size to target-pointer-widthSimonas Kazlauskas-2/+2
This aligns json target specification to match terminology used elsewhere in the code base. [breaking-change] for custom target json users. Change all appearances of target-word-size to target-pointer-width.
2015-02-10Make aarch64-linux-android check with real targetEunji Jeong-2/+3
2015-02-04remove all kind annotations from closuresJorge Aparicio-1/+1
2015-02-03Rename std::path to std::old_pathAaron Turon-1/+1
As part of [RFC 474](https://github.com/rust-lang/rfcs/pull/474), this commit renames `std::path` to `std::old_path`, leaving the existing path API in place to ease migration to the new one. Updating should be as simple as adjusting imports, and the prelude still maps to the old path APIs for now. [breaking-change]
2015-02-02rollup merge of #21787: alexcrichton/std-envAlex Crichton-4/+5
Conflicts: src/libstd/sys/unix/backtrace.rs src/libstd/sys/unix/os.rs
2015-02-01std: Add a new `env` moduleAlex Crichton-4/+5
This is an implementation of [RFC 578][rfc] which adds a new `std::env` module to replace most of the functionality in the current `std::os` module. More details can be found in the RFC itself, but as a summary the following methods have all been deprecated: [rfc]: https://github.com/rust-lang/rfcs/pull/578 * `os::args_as_bytes` => `env::args` * `os::args` => `env::args` * `os::consts` => `env::consts` * `os::dll_filename` => no replacement, use `env::consts` directly * `os::page_size` => `env::page_size` * `os::make_absolute` => use `env::current_dir` + `join` instead * `os::getcwd` => `env::current_dir` * `os::change_dir` => `env::set_current_dir` * `os::homedir` => `env::home_dir` * `os::tmpdir` => `env::temp_dir` * `os::join_paths` => `env::join_paths` * `os::split_paths` => `env::split_paths` * `os::self_exe_name` => `env::current_exe` * `os::self_exe_path` => use `env::current_exe` + `pop` * `os::set_exit_status` => `env::set_exit_status` * `os::get_exit_status` => `env::get_exit_status` * `os::env` => `env::vars` * `os::env_as_bytes` => `env::vars` * `os::getenv` => `env::var` or `env::var_string` * `os::getenv_as_bytes` => `env::var` * `os::setenv` => `env::set_var` * `os::unsetenv` => `env::remove_var` Many function signatures have also been tweaked for various purposes, but the main changes were: * `Vec`-returning APIs now all return iterators instead * All APIs are now centered around `OsString` instead of `Vec<u8>` or `String`. There is currently on convenience API, `env::var_string`, which can be used to get the value of an environment variable as a unicode `String`. All old APIs are `#[deprecated]` in-place and will remain for some time to allow for migrations. The semantics of the APIs have been tweaked slightly with regard to dealing with invalid unicode (panic instead of replacement). The new `std::env` module is all contained within the `env` feature, so crates must add the following to access the new APIs: #![feature(env)] [breaking-change]
2015-02-01openbsd supportSébastien Marie-0/+60
2015-01-29s/Show/Debug/gJorge Aparicio-2/+2
2015-01-27Merge remote-tracking branch 'rust-lang/master'Brian Anderson-4/+8
Conflicts: src/libcore/cell.rs src/librustc_driver/test.rs src/libstd/old_io/net/tcp.rs src/libstd/old_io/process.rs
2015-01-27Auto merge of #21646 - dotdash:default_target_cpu, r=Aatchbors-1/+5
Using `generic` as the target cpu limits the generated code to the bare basics for the arch, while we can probably assume that we'll actually be running on somewhat modern hardware. This updates the default target CPUs for the x86 and x86_64 archs to match clang's behaviour. Refs #20777
2015-01-26Make '-A warnings' apply to all warnings, including feature gate warningsBrian Anderson-1/+1
2015-01-26Fallout of io => old_ioAlex Crichton-3/+3
2015-01-26Default to Pentium 4 as the x86 target CPU on Windows/Linux/DragonFlyBjörn Steinbrink-0/+3
Limiting ourselves to a generic x86 instruction set doesn't seem useful. Both users running those systems on original i386 hardware might as well manually specify a target cpu ;-) Clang uses the same default.
2015-01-26Use more specific target CPUs on DarwinBjörn Steinbrink-1/+2
Macs don't come with anything older than a Yonah (32bit) or Core2 (64bit), so we can default to those targets. Clang does the same.
2015-01-20Initial support for aarch64-linux-androidEunji Jeong-0/+30
2015-01-15auto merge of #20980 : richo/rust/final-power, r=alexcrichtonbors-1/+29
Originally, this was going to be discussed and revisted, however I've been working on this for months, and a rebase on top of master was about 1 flight's worth of work so I just went ahead and did it. This gets you as far as being able to target powerpc with, eg: LD_LIBRARY_PATH=./x86_64-unknown-linux-gnu/stage2/lib/ x86_64-unknown-linux-gnu/stage2/bin/rustc -C linker=powerpc-linux-gnu-gcc --target powerpc-unknown-linux-gnu hello.rs Would really love to get this out before 1.0. r? @alexcrichton
2015-01-11powerpc: Teach trans about powerpcRicho Healey-1/+1
2015-01-11powerpc: initialize llvmRicho Healey-0/+26
2015-01-11powerpc: Add backend support for powerpcRicho Healey-1/+3
2015-01-11Default to "x86-64" as the target cpu for x86_64 buildsBjörn Steinbrink-0/+14
Using "generic" disables a number of features that are present on all x86_64 cpus, the "x86-64" target cpu is the common denominator for that arch. Refs #20777