Skip to content

compiletest: //@ aux-crate seems to only actually work for dylibs #133007

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

Open
jieyouxu opened this issue Nov 13, 2024 · 3 comments
Open

compiletest: //@ aux-crate seems to only actually work for dylibs #133007

jieyouxu opened this issue Nov 13, 2024 · 3 comments
Labels
A-compiletest Area: The compiletest test runner C-bug Category: This is a bug. E-needs-investigation Call for partcipation: This issues needs some investigation to determine current status T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jieyouxu
Copy link
Member

... And it seems to never hit staticlibs or rlibs?

@jieyouxu jieyouxu added A-compiletest Area: The compiletest test runner C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Nov 13, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 13, 2024
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 13, 2024
@jieyouxu
Copy link
Member Author

FWIW //@ aux-build seems to work, so idk

@jieyouxu jieyouxu added the E-needs-investigation Call for partcipation: This issues needs some investigation to determine current status label Nov 13, 2024
@ehuss
Copy link
Contributor

ehuss commented Nov 13, 2024

You should be able to use aux-crate with rlibs. You'll need to use no-prefer-dynamic to force it to not use a dylib. Can you say why it doesn't seem to be working?

staticlibs should be doable, but would probably require extra rustflags to specify what and where to link.

@jieyouxu
Copy link
Member Author

jieyouxu commented Nov 13, 2024

I tried this on windows msvc, aux file already has //@ no-prefer-dynamic but had a rlib crate type, and it was looking for a .dll with the --extern flag but I see the aux build output directory has libname.rlib.

Haven't investigated deeply yet, just opening an issue to remind myself to double check.

Perhaps something about the extern path calculation is not adding up versus the crate type.

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 C-bug Category: This is a bug. E-needs-investigation Call for partcipation: This issues needs some investigation to determine current status T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
Development

No branches or pull requests

3 participants