summary refs log tree commit diff
path: root/src/test/run-make
AgeCommit message (Collapse)AuthorLines
2017-04-21Update #[no_core] users with the "freeze" lang item.Eduard-Mihai Burtescu-2/+10
2017-04-19rustc_trans: do not treat byval as using up registers.Eduard-Mihai Burtescu-0/+23
2017-04-11Fix pairs of doubles using an illegal <8 x i8> vector.Eduard-Mihai Burtescu-0/+30
2017-04-07-Z linker-flavorJorge Aparicio-0/+3
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
2017-04-07Auto merge of #39987 - japaric:used, r=arielb1bors-0/+28
#[used] attribute (For an explanation of what this feature does, read the commit message) I'd like to propose landing this as an experimental feature (experimental as in: no clear stabilization path -- like `asm!`, `#[linkage]`) as it's low maintenance (I think) and relevant to the "Usage in resource-constrained environments" exploration area. The main use case I see is running code before `main`. This could be used, for instance, to cheaply initialize an allocator before `main` where the alternative is to use `lazy_static` to initialize the allocator on its first use which it's more expensive (atomics) and doesn't work on ARM Cortex-M0 microcontrollers (no `AtomicUsize` on that platform) Here's a `std` example of that: ``` rust unsafe extern "C" fn before_main_1() { println!("Hello"); } unsafe extern "C" fn before_main_2() { println!("World"); } #[link_section = ".init_arary"] #[used] static INIT_ARRAY: [unsafe extern "C" fn(); 2] = [before_main_1, before_main_2]; fn main() { println!("Goodbye"); } ``` ``` $ rustc -C lto -C opt-level=3 before_main.rs $ ./before_main Hello World Goodbye ``` In general, this pattern could be used to let *dependencies* run code before `main` (which sounds like it could go very wrong in some cases). There are probably other use cases; I hope that the people I have cc-ed can comment on those. Note that I'm personally unsure if the above pattern is something we want to promote / allow and that's why I'm proposing this feature as experimental. If this leads to more footguns than benefits then we can just axe the feature. cc @nikomatsakis ^ I know you have some thoughts on having a process for experimental features though I'm fine with writing an RFC before landing this. - `dead_code` lint will have to be updated to special case `#[used]` symbols. - Should we extend `#[used]` to work on non-generic functions? cc rust-lang/rfcs#1002 cc rust-lang/rfcs#1459 cc @dpc @JinShil
2017-04-06don't pass -C to nmJorge Aparicio-1/+1
the nm in our macOS bots don't support that flag and it's not really required
2017-04-05don't test for the absence of BAR in the rmake testJorge Aparicio-1/+0
it's not related to this feature
2017-04-05Auto merge of #40348 - nrc:save-extern-fn, r=eddybbors-0/+5
Handle extern functions and statics in save-analysis r? @eddyb
2017-04-05fix location of the emitted object fileJorge Aparicio-2/+2
2017-04-05add tracking issue and feature-gate and run-make testsJorge Aparicio-0/+29
2017-04-05Rollup merge of #41085 - nagisa:fix-output-properg, r=alexcrichtonCorey Farwell-0/+18
Properly adjust filenames when multiple emissions Fixes #40993 Should backport just fine to beta but not sure if we want to do this since this is quite old stable regression.
2017-04-05Rollup merge of #40870 - alexcrichton:stabilize-windows-subsystem, r=aturonCorey Farwell-2/+0
rustc: Stabilize the `#![windows_subsystem]` attribute This commit stabilizes the `#![windows_subsystem]` attribute which is a conservative exposure of the `/SUBSYSTEM` linker flag on Widnows platforms. This is useful for creating applications as well as console programs. Closes #37499
2017-04-05Properly adjust filenames when multiple emissionsSimonas Kazlauskas-0/+18
Fixes #40993
2017-04-04save-analysis: index extern blocksNick Cameron-0/+5
2017-04-03Auto merge of #40915 - nrc:save-assoc, r=eddybbors-0/+17
save-analysis: track associated types r? @eddyb
2017-04-01rustc: Stabilize the `#![windows_subsystem]` attributeAlex Crichton-2/+0
This commit stabilizes the `#![windows_subsystem]` attribute which is a conservative exposure of the `/SUBSYSTEM` linker flag on Widnows platforms. This is useful for creating applications as well as console programs. Closes #37499
2017-03-30kill the graphviz-flowgraph testsNiko Matsakis-1963/+0
They are so annoying to update, and haven't caught any bugs afaik.
2017-03-30save-analysis: track associated typesNick Cameron-0/+17
2017-03-21Regression test for rust-lang/rust#40535Austin Bonander-0/+49
2017-03-12Auto merge of #40446 - arielb1:rollup, r=alexcrichtonbors-1/+23
Rollup of 12 pull requests - Successful merges: #40146, #40299, #40315, #40319, #40344, #40345, #40372, #40373, #40400, #40404, #40419, #40431 - Failed merges:
2017-03-11Auto merge of #40220 - jseyfried:ast_macro_def, r=nrcbors-0/+1
syntax: add `ast::ItemKind::MacroDef`, simplify hygiene info This PR - adds a new variant `MacroDef` to `ast::ItemKind` for `macro_rules!` and eventually `macro` items, - [breaking-change] forbids macro defs without a name (`macro_rules! { () => {} }` compiles today), - removes `ast::MacroDef`, and - no longer uses `Mark` and `Invocation` to identify and characterize macro definitions. - We used to apply (at least) two `Mark`s to an expanded identifier's `SyntaxContext` -- the definition mark(s) and the expansion mark(s). We now only apply the latter. r? @nrc
2017-03-11Rollup merge of #40373 - TimNN:test-ub-packed, r=arielb1Ariel Ben-Yehuda-1/+23
Fix UB in repr(packed) tests r? @arielb1 cc #37609 and #27060
2017-03-10rustc: Exit quickly on only `--emit dep-info`Alex Crichton-0/+19
This commit alters the compiler to exit quickly if the only output being emitted is `dep-info`, which doesn't need a lot of other information to generate. Closes #40328
2017-03-10Refactor out `ast::ItemKind::MacroDef`.Jeffrey Seyfried-0/+1
2017-03-08fix UB in repr(packed) testsTim Neumann-1/+23
2017-03-04run-make on MSVC: Do not generate object files in the source directoryVadim Petrochenkov-1/+1
2017-03-02Rollup merge of #40173 - er-1:master, r=alexcrichtonGuillaume Gomez-2/+2
Add a reference to the dl library to the Makefile of the test issue-2… …4445. It prevents the test to fail on ppc64el at least. Part of #39015
2017-03-01Auto merge of #39803 - brson:fpic, r=alexcrichtonbors-0/+24
Add a test that -fPIC is applied r? @alexcrichton Can it really be this simple? I've tested it works, but still testing that it used to fail.
2017-03-01Don't run test on darwinAlex Crichton-2/+6
2017-03-01Add a reference to the dl library to the Makefile of the test issue-24445.er-1-2/+2
It prevents the test to fail on ppc64el at least. Part of #39015
2017-02-25Rollup merge of #39864 - cramertj:normalize-breaks, r=nikomatsakisEduard-Mihai Burtescu-32/+32
Normalize labeled and unlabeled breaks Part of #39849.
2017-02-21test: Verify all sysroot crates are unstableAlex Crichton-0/+34
As we continue to add more crates to the compiler and use them to implement various features we want to be sure we're not accidentally expanding the API surface area of the compiler! To that end this commit adds a new `run-make` test which will attempt to `extern crate foo` all crates in the sysroot, verifying that they're all unstable. This commit discovered that the `std_shim` and `test_shim` crates were accidentally stable and fixes the situation by deleting those shims. The shims are no longer necessary due to changes in Cargo that have happened since they were originally incepted.
2017-02-18Add tests for control flow in while conditionTaylor Cramer-32/+32
2017-02-15Add a test that -fPIC is appliedBrian Anderson-0/+20
2017-02-14Rollup merge of #39785 - alexcrichton:no-thread-sanitizer, r=japaricCorey Farwell-31/+0
test: Remove sanitizer-thread test Unfortunately it appears to spuriously fail so we can't gate on it
2017-02-13test: Remove sanitizer-thread testAlex Crichton-31/+0
Unfortunately it appears to spuriously fail so we can't gate on it
2017-02-11Add tested item in the rustdoc --test outputGuillaume Gomez-1/+1
2017-02-08sanitizer-dylib: only run where std for x86_64-linux is availableJorge Aparicio-1/+5
2017-02-08fix the sanitizer-dylib test on non x86_64 linux hostsJorge Aparicio-1/+1
2017-02-08build/test the sanitizers only when --enable-sanitizers is usedJorge Aparicio-49/+4
2017-02-08sanitizer supportJorge Aparicio-0/+187
2017-02-06Revert "Add 128-bit atomics"Alex Crichton-9/+1
This reverts commit 9903975003276cc42a1ed5f21eee292b7c62c331.
2017-02-05Rollup merge of #38959 - Amanieu:atomic128, r=alexcrichtonCorey Farwell-1/+9
Add 128-bit atomics This is currently only supported on AArch64 since that is the only target which unconditionally supports 128-bit atomic operations. cc #35118
2017-02-04Auto merge of #38426 - vadimcn:nobundle, r=alexcrichtonbors-0/+95
Implement kind="static-nobundle" (RFC 1717) This implements the "static-nobundle" library kind (last item from #37403). Rustc handles "static-nobundle" libs very similarly to dylibs, except that on Windows, uses of their symbols do not get marked with "dllimport". Which is the whole point of this feature.
2017-02-03Don't link "nobundle" libs which had already been included in upstream crate.Vadim Chugunov-17/+49
2017-02-03Update run-make/issue-22131 to new rustdoc --test formatGuillaume Gomez-1/+1
2017-01-19Feature gateVadim Chugunov-0/+1
2017-01-19Implement the "static-nobundle" library kind (RFC 1717).Vadim Chugunov-0/+62
These are static libraries that are not bundled (as the name implies) into rlibs and staticlibs that rustc generates, and must be present when the final binary artifact is being linked.
2017-01-10Add 128-bit atomicsAmanieu d'Antras-1/+9
2017-01-09trans: Treat generics like regular functions, not like #[inline] functions ↵Michael Woerister-18/+43
during CGU partitioning.