summary refs log tree commit diff
path: root/src/librustc_target
AgeCommit message (Collapse)AuthorLines
2018-07-29Sanity-check all constantsOliver Schneider-0/+2
2018-07-28Rollup merge of #52763 - petrhosek:fuchsia-triple, r=alexcrichtonkennytm-7/+7
Omit the vendor component in Fuchsia triple Previously, using unknown as the vendor value would lead to the same result, but with the multiarch runtimes support in Clang, the target is now used to locate the runtime libraries and so the format is important. The denormalized format with omitted vendor component is the format we use with Clang and should be using for Rust as well.
2018-07-27Auto merge of #52336 - ishitatsuyuki:dyn-rollup, r=Mark-Simulacrumbors-2/+0
Rollup of bare_trait_objects PRs All deny attributes were moved into bootstrap so they can be disabled with a line of config. Warnings for external tools are allowed and it's up to the tool's maintainer to keep it warnings free. r? @Mark-Simulacrum cc @ljedrz @kennytm
2018-07-26Omit the vendor component in Fuchsia triplePetr Hosek-7/+7
Previously, using unknown as the vendor value would lead to the same result, but with the multiarch runtimes support in Clang, the target is now used to locate the runtime libraries and so the format is important. The denormalized format with omitted vendor component is the format we use with Clang and should be using for Rust as well.
2018-07-26sparc ABI issue - structure returning from function is returnedPetr Sumbera-10/+1
in 64bit registers Fixes: #52638
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-2/+0
2018-07-23Change single char str patterns to charsljedrz-2/+2
2018-07-14Auto merge of #52032 - DiamondLovesYou:amdgpu-kernel-abi, r=alexcrichtonbors-0/+4
Add the `amdgpu-kernel` ABI. Technically, there are requirements imposed by the LLVM `AMDGPUTargetMachine` on functions with this ABI (eg, the return type must be void), but I'm unsure exactly where this should be enforced.
2018-07-13Add the `amdgpu-kernel` ABI.Richard Diamond-0/+4
Technically, there are requirements imposed by the LLVM `AMDGPUTargetMachine` on functions with this ABI (eg, the return type must be void), but I'm unsure exactly where this should be enforced.
2018-07-14Rollup merge of #52330 - jethrogb:jb/target-link-args, r=varkorkennytm-11/+15
Don't silently ignore invalid data in target spec This is technically a breaking change, but only because invalid data was previously silently being ignored.
2018-07-13Don't silently ignore invalid data in target specJethro Beekman-11/+15
2018-07-12Deny bare trait objects in librustc_target and libtestljedrz-1/+3
2018-07-10Upgrade to LLVM's master branch (LLVM 7)Alex Crichton-1/+1
This commit upgrades the main LLVM submodule to LLVM's current master branch. The LLD submodule is updated in tandem as well as compiler-builtins. Along the way support was also added for LLVM 7's new features. This primarily includes the support for custom section concatenation natively in LLD so we now add wasm custom sections in LLVM IR rather than having custom support in rustc itself for doing so. Some other miscellaneous changes are: * We now pass `--gc-sections` to `wasm-ld` * The optimization level is now passed to `wasm-ld` * A `--stack-first` option is passed to LLD to have stack overflow always cause a trap instead of corrupting static data * The wasm target for LLVM switched to `wasm32-unknown-unknown`. * The syntax for aligned pointers has changed in LLVM IR and tests are updated to reflect this. * The `thumbv6m-none-eabi` target is disabled due to an [LLVM bug][llbug] Nowadays we've been mostly only upgrading whenever there's a major release of LLVM but enough changes have been happening on the wasm target that there's been growing motivation for quite some time now to upgrade out version of LLD. To upgrade LLD, however, we need to upgrade LLVM to avoid needing to build yet another version of LLVM on the builders. The revision of LLVM in use here is arbitrarily chosen. We will likely need to continue to update it over time if and when we discover bugs. Once LLVM 7 is fully released we can switch to that channel as well. [llbug]: https://bugs.llvm.org/show_bug.cgi?id=37382
2018-07-06Auto merge of #51757 - nielx:fix/haiku-fixes, r=nagisabors-0/+2
Haiku: several smaller fixes to build and run rust on Haiku This PR combines three small patches that help Rust build and run on the Haiku platform. These patches do not intend to impact other platforms.
2018-07-06Auto merge of #51953 - japaric:atomic-load-store, r=alexcrichtonbors-4/+11
enable Atomic*.{load,store} for ARMv6-M / MSP430 closes #45085 as proposed in https://github.com/rust-lang/rust/issues/45085#issuecomment-384825434 this commit adds an `atomic_cas` target option and extends the `#[cfg(target_has_atomic)]` attribute to enable a subset of the `Atomic*` API on architectures that don't support atomic CAS natively, like MSP430 and ARMv6-M. r? @alexcrichton
2018-07-06Rollup merge of #51619 - mksully22:ppc64le_rust, r=alexcrichtonkennytm-0/+36
rust: add initial changes to support powerpc64le musl Initial changes to support rustc building on ppc64le with musl. A PR was also submitted to libc component https://github.com/rust-lang/libc/pull/1023 to add changes to libc musl definitions. A PR was submitted on Alpine https://github.com/alpinelinux/aports/pull/4549 with equivalent temporary patches for building on Alpine for now. As a verification test a github project was put together to build ppc64le versions of rustc, rust-stdlib, and cargo on Alpine, https://github.com/mksully22/ppc64le_alpine_rust_1.26.2
2018-07-05#[cfg(target_has_atomic_cas)] -> #[cfg(target_has_atomic = "cas")]Jorge Aparicio-2/+1
2018-07-05enable Atomic*.{load,store} for ARMv6-M / MSP430Jorge Aparicio-3/+11
closes #45085 this commit adds an `atomic_cas` target option and an unstable `#[cfg(target_has_atomic_cas)]` attribute to enable a subset of the `Atomic*` API on architectures that don't support atomic CAS natively, like MSP430 and ARMv6-M.
2018-07-05Auto merge of #51936 - japaric:rust-lld, r=alexcrichtonbors-0/+3
rename rustc's lld to rust-lld to not shadow the system installed LLD when linking with LLD. Before: - `-C linker=lld -Z linker-flavor=ld.lld` uses rustc's LLD - It's not possible to use a system installed LLD that's named `lld` With this commit: - `-C linker=rust-lld -Z linker-flavor=ld.lld` uses rustc's LLD - `-C linker=lld -Z linker-flavor=ld.lld` uses the system installed LLD we don't offer guarantees about the availability of LLD in the rustc sysroot so we can rename the tool as long as we don't break the wasm32-unknown-unknown target which depends on it. r? @alexcrichton we discussed this before
2018-07-03rust: add initial changes to support powerpc64le muslMike Sullivan-0/+36
amend powerpc64le_unknown_linux_musl.rs to fix copyright date
2018-07-01Auto merge of #51833 - wesleywiser:faster_large_constant_arrays, r=oli-obkbors-0/+13
Speed up compilation of large constant arrays This is a different approach to #51672 as suggested by @oli-obk. Rather than write each repeated value one-by-one, we write the first one and then copy its value directly into the remaining memory. With this change, the [toy program](https://github.com/rust-lang/rust/blob/c2f4744d2db4e162df824d0bd0b093ba4b351545/src/test/run-pass/mir_heavy_promoted.rs) goes from 63 seconds to 19 seconds on my machine. Edit: Inlining `Size::bytes()` saves an additional 6 seconds dropping the total time to 13 seconds on my machine. Edit2: Now down to 2.8 seconds. r? @oli-obk cc @nnethercote @eddyb
2018-06-29rename rustc's lld to rust-lldJorge Aparicio-0/+3
to not shadow the system installed LLD when linking with LLD. Before: - `-C linker=lld -Z linker-flavor=ld.lld` uses rustc's LLD - It's not possible to use a system installed LLD that's named `lld` With this commit: - `-C linker=rust-lld -Z linker-flavor=ld.lld` uses rustc's LLD - `-C linker=lld -Z linker-flavor=ld.lld` uses the system installed LLD
2018-06-28Explicitely disable WASM code generation for EmscriptenJan-Erik Rediger-1/+3
Emscripten changed the default behavior recently: https://github.com/kripken/emscripten/blob/bd050e64bb0d9952df1344b8ea9356252328ad83/ChangeLog.markdown#v1381-05172018 It now defaults to WebAssembly and requires an explicit flag to generate asm.js. WASM=0 is also valid for older emcc and thus doesn't break it. Closes #51856
2018-06-27Inline all methods on `abi::Size`Wesley Wiser-0/+12
This save 3 seconds on the test program.
2018-06-27Inline `abi::Size::bytes()`Wesley Wiser-0/+1
This save an additional 6 seconds on the test program.
2018-06-26migrate codebase to `..=` inclusive range patternsZack M. Davis-13/+13
These were stabilized in March 2018's #47813, and are the Preferred Way to Do It going forward (q.v. #51043).
2018-06-24Haiku: make it explicit that Haiku uses position independentNiels Sascha Reedijk-0/+2
executables on x86_64 With the switch to gcc 7 the linker scripts don't always explicitly add the `-pie` flag anymore. This creates build failures on x86_64. Interestingly enough, adding this flag on i686 will lead to executables that fail to run when ASLR is enabled, so let's keep it x86_64 only.
2018-05-31musl: don't use the included startfiles with -crt-staticJohannes Nixdorf-9/+21
This fixes (only for -crt-static) #36710.
2018-05-24Replace `ScalarKind` with `Primitive`Oliver Schneider-26/+63
2018-05-24Add constant for `Size::from_bytes(0)`Oliver Schneider-10/+12
2018-05-24Auto merge of #50930 - toidiu:ak-ordOutlivesPredicate, r=nikomatsakisbors-2/+2
implement Ord for OutlivesPredicate and other types It became necessary while implementing https://github.com/rust-lang/rust/pull/50070 to have `Ord` implemented for `OutlivesPredicate`. This PR implements `Ord` for `OutlivesPredicate` as well as other types needed for the implementation.
2018-05-24Rollup merge of #50864 - jakllsch:add-netbsd-arm-target-specs, r=alexcrichtonkennytm-0/+71
Add NetBSD/arm target specs
2018-05-24implement Ord for OutlivesPredicate and other typestoidiu-2/+2
2018-05-21Allow `Size` to be any valid `u64`Oliver Schneider-20/+23
2018-05-20Auto merge of #50813 - paoloteti:cortex-r, r=alexcrichtonbors-0/+42
Add target for Big-endian ARM Cortex-R4F/R5F MCUs The ARM Real-Time (‘R’) profile provides high-performing processors for safety-critical environments. Cortex-R has ARM, Thumb instruction whereas Cortex-M makes use of Thumb only. CI/Dockerfile is intentionally in the `disabled` folder.
2018-05-19Use `Size` instead of `u64` in mir interpretationOliver Schneider-1/+1
2018-05-19Auto merge of #50709 - alexcrichton:revert-musl, r=sfacklerbors-35/+11
Revert #50105 until regression is fixed Discovered at https://github.com/rust-lang/rust/pull/50105#issuecomment-388630750 it looks like this caused a regression with i686 musl, so let's revert in the meantime while a fix is worked out
2018-05-18armebv7r-none-eabihf: default to ARM modePaolo Teti-1/+1
- remove +thumb2 that has not effect - remove -mthumb Tested on TMS570LS3137
2018-05-18Add armv6-unknown-netbsd-eabihf targetJonathan A. Kollasch-0/+35
2018-05-18Add armv7-unknown-netbsd-eabihf targetJonathan A. Kollasch-0/+36
2018-05-17Stabilise inclusive_range_methodsvarkor-1/+0
2018-05-17Revert "musl: don't use the included startfiles with -crt-static"Alex Crichton-21/+9
This reverts commit a5a875d17b34b61326d803eb2edea526d3bd6914.
2018-05-17Revert "musl: link crt{begin,end}.o from the system compiler"Alex Crichton-14/+2
This reverts commit 6d9154a830dd9773fe8a4e34e1fc3dfb1ca6f935.
2018-05-16Add target for Big-endian ARM Cortex-R4F/R5F MCUsPaolo Teti-0/+42
The ARM Real-Time (‘R’) profile provides high-performing processors for safety-critical environments.
2018-05-13Auto merge of #50704 - kennytm:rollup, r=kennytmbors-0/+33
Rollup of 8 pull requests Successful merges: - #50624 (fs::write: Add example writing a &str) - #50634 (Do not silently truncate offsets for `read_at`/`write_at` on emscripten) - #50644 (AppVeyor: Read back trace from crash dump on failure.) - #50661 (Ignore non .rs files for tidy libcoretest) - #50663 (rustc: Allow an edition's feature on that edition) - #50667 (rustc: Only suggest deleting `extern crate` if it works) - #50670 (rustc: Include semicolon when removing `extern crate`) - #50678 (Update openbsd targets) Failed merges:
2018-05-13Auto merge of #50622 - eddyb:make-room-for-ghosts, r=nikomatsakisbors-12/+1
rustc: leave space for fields of uninhabited types to allow partial initialization. Fixes #49298 by only collapsing uninhabited enum variants, and only if they only have ZST fields. Fixes #50442 incidentally (@nox's optimization didn't take into account uninhabited variants).
2018-05-12add aarch64-unknown-openbsd supportSébastien Marie-0/+32
2018-05-12openbsd-i686: use lld as linker by defaultSébastien Marie-0/+1
standard binutils on openbsd is too old to do proper job with i128 code.
2018-05-11Auto merge of #50105 - mixi:crt-included, r=alexcrichtonbors-11/+35
Use the correct crt*.o files when linking musl targets. This is supposed to support optionally using the system copy of musl libc instead of the included one if supported. This currently only affects the start files, which is enough to allow building rustc on musl targets. Most of the changes are analogous to crt-static. Excluding the start files is something musl based distributions usually patch into their copy of rustc: - https://github.com/alpinelinux/aports/blob/eb064c8/community/rust/musl-fix-linux_musl_base.patch - https://github.com/voidlinux/void-packages/blob/77400fc/srcpkgs/rust/patches/link-musl-dynamically.patch For third-party distributions that not yet carry those patches it would be nice if it was supported without the need to patch upstream sources. ## Reasons ### What breaks? Some start files were missed when originally writing the logic to swap in musl start files (gcc comes with its own start files, which are suppressed by -nostdlib, but not manually included later on). This caused #36710, which also affects rustc with the internal llvm copy or any other system libraries that need crtbegin/crtend. ### How is it fixed? The system linker already has all the logic to decide which start files to include, so we can just defer to it (except of course if it doesn't target musl). ### Why is it optional? In #40113 it was first tried to remove the start files, which broke compiling musl-targeting static binaries with a glibc-targeting compiler. This is why it eventually landed without removing the start files. Being an option side-steps the issue. ### Why are the start files still installed? This has the nice side-effect, that the produced rust-std-* binaries can still be used by on a glibc-targeting system with a rustc built against glibc. ## Does it work? With the following build script (using [musl-cross-make](https://github.com/richfelker/musl-cross-make)): https://shadowice.org/~mixi/rust-musl/build.sh, I was able to cross-compile a musl-host musl-targeting rustc on a glibc-based system. The resulting binaries are at https://shadowice.org/~mixi/rust-musl/binaries/. This also requires #50103 and #50104 (which are also applied to the branch the build script uses).
2018-05-10rustc: leave space for fields of uninhabited types to allow partial ↵Eduard-Mihai Burtescu-12/+1
initialization.