Uh oh!
There was an error while loading. Please reload this page.
allow compiletest to pass down --extern flags - #54020
Conversation
rust-highfive
commented
Sep 7, 2018
(rust_highfive has picked a reviewer for you, use r? to override) |
qmx
commented
Sep 7, 2018
nikomatsakis
left a comment
There was a problem hiding this comment.
Looks great! A few nits.
There was a problem hiding this comment.
woah tests. Totally not idiomatic for compiletest. 😛
There was a problem hiding this comment.
Can we port the extern prelude test to use this?
What about your existing tests for suggestions?
after some fiddling I've learned more about some implied things for @nikomatsakis is there a standard call for doing naming normalization (like the ones that make the output for a |
rust-highfive
commented
Sep 8, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
rust-highfive
commented
Sep 8, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
There was a problem hiding this comment.
@alexcrichton is there a place on the compiler where I can get the official codepath that does this in a cross-platform way?
There was a problem hiding this comment.
I think this can probably use std::env::consts::DLL_EXTENSION perhaps? We typically don't need to factor in cross compilation here
nikomatsakis
commented
Oct 4, 2018
I am very sad this hasn't landed yet. It would be very useful. |
TimNN
commented
Oct 9, 2018
Ping from triage @qmx, what is the status of this PR? |
qmx
commented
Oct 16, 2018
closing this for now, will revisit it later |
rust-highfive
commented
Oct 19, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
this still doesn't have the definitive answer, but at least is a working start .
rust-highfive
commented
Oct 21, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
nikomatsakis
commented
Oct 23, 2018
@TimNN ps this rust-highfive output seems to be excluding anything actionable |
TimNN
commented
Oct 30, 2018
Ping from triage @qmx: It looks like this PR is failing on travis.
Thanks for the notice, sadly I don't have the time to work on the bot right now. |
TimNN
commented
Nov 6, 2018
Ping from triage @qmx: What is the status of this PR? |
qmx
commented
Nov 7, 2018
will reopen when I get around putting more time on it, sorry for the noise! |
Add options to --extern flag. This changes the `--extern` flag so that it can take a series of options that changes its behavior. The general syntax is `[opts ':'] name ['=' path]` where `opts` is a comma separated list of options. Two options are supported, `priv` which replaces `--extern-private` and `noprelude` which avoids adding the crate to the extern prelude. ```text --extern priv:mylib=/path/to/libmylib.rlib --extern noprelude:alloc=/path/to/liballoc.rlib ``` `noprelude` is to be used by Cargo's build-std feature in order to use `--extern` to reference standard library crates. This also includes a second commit which adds the `aux-crate` directive to compiletest. I can split this off into a separate PR if desired, but it helps with defining these kinds of tests. It is based on #54020, and can be used in the future to replace and simplify some of the Makefile tests.
Add options to --extern flag. This changes the `--extern` flag so that it can take a series of options that changes its behavior. The general syntax is `[opts ':'] name ['=' path]` where `opts` is a comma separated list of options. Two options are supported, `priv` which replaces `--extern-private` and `noprelude` which avoids adding the crate to the extern prelude. ```text --extern priv:mylib=/path/to/libmylib.rlib --extern noprelude:alloc=/path/to/liballoc.rlib ``` `noprelude` is to be used by Cargo's build-std feature in order to use `--extern` to reference standard library crates. This also includes a second commit which adds the `aux-crate` directive to compiletest. I can split this off into a separate PR if desired, but it helps with defining these kinds of tests. It is based on rust-lang#54020, and can be used in the future to replace and simplify some of the Makefile tests.
When cargo exposes a crate to rustc, it uses
--extern, with the potential for crate name aliasing. This PR adds this support to compiletest via aaux-crate:foo=baz.rsheader, where it exposes the cratebazunder afooalias.This is specially useful for testing the new Rust 2018 edition module behaviors, since crates listed via
--externappear in the prelude.Additionally, this also adds some tests to the existing compiletest parsing code.
Fixes#53737