about summary refs log tree commit diff
path: root/src/librustc_back/target/arm_linux_androideabi.rs
AgeCommit message (Collapse)AuthorLines
2018-04-26Rename rustc_back::target to rustc_target::spec.Irina Popa-35/+0
2018-04-26rustc_back: move LinkerFlavor, PanicStrategy, and RelroLevel to target.Irina Popa-2/+1
2017-10-07enable strict alignment (+strict-align) on ARMv6Jorge Aparicio-1/+1
As discovered in #44538 ARMv6 devices may or may not support unaligned memory accesses. ARMv6 Linux *seems* to have no problem with unaligned accesses but this is because the kernel is stepping in to fix each unaligned memory access -- this incurs in a performance penalty. This commit enforces aligned memory accesses on all our in-tree ARM targets that may be used with ARMv6 devices. This should improve performance of Rust programs on ARMv6 devices. For the record, clang also applies this attribute when targeting ARMv6 devices that are not running Darwin or NetBSD.
2017-09-30rustc: Specify c_int width for each targetDaniel Klauer-0/+1
(all i32 for now, as in liblibc)
2017-04-30Change arm-linux-androideabi to correspond to the armeabi official ABIMarco A L Barbosa-1/+2
Fixes #40941.
2017-04-07-Z linker-flavorJorge Aparicio-0/+2
This patch adds a `-Z linker-flavor` flag to rustc which can be used to invoke the linker using a different interface. For example, by default rustc assumes that all the Linux targets will be linked using GCC. This makes it impossible to use LLD as a linker using just `-C linker=ld.lld` because that will invoke LLD with invalid command line arguments. (e.g. rustc will pass -Wl,--gc-sections to LLD but LLD doesn't understand that; --gc-sections would be the right argument) With this patch one can pass `-Z linker-flavor=ld` to rustc to invoke the linker using a LD-like interface. This way, `rustc -C linker=ld.lld -Z linker-flavor=ld` will invoke LLD with the right arguments. `-Z linker-flavor` accepts 4 different arguments: `em` (emcc), `ld`, `gcc`, `msvc` (link.exe). `em`, `gnu` and `msvc` cover all the existing linker interfaces. `ld` is a new flavor for interfacing GNU's ld and LLD. This patch also changes target specifications. `linker-flavor` is now a mandatory field that specifies the *default* linker flavor that the target will use. This change also makes the linker interface *explicit*; before, it used to be derived from other fields like linker-is-gnu, is-like-msvc, is-like-emscripten, etc. Another change to target specifications is that the fields `pre-link-args`, `post-link-args` and `late-link-args` now expect a map from flavor to linker arguments. ``` diff - "pre-link-args": ["-Wl,--as-needed", "-Wl,-z,-noexecstack"], + "pre-link-args": { + "gcc": ["-Wl,--as-needed", "-Wl,-z,-noexecstack"], + "ld": ["--as-needed", "-z,-noexecstack"], + }, ``` [breaking-change] for users of custom targets specifications
2016-10-24check target abi supportTim Neumann-2/+5
2016-10-03change max_atomic_width type from u64 to Option<u64>Jorge Aparicio-1/+1
to better express the idea that omitting this field defaults this value to target_pointer_width
2016-07-27librustc_back: convert fn target() to return ResultDoug Goldstein-4/+4
Change all the target generation functions to return a Result<Target, String> so that targets that are unable to be instantiated can be expressed as an Err instead of a panic!(). This should improve #33497 as well.
2016-05-14Remove "gnu" from "target_env" because it does not matter for android.Nerijus Arlauskas-1/+1
2016-05-09Add #[cfg(target_has_atomic)] to get atomic support for the current targetAmanieu d'Antras-0/+1
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-0/+1
2016-01-11Replace no_elf_tls with target_thread_localAmanieu d'Antras-1/+0
2015-12-21rustc: Add feature-gated cfg(target_thread_local)Alex Crichton-0/+1
Currently the standard library has some pretty complicated logic to detect whether #[thread_local] should be used or whether it's supported. This is also unfortunately not quite true for OSX where not all versions support the #[thread_local] attribute (only 10.7+ does). Compiling code for OSX 10.6 is typically requested via the MACOSX_DEPLOYMENT_TARGET environment variable (e.g. the linker recognizes this), but the standard library unfortunately does not respect this. This commit updates the compiler to add a `target_thread_local` cfg annotation if the platform being targeted supports the `#[thread_local]` attribute. This is feature gated for now, and it is only true on non-aarch64 Linux and 10.7+ OSX (e.g. what the module already does today). Logic has also been added to parse the deployment target environment variable.
2015-09-24Fix `target_vendor` for AndroidSebastian Wicki-1/+1
2015-09-24rustc: Add target_vendor for target triplesSebastian Wicki-0/+1
This adds a new target property, `target_vendor` which can be used as a matcher for conditional compilation. The vendor is part of the autoconf target triple: <arch><sub>-<vendor>-<os>-<env> The default value for `target_vendor` is "unknown". Matching against the `target_vendor` with `#[cfg]` is currently feature gated as `cfg_target_vendor`.
2015-07-16trans: Clean up handling the LLVM data layoutAlex Crichton-3/+0
Turns out for OSX our data layout was subtly wrong and the LLVM update must have exposed this. Instead of fixing this I've removed all data layouts from the compiler to just use the defaults that LLVM provides for all targets. All data layouts (and a number of dead modules) are removed from the compiler here. Custom target specifications can still provide a custom data layout, but it is now an optional key as the default will be used if one isn't specified.
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-10/+4
2015-04-27rustc: Add target_env for triples by defaultAlex Crichton-0/+1
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-02-16Lower the default dwarf version for androidEunji Jeong-0/+1
2015-01-08Rename `target_word_size` to `target_pointer_width`Nick Cameron-1/+1
Closes #20421 [breaking-change]
2015-01-06Fix misspelled comments.Joseph Crail-1/+1
I cleaned up comments prior to the 1.0 alpha release.
2014-12-28Fixes invalid LLVM data layout for aggregate data typesValerii Hiora-1/+1
According to http://llvm.org/docs/LangRef.html#data-layout correct syntax for data layout is `a:<abi>:<pref>` so it looks like `a0:<abi>:<pref>` is either a typo or outdated syntax (as it goes back pretty deep in time)
2014-11-06fix typo in librustc target specDaniel Micay-1/+1
2014-11-04Don't use pie on AndroidCorey Richardson-0/+2
2014-11-04Implement flexible target specificationCorey Richardson-0/+33
Removes all target-specific knowledge from rustc. Some targets have changed during this, but none of these should be very visible outside of cross-compilation. The changes make our targets more consistent. iX86-unknown-linux-gnu is now only available as i686-unknown-linux-gnu. We used to accept any value of X greater than 1. i686 was released in 1995, and should encompass the bare minimum of what Rust supports on x86 CPUs. The only two windows targets are now i686-pc-windows-gnu and x86_64-pc-windows-gnu. The iOS target has been renamed from arm-apple-ios to arm-apple-darwin. A complete list of the targets we accept now: arm-apple-darwin arm-linux-androideabi arm-unknown-linux-gnueabi arm-unknown-linux-gnueabihf i686-apple-darwin i686-pc-windows-gnu i686-unknown-freebsd i686-unknown-linux-gnu mips-unknown-linux-gnu mipsel-unknown-linux-gnu x86_64-apple-darwin x86_64-unknown-freebsd x86_64-unknown-linux-gnu x86_64-pc-windows-gnu Closes #16093 [breaking-change]