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

do not pass cdylib link args to test #15317

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

usamoi
Copy link

@usamoi usamoi commented Mar 16, 2025

fixes #12663

@rustbot
Copy link
Collaborator

rustbot commented Mar 16, 2025

r? @epage

rustbot has assigned @epage.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-build-execution Area: anything dealing with executing the compiler S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 16, 2025
@usamoi usamoi marked this pull request as draft March 16, 2025 14:35
@usamoi usamoi force-pushed the fix-issue-12666 branch 2 times, most recently from 4b8a167 to 1609e02 Compare March 16, 2025 16:23
@rustbot rustbot added the A-build-scripts Area: build.rs scripts label Mar 16, 2025
@usamoi usamoi marked this pull request as ready for review March 16, 2025 16:37
@epage
Copy link
Contributor

epage commented Mar 17, 2025

r? ehuss

Since you have more of the background on this

@rustbot rustbot assigned ehuss and unassigned epage Mar 17, 2025
@ehuss
Copy link
Contributor

ehuss commented Mar 18, 2025

Thanks!

I'm a little uncertain about changing Bin, SingleBin, and Example. My thinking is that if you have a flag that is required to link a bin, then the flag would also likely be required to link a unittest of the bin (since they are mostly the same thing). Can you say more about why those are being changed?

@rustbot

This comment has been minimized.

@usamoi
Copy link
Author

usamoi commented Mar 19, 2025

I'm a little uncertain about changing Bin, SingleBin, and Example. My thinking is that if you have a flag that is required to link a bin, then the flag would also likely be required to link a unittest of the bin (since they are mostly the same thing). Can you say more about why those are being changed?

I initially assumed they were different based on intuition.

I recalled a case where a binary was compiled for a bare-metal target, and I used custom test frameworks to run tests in the same environment. If the current behavior changes, similar use cases could break.

So, I reverted to the previous behavior for Bin, SingleBin and Example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build-execution Area: anything dealing with executing the compiler A-build-scripts Area: build.rs scripts S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cdylib extra link args apply to unit tests
5 participants