about summary refs log tree commit diff
path: root/src/test/run-make
AgeCommit message (Collapse)AuthorLines
2019-02-27Introduce assembly testsDenys Zariaiev-173/+0
2019-02-13Rollup merge of #58272 - fitzgen:num-format-code-size, r=Mark-SimulacrumMazdak Farrokhzad-0/+43
Cut down on number formating code size r? @alexcrichton
2019-02-11use ignore directives for run-make testsAndy Russell-44/+21
This makes the tests easier to read, and makes it possible to tell which tests aren't being run on the host platform. Fixes #56704.
2019-02-08Don't shadow the provided `stringify!` macro in a wasm code size test caseNick Fitzgerald-23/+17
2019-02-08Use write_char for writing padding charactersNick Fitzgerald-1/+1
Removes some unsafe *and* saves almost half a kilobyte of code size.
2019-02-08Add a wasm code size test for stringifying numbersNick Fitzgerald-0/+49
2019-01-29Provide PTXLinker with fallback to internal `target-cpu`Denys Zariaiev-3/+6
2019-01-29Merge NVPTX and WASM test images into `test-various`Denys Zariaiev-10/+2
2019-01-28NVPTX: by-default use target cpu "sm_30"Denys Zariaiev-1/+1
2019-01-27Create `nvptx64-nvidia-cuda` target specificationDenys Zariaiev-0/+178
2018-12-25Remove licensesMark Rousskov-200/+0
2018-12-01Rollup merge of #56014 - euclio:issue-21335, r=nagisakennytm-0/+5
add test for issue #21335 Running this test with LLVM assertions enabled doesn't seem to trigger an assertion on my Mac. Fixes #21335.
2018-11-30tests: use a #![no_std] target crate in run-make/rustc-macro-dep-files.Eduard-Mihai Burtescu-4/+3
2018-11-30tests: support cross-compilation in run-make/rustc-macro-dep-files.Eduard-Mihai Burtescu-2/+4
2018-11-30tests: move all proc_macro tests from -fulldeps.Eduard-Mihai Burtescu-0/+47
2018-11-26add test for issue #21335Andy Russell-0/+5
Fixes #21335.
2018-11-25Try to make top-level Cargo.toml work without __CARGO_TEST_ROOT.Eduard-Mihai Burtescu-3/+9
2018-11-06Auto merge of #53996 - sekineh:thumb-run, r=japaricbors-0/+141
[CI] Run a `thumbv7m-none-eabi` binary using `qemu-system-arm` [IRR-2018-embedded] ## What's included? - Run a `thumbv7m-none-eabi` binary using `qemu-system-arm` - We are using `cortex-m-rt = "=0.5.4"` which does not use `proc_macro`. (reason: stage2 build of rustc does not work well with `proc_macro` in `run-make` phase.) - We are using GNU LD for now. ## Blocker All resolved. - ~[Waiting] `#[panic_handler]` is not available in stable.~ - [Merged] https://github.com/rust-lang/rust/pull/53619 - ~[Waiting] https://github.com/japaric/lm3s6965evb: does not compile on stable.~ - [OK] dependent crate ~`panic-abort`~ `panic-halt`: already moved to use `#[panic_handler]`. ## Update `#[panic_handler]` will be stabilized in Rust 1.30. CC @kennytm @jamesmunns @nerdyvaishali
2018-11-06Rollup merge of #55601 - petrochenkov:featissue, r=pnkfelixkennytm-3/+1
Fix tracking issue numbers for some unstable features And also remove deprecated unstable `#[panic_implementation]` attribute that was superseded by stable `#[panic_handler]` and doesn't have an open tracking issue.
2018-11-04[ci] run-make/thumb-none-qemu: add .cargo/configHideki Sekine-0/+31
2018-11-02Remove deprecated unstable `#[panic_implementation]`Vadim Petrochenkov-3/+1
It was superseded by `#[panic_handler]`
2018-11-01std: Improve codegen size of accessing TLSAlex Crichton-0/+11
Some code in the TLS implementation in libstd stores `Some(val)` into an `&mut Option<T>` (effectively) and then pulls out `&T`, but it currently uses `.unwrap()` which can codegen into a panic even though it can never panic. With sufficient optimizations enabled (like LTO) the compiler can see through this but this commit helps it along in normal mode (`--release` with Cargo by default) to avoid codegen'ing the panic path. This ends up improving the optimized codegen on wasm by ensuring that a call to panic pulling in more file size doesn't stick around.
2018-10-23Revert "rustc: Fix (again) simd vectors by-val in ABI"Alex Crichton-100/+0
This reverts commit 3cc8f738d4247a9b475d8e074b621e602ac2b7be.
2018-10-19rustc: Fix (again) simd vectors by-val in ABIAlex Crichton-0/+100
The issue of passing around SIMD types as values between functions has seen [quite a lot] of [discussion], and although we thought [we fixed it][quite a lot] it [wasn't]! This PR is a change to rustc to, again, try to fix this issue. The fundamental problem here remains the same, if a SIMD vector argument is passed by-value in LLVM's function type, then if the caller and callee disagree on target features a miscompile happens. We solve this by never passing SIMD vectors by-value, but LLVM will still thwart us with its argument promotion pass to promote by-ref SIMD arguments to by-val SIMD arguments. This commit is an attempt to thwart LLVM thwarting us. We, just before codegen, will take yet another look at the LLVM module and demote any by-value SIMD arguments we see. This is a very manual attempt by us to ensure the codegen for a module keeps working, and it unfortunately is likely producing suboptimal code, even in release mode. The saving grace for this, in theory, is that if SIMD types are passed by-value across a boundary in release mode it's pretty unlikely to be performance sensitive (as it's already doing a load/store, and otherwise perf-sensitive bits should be inlined). The implementation here is basically a big wad of C++. It was largely copied from LLVM's own argument promotion pass, only doing the reverse. In local testing this... Closes #50154 Closes #52636 Closes #54583 Closes #55059 [quite a lot]: https://github.com/rust-lang/rust/pull/47743 [discussion]: https://github.com/rust-lang/rust/issues/44367 [wasn't]: https://github.com/rust-lang/rust/issues/50154
2018-10-19[ci] fix tidy warning.Hideki Sekine-2/+4
2018-10-18[ci] run-make/thumb-none-qemu: use GNU LD.Hideki Sekine-2/+2
2018-10-16[ci] clean up potentially harmful envsHideki Sekine-8/+8
2018-10-16[ci] fix tidy warning.Hideki Sekine-1/+1
2018-10-16[ci] run both debug and releaseHideki Sekine-1/+2
2018-10-16[ci] run-make/thumb-none-qemu: add example crate.Hideki Sekine-8/+79
2018-10-10[ci] run-make/thumb-none-qemu: transfer logic to script.sh (2)Hideki Sekine-6/+0
2018-10-10[ci] run-make/thumb-none-qemu: transfer logic to script.shHideki Sekine-14/+23
2018-10-07Auto merge of #54451 - alexcrichton:no-mangle-extern-linkage, r=michaelwoeristerbors-0/+2
rustc: Allow `#[no_mangle]` anywhere in a crate This commit updates the compiler to allow the `#[no_mangle]` (and `#[export_name]` attributes) to be located anywhere within a crate. These attributes are unconditionally processed, causing the compiler to always generate an exported symbol with the appropriate name. After some discussion on #54135 it was found that not a great reason this hasn't been allowed already, and it seems to match the behavior that many expect! Previously the compiler would only export a `#[no_mangle]` symbol if it were *publicly reachable*, meaning that it itself is `pub` and it's otherwise publicly reachable from the root of the crate. This new definition is that `#[no_mangle]` *is always reachable*, no matter where it is in a crate or whether it has `pub` or not. This should make it much easier to declare an exported symbol with a known and unique name, even when it's an internal implementation detail of the crate itself. Note that these symbols will persist beyond LTO as well, always making their way to the linker. Along the way this commit removes the `private_no_mangle_functions` lint (also for statics) as there's no longer any need to lint these situations. Furthermore a good number of tests were updated now that symbol visibility has been changed. Closes #54135
2018-10-06rustc: Allow `#[no_mangle]` anywhere in a crateAlex Crichton-0/+2
This commit updates the compiler to allow the `#[no_mangle]` (and `#[export_name]` attributes) to be located anywhere within a crate. These attributes are unconditionally processed, causing the compiler to always generate an exported symbol with the appropriate name. After some discussion on #54135 it was found that not a great reason this hasn't been allowed already, and it seems to match the behavior that many expect! Previously the compiler would only export a `#[no_mangle]` symbol if it were *publicly reachable*, meaning that it itself is `pub` and it's otherwise publicly reachable from the root of the crate. This new definition is that `#[no_mangle]` *is always reachable*, no matter where it is in a crate or whether it has `pub` or not. This should make it much easier to declare an exported symbol with a known and unique name, even when it's an internal implementation detail of the crate itself. Note that these symbols will persist beyond LTO as well, always making their way to the linker. Along the way this commit removes the `private_no_mangle_functions` lint (also for statics) as there's no longer any need to lint these situations. Furthermore a good number of tests were updated now that symbol visibility has been changed. Closes #54135
2018-10-02wasm: Explicitly export all symbols with LLDAlex Crichton-0/+75
This commit fixes an oddity on the wasm target where LTO can produce working executables but plain old optimizations doesn't. The compiler already knows what set of symbols it would like to export, but LLD only discovers this list transitively through symbol visibilities. LLD may not, however, always find all the symbols that we'd like to export. For example if you depend on an rlib with a `#[no_mangle]` symbol, then if you don't actually use anything from the rlib then the symbol won't appear in the final artifact! It will appear, however, with LTO. This commit attempts to rectify this situation by ensuring that all symbols rustc would otherwise preserve through LTO are also preserved through the linking process with LLD by default.
2018-09-30[ci] run-make/thumb-none-qemu: add thumbv6m-none-qemuHideki Sekine-1/+1
2018-09-30[ci] run-make/thumb-none-qemu: uses cortex-m-rt crate.Hideki Sekine-14/+5
2018-09-30[ci] thumbv7m-none-eabi: add more variable.Hideki Sekine-2/+4
2018-09-30[ci] thumbv7m-none-eabi: build lm3s6965evb and runon QEMUHideki Sekine-0/+40
2018-08-26rustc: Continue to tweak "std internal symbols"Alex Crichton-0/+62
In investigating [an issue][1] with `panic_implementation` defined in an executable that's optimized I once again got to rethinking a bit about the `rustc_std_internal_symbol` attribute as well as weak lang items. We've sort of been non-stop tweaking these items ever since their inception, and this continues to the trend. The crux of the bug was that in the reachability we have a [different branch][2] for non-library builds which meant that weak lang items (and std internal symbols) weren't considered reachable, causing them to get eliminiated by ThinLTO passes. The fix was to basically tweak that branch to consider these symbols to ensure that they're propagated all the way to the linker. Along the way I've attempted to erode the distinction between std internal symbols and weak lang items by having weak lang items automatically configure fields of `CodegenFnAttrs`. That way most code no longer even considers weak lang items and they're simply considered normal functions with attributes about the ABI. In the end this fixes the final comment of #51342 [1]: https://github.com/rust-lang/rust/issues/51342#issuecomment-414368019 [2]: https://github.com/rust-lang/rust/blob/35bf1ae25799a4e62131159f052e0a3cbd27c960/src/librustc/middle/reachable.rs#L225-L238
2018-08-23add #[panic_handler]; deprecate #[panic_implementation]Jorge Aparicio-2/+2
2018-08-17Auto merge of #53190 - sekineh:thumb-cortex-m, r=jamesmunnsbors-0/+71
Add crate build test for `thumb*` targets. [IRR-2018-embedded] ## Summary This PR adds `run-make` test that compiles `cortex-m` crate for all supported `thumb*-none-*` targets using `cargo` and stage2 `rustc`. - Supported `thumb*-none-*` targets: - thumbv6m-none-eabi (Bare Cortex-M0, M0+, M1) - thumbv7em-none-eabi (Bare Cortex-M4, M7) - thumbv7em-none-eabihf (Bare Cortex-M4F, M7F, FPU, hardfloat) - thumbv7m-none-eabi (Bare Cortex-M3) ## How to run & Example output I tested locally and all targets succeeded like below: ``` ./x.py clean ./x.py test --target thumbv6m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf,thumbv7m-none-eabi src/test/run-make ``` ``` Check compiletest suite=run-make mode=run-make (x86_64-unknown-linux-gnu -> thumbv6m-none-eabi) running 5 tests ..... test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ``` ## How to re-run Remove `stamp` file for the test run. ``` rm build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-cortex-m/stamp ``` Then run `test` ``` ./x.py test --target thumbv6m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf,thumbv7m-none-eabi src/test/run-make (snip) running 5 tests iiii. test result: ok. 1 passed; 0 failed; 4 ignored; 0 measured; 0 filtered out ``` ## Artifacts You can examine the artifacts under the directory below: ``` sekineh@sekineh-VirtualBox:~/rustme10$ ls -l build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-cortex-m/thumb-none-cortex-m/ total 4 drwxrwxr-x 7 sekineh sekineh 4096 8月 14 22:40 cortex-m ``` where `build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-cortex-m/thumb-none-cortex-m/` is came from TMPDIR variable. ## Other notes For `test.rs` modification, I used the same logic as: - https://github.com/rust-lang/rust/blame/d8b3c830fbcdd14d085209a8dcc3399151f3286a/src/bootstrap/dist.rs#L652-L657 ``` if builder.no_std(target) == Some(true) { // the `test` doesn't compile for no-std targets builder.ensure(compile::Std { compiler, target }); } else { builder.ensure(compile::Test { compiler, target }); } ``` It is a useful snippet when adding `no_std` support to `src/bootstrap` code. CC @kennytm @jamesmunns @nerdyvaishali
2018-08-14add copyright from templateHideki Sekine-0/+10
2018-08-14shorten the url to fix tidy error.Hideki Sekine-1/+1
2018-08-14change variable definition order (basic thing first).Hideki Sekine-3/+4
2018-08-14use TMPDIR instead of custom directory.Hideki Sekine-1/+1
2018-08-14use a simple script instead of `cargo clone`.Hideki Sekine-2/+27
2018-08-10[CI] run-make/thumb: remove `-j 1` from cargo runHideki Sekine-1/+1
2018-08-08[CI] run-make/thumb: support 4 thumb*-none-eabi* targets:Hideki Sekine-2/+10
- thumbv6m-none-eabi (Bare Cortex-M0, M0+, M1) - thumbv7em-none-eabi (Bare Cortex-M4, M7) - thumbv7em-none-eabihf (Bare Cortex-M4F, M7F, FPU, hardfloat) - thumbv7m-none-eabi (Bare Cortex-M3)
2018-08-08[CI] run-make/thumb: tidy up variablesHideki Sekine-8/+10