about summary refs log tree commit diff
path: root/src/librustc_target/spec
AgeCommit message (Collapse)AuthorLines
2020-04-03Make panic unwind the default for aarch64-*-windows-msvc targetsDaniel Frampton-8/+2
2020-04-01Rollup merge of #70605 - Amanieu:pthread_msvcrt, r=varkorDylan DPC-0/+2
Add missing -lmsvcrt on mingw after -lpthread Fixes #70316
2020-03-31more clippy fixesMatthias Krüger-2/+2
use is_empty() instead of len comparison (clippy::len_zero) use if let instead of while let loop that never loops (clippy::never_loop) remove redundant returns (clippy::needless_return) remove redundant closures (clippy::redundant_closure) use if let instead of match and wildcard pattern (clippy::single_match) don't repeat field names redundantly (clippy::redundant_field_names)
2020-03-31Add missing -lmsvcrt on mingw after -lpthreadAmanieu d'Antras-0/+2
Fixes #70316
2020-03-27Remove `no_integrated_as` mode.Nicholas Nethercote-9/+0
Specifically, remove both `-Z no_integrated_as` and `TargetOptions::no_integrated_as`. The latter was only used for the `msp430_none_elf` platform, for which it's no longer required.
2020-03-25Remove `TargetOptions::embed_bitcode`.Nicholas Nethercote-6/+0
It's unused by any existing targets, and soon we'll be embedding full bitcode by default anyway.
2020-03-23Split long derive lists into two derive attributes.Ana-Maria Mihalache-13/+2
2020-03-21remove unused unit values (clippy::unused_unit)Matthias Krüger-20/+6
2020-03-21don't convert results to options just for matching (clippy::if_let_some_result)Matthias Krüger-2/+2
2020-03-13Auto merge of #67502 - Mark-Simulacrum:opt-catch, r=Mark-Simulacrumbors-11/+41
Optimize catch_unwind to match C++ try/catch This refactors the implementation of catching unwinds to allow LLVM to inline the "try" closure directly into the happy path, avoiding indirection. This means that the catch_unwind implementation is (after this PR) zero-cost unless a panic is thrown. https://rust.godbolt.org/z/cZcUSB is an example of the current codegen in a simple case. Notably, the codegen is *exactly the same* if `-Cpanic=abort` is passed, which is clearly not great. This PR, on the other hand, generates the following assembly: ```asm # -Cpanic=unwind: push rbx mov ebx,0x2a call QWORD PTR [rip+0x1c53c] # <happy> mov eax,ebx pop rbx ret mov rdi,rax call QWORD PTR [rip+0x1c537] # cleanup function call call QWORD PTR [rip+0x1c539] # <unfortunate> mov ebx,0xd mov eax,ebx pop rbx ret # -Cpanic=abort: push rax call QWORD PTR [rip+0x20a1] # <happy> mov eax,0x2a pop rcx ret ``` Fixes #64224, and resolves #64222.
2020-03-12Auto merge of #68191 - simlay:add-tvSO-target, r=nagisabors-21/+90
Added tvOS as targets This is a first attempt of adding support tvOS as described in #48862. It's got a lot of overlap with [src/librustc_target/spec/apple_ios_base.rs](https://github.com/rust-lang/rust/blob/31dd4f4acbcbdb02b0745d2136399ed664a28050/src/librustc_target/spec/apple_ios_base.rs). I thought about refactoring `apple_ios_base.rs` to include this as well but that would require each of the ios and tvos targets to be of the something like the form `let base = opts(AppleOS::TV, Arch::Arm64)?;` I also did the same thing for watchOS because from what I can tell, all three targets (iOS, tvOS, and watchOS) have the same logic but have different parameters being sent to `xcrun`. Thoughts? As far as the `data_layout` and other parameters to `Target`, I did as much research as I could but it really seems that processor in the [iPhone 11 is the same as the apple TV](https://en.wikipedia.org/wiki/Apple-designed_processors) so I didn't change any of those parameters. I did get this to build and tested that it's actually running the the below logic (because the parameter to `xcrun` is `appletvos` not `tvos`). I didn't manage to get it to actually compile a file with `fn main(){}` because I don't have the stdlib for `aarch64-apple-tvos` compiled it seems. Is there documentation for this? Similar to the ending of https://github.com/rust-lang/rust/pull/63467, I'm not sure what to do next.
2020-03-06fix various typosMatthias Krüger-4/+4
2020-03-05Link to libgcc dynamically on windows-gnu when using dylib cratesAmanieu d'Antras-2/+41
2020-03-05Remove eh_unwind_resume lang itemAmanieu d'Antras-9/+0
2020-02-28Improve MinGW detection when cross compilingMateusz Mikuła-0/+2
2020-02-20fmtSebastian Imlay-19/+17
2020-02-18Fix typoJonas Schievink-1/+1
2020-02-17Don't eliminate frame pointers on thumb targetsJonas Schievink-0/+3
2020-02-14Merged apple_tvos_base and apple_ios_base into apple_sdk_base.Sebastian Imlay-150/+51
2020-02-14Merge branch 'master' of github.com:rust-lang/rust into add-tvSO-targetSebastian Imlay-48/+207
2020-02-12Properly use the darwin archive format on Apple targetsAnthony Ramine-1/+1
See https://github.com/servo/servo/issues/25550.
2020-01-28Set lld flavor for MSVC to link.exeJohn Kåre Alsaker-2/+5
2020-01-22Rollup merge of #68361 - t6:patch-freebsd-lld-i386, r=alexcrichtonTyler Mandry-1/+3
Unbreak linking with lld 9 on FreeBSD 13.0-CURRENT i386 Add -Wl,-znotext to default linker flags to link with lld 9 on FreeBSD 13.0-CURRENT i386 where rust-nightly has been failing to link since 2019-12-10 with variations of ``` = note: ld: error: relocation R_386_PC32 cannot be used against symbol __rust_probestack; recompile with -fPIC >>> defined in /wrkdirs/usr/ports/lang/rust-nightly/work/rustc-nightly-src/build/i686-unknown-freebsd/stage1/lib/rustlib/i686-unknown-freebsd/lib/libcompiler_builtins-6570a75fe85f0e1a.rlib(compiler_builtins-6570a75fe85f0e1a.compiler_builtins.2i519eqi-cgu.15.rcgu.o) >>> referenced by std.4xivr03c-cgu.14 >>> std-9bd70afd58e204b7.std.4xivr03c-cgu.14.rcgu.o:(_$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::h1c78ed6e734a2bfc (.llvm.10122419023709863394)) in archive /wrkdirs/usr/ports/lang/rust-nightly/work/rustc-nightly-src/build/i686-unknown-freebsd/stage1/lib/rustlib/i686-unknown-freebsd/lib/libstd-9bd70afd58e204b7.rlib ld: error: relocation R_386_PC32 cannot be used against symbol __rust_probestack; recompile with -fPIC >>> defined in /wrkdirs/usr/ports/lang/rust-nightly/work/rustc-nightly-src/build/i686-unknown-freebsd/stage1/lib/rustlib/i686-unknown-freebsd/lib/libcompiler_builtins-6570a75fe85f0e1a.rlib(compiler_builtins-6570a75fe85f0e1a.compiler_builtins.2i519eqi-cgu.15.rcgu.o) >>> referenced by std.4xivr03c-cgu.14 >>> std-9bd70afd58e204b7.std.4xivr03c-cgu.14.rcgu.o:(std::io::util::copy::h9115f048f2203467) in archive /wrkdirs/usr/ports/lang/rust-nightly/work/rustc-nightly-src/build/i686-unknown-freebsd/stage1/lib/rustlib/i686-unknown-freebsd/lib/libstd-9bd70afd58e204b7.rlib clang-cpp: error: linker command failed with exit code 1 (use -v to see invocation) error: aborting due to previous error error: could not compile `rustc_macros`. ``` Full log: http://beefy17.nyi.freebsd.org/data/head-i386-default/p523508_s356869/logs/rust-nightly-1.42.0.20200118.log AFAICT it stopped building after bumping compiler_builtins to 0.1.22 in https://github.com/rust-lang/rust/pull/67110.
2020-01-19Add -Wl,-znotext to default linker flags to link with lld 9 on FreeBSD ↵Tobias Kortkamp-1/+3
13.0-CURRENT i386 rust-nightly has been failing to link since 2019-12-10 with variations of ``` = note: ld: error: relocation R_386_PC32 cannot be used against symbol __rust_probestack; recompile with -fPIC >>> defined in /wrkdirs/usr/ports/lang/rust-nightly/work/rustc-nightly-src/build/i686-unknown-freebsd/stage1/lib/rustlib/i686-unknown-freebsd/lib/libcompiler_builtins-6570a75fe85f0e1a.rlib(compiler_builtins-6570a75fe85f0e1a.compiler_builtins.2i519eqi-cgu.15.rcgu.o) >>> referenced by std.4xivr03c-cgu.14 >>> std-9bd70afd58e204b7.std.4xivr03c-cgu.14.rcgu.o:(_$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::h1c78ed6e734a2bfc (.llvm.10122419023709863394)) in archive /wrkdirs/usr/ports/lang/rust-nightly/work/rustc-nightly-src/build/i686-unknown-freebsd/stage1/lib/rustlib/i686-unknown-freebsd/lib/libstd-9bd70afd58e204b7.rlib ld: error: relocation R_386_PC32 cannot be used against symbol __rust_probestack; recompile with -fPIC >>> defined in /wrkdirs/usr/ports/lang/rust-nightly/work/rustc-nightly-src/build/i686-unknown-freebsd/stage1/lib/rustlib/i686-unknown-freebsd/lib/libcompiler_builtins-6570a75fe85f0e1a.rlib(compiler_builtins-6570a75fe85f0e1a.compiler_builtins.2i519eqi-cgu.15.rcgu.o) >>> referenced by std.4xivr03c-cgu.14 >>> std-9bd70afd58e204b7.std.4xivr03c-cgu.14.rcgu.o:(std::io::util::copy::h9115f048f2203467) in archive /wrkdirs/usr/ports/lang/rust-nightly/work/rustc-nightly-src/build/i686-unknown-freebsd/stage1/lib/rustlib/i686-unknown-freebsd/lib/libstd-9bd70afd58e204b7.rlib clang-cpp: error: linker command failed with exit code 1 (use -v to see invocation) error: aborting due to previous error error: could not compile `rustc_macros`. ``` Full log: http://beefy17.nyi.freebsd.org/data/head-i386-default/p523508_s356869/logs/rust-nightly-1.42.0.20200118.log AFAICT it stopped building after bumping compiler_builtins to 0.1.22 in https://github.com/rust-lang/rust/pull/67110.
2020-01-15add bare metal ARM Cortex-A targets to rustcJorge Aparicio-0/+87
-> `rustc --target armv7-none-eabi` will work also build rust-std (rustup) components for them -> `rustup target add armv7-none-eabi` will work
2020-01-13Auto merge of #67900 - nikic:prepare-llvm-10, r=nagisabors-44/+105
Prepare for LLVM 10 upgrade Split off from #67759, this just adds the necessary compatibility bits and updates codegen tests, without performing the actual LLVM upgrade. r? @alexcrichton
2020-01-10Added tvOS as a backendSebastian Imlay-0/+170
2020-01-10Allow specifying LLVM args in target specificationsJethro Beekman-0/+6
2020-01-07Update data layouts to include new X86 address spacesNikita Popov-44/+105
2020-01-05Add backticks to various diagnosticsvarkor-1/+1
2019-12-25tidy: change msdn links to newer locationsLzu Tao-1/+1
see accouncement at https://docs.microsoft.com/welcome-to-docs
2019-12-22Format the worldMark Rousskov-605/+568
2019-12-15Rollup merge of #67255 - tuxillo:remove-i686-unknown-dragonfly, r=alexcrichtonMazdak Farrokhzad-24/+0
Remove i686-unknown-dragonfly target DragonFly BSD removed support for i386 a while ago. It only supports x86_64 right now.
2019-12-14Auto merge of #67084 - Pagten:feature/print-msg-from-elf-entrypoint, r=Amanieubors-1/+1
SGX: Change ELF entrypoint This fixes [rust-sgx issue #148](https://github.com/fortanix/rust-sgx/issues/148). A new entry point is created for the ELF file generated by `rustc`, separate from the enclave entry point. When the ELF file is executed as a Linux binary, the error message below is written to stderr. > Error: This file is an SGX enclave which cannot be executed as a standard Linux binary. > See the installation guide at https://edp.fortanix.com/docs/installation/guide/ on how to use 'cargo run' or follow the steps at https://edp.fortanix.com/docs/tasks/deployment/ for manual deployment. When the ELF file is converted to an SGXS using `elf2sgxs`, the old entry point is still set as the enclave entry point. In a future pull request in the rust-sgx repository, `elf2sgxs` will be modified to remove the code in the ELF entry point, since this code is not needed in the enclave.
2019-12-12Remove i686-unknown-dragonfly targetAntonio Huete Jimenez-24/+0
2019-12-05Processed review commentsPieter Agten-1/+0
2019-12-05Auto merge of #66520 - alexcrichton:disable-gdb-wasm, r=eddybbors-0/+3
Disable gdb pretty printer global section on wasm targets The wasm targets don't support gdb anyway so there's no need for this section there.
2019-12-04Disable gdb pretty printer global section on wasm targetsAlex Crichton-0/+3
The wasm targets don't support gdb anyway so there's no need for this section there.
2019-12-04Create a separate entry point for the ELF file, instead of using the SGX ↵Pieter Agten-1/+2
entry point
2019-12-03Change linker for x86_64-fortanix-unknown-sgx to rust-lldParth Sane-27/+31
For SGX, the relocation using the relocation table is done by the code in rust/src/libstd/sys/sgx/abi/reloc.rs and this code should not require relocation. Setting RelaxELFRelocations flag if allows this to happen, hence adding a Target Option for it.
2019-11-27Rollup merge of #66798 - bwignall:typo, r=varkorTyler Mandry-1/+1
Fix spelling typos Should be non-semantic. Uses https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines to find likely typos.
2019-11-26Fix spelling typosBrian Wignall-1/+1
2019-11-26Rollup merge of #66713 - hermitcore:hermit, r=alexcrichtonTyler Mandry-0/+54
introduce a target to build the kernel of the unikernel HermitCore We are developing the unikernel HermitCore, where the kernel is written in Rust and is already supported by the Rust Standard Library. To compile the kernel with the new build flag "-Z build-std", we introduce a new target, which avoids the usage of SSE & AVX within the kernel.
2019-11-26Rollup merge of #66711 - mattico:aarch-msvc-fp, r=nagisaTyler Mandry-0/+1
Add hardware floating point features to aarch64-pc-windows-msvc Fixes #66701
2019-11-24disable redzoneStefan Lankes-0/+1
2019-11-24use nicer code style to pass tidy checkStefan Lankes-1/+3
2019-11-24introduce a target to build the kernel HermitCoreStefan Lankes-0/+51
- the target avoids the usage of SSE & AVX within the kernel
2019-11-24Add hardware floating point features to aarch64-pc-windows-msvcMatt Ickstadt-0/+1
2019-11-23Add riscv64gc-unknown-linux-gnu targetmsizanoen1-0/+26
2019-11-22Auto merge of #66460 - cjgillot:hashstable_generic, r=Zoxcbors-2/+7
Add a proc-macro to derive HashStable in librustc dependencies A second proc-macro is added to derive HashStable for crates librustc depends on. This proc-macro HashStable_Generic (to bikeshed) allows to decouple code and some librustc's boilerplate. Not everything is migrated, because `Span` and `TokenKind` require to be placed inside librustc. Types using them stay there too. Split out of #66279 r? @Zoxc