Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiletest does not pass --extern flags #53737

Open
nikomatsakis opened this issue Aug 27, 2018 · 3 comments
Open

compiletest does not pass --extern flags #53737

nikomatsakis opened this issue Aug 27, 2018 · 3 comments
Labels
A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc C-enhancement Category: An issue proposing an enhancement or a PR with one. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@nikomatsakis
Copy link
Contributor

In #51456, @qmx and I noticed that compiletest, when using aux-build libraries, simply supplies the compiler with -L instead of using the --extern lib_name=path-to-rlib compiler argument form. This is a shame because the latter form is what cargo actually uses in practice!

We ought to add another comment form to use the latter. Something like:

// aux-build:lib_name=file.rs

or perhaps a different header name.

(We could also retrofit the existing aux-build to use --extern, but it seems useful to be able to test in both modes, actually, so I'd prefer to add something new.)

@nikomatsakis nikomatsakis added the A-testsuite Area: The testsuite used to check the correctness of rustc label Aug 27, 2018
@qmx qmx self-assigned this Aug 27, 2018
@eddyb
Copy link
Member

eddyb commented Aug 28, 2018

I have a branch where I implemented the --extern crate_name form without a path, (which was suggested for Rust 2018) and started using it with // compile-flags:--extern lib_name.

Which way is preferred here?

@qmx
Copy link
Member

qmx commented Aug 28, 2018

@eddyb care to link the branch?

@nikomatsakis
Copy link
Contributor Author

@eddyb my preference would be to be able to test All The Things, I guess? That is, I see value in both. I guess the motivation for --extern though is to make Rust 2018 niceties available to people that are not using cargo (and hence want -L)? (Which makes sense)

@Enselic Enselic added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Nov 18, 2023
@jieyouxu jieyouxu added the A-compiletest Area: The compiletest test runner label May 31, 2024
@jieyouxu jieyouxu added the E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc C-enhancement Category: An issue proposing an enhancement or a PR with one. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
Development

No branches or pull requests

5 participants