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

Choose AR args by program name instead of target #668

Closed
wants to merge 1 commit into from
Closed

Choose AR args by program name instead of target #668

wants to merge 1 commit into from

Conversation

andylizi
Copy link

Right now cc will always use -out:.. -nologo ... for ar args on MSVC targets, regardless of what the archiver actually is. This makes it impossible to use something other than lib.exe.

My use case is the same as #644 — I'm not sure how they managed without this, actually 😅.

@dot-asm
Copy link
Contributor

dot-asm commented Mar 25, 2022

I'm not sure how they managed without this

By setting AR environment variable to llvm-lib, a lib- and llvm-compatible librarian. Arguably it's a more natural choice and if anything, it would be more appropriate to advocate for having cc-rs use it, llvm-lib, automatically.

@andylizi
Copy link
Author

By setting AR environment variable to llvm-lib

llvm-lib is a thing?!

Wow 😂 I remember searching around for keywords like "llvm-ar msvc" and "llvm-ar lib", but somehow failed to find any mention of it. Today I learned...

it would be more appropriate to advocate for having cc-rs use it, llvm-lib, automatically.

Yeah that's for sure. In the mean time, do you think I should change this PR to .ends_with("lib.exe") to cover for llvm-lib usage, or just close it and wait for #657?

@dot-asm
Copy link
Contributor

dot-asm commented Mar 28, 2022

In the mean time, do you think

I'm just another cc-rs user, I can't tell you what to do :-) Yes, #657 can be extended to use llvm-lib, yes, I can do that... A little bit later...

@dot-asm
Copy link
Contributor

dot-asm commented May 23, 2022

#657 can be extended to use llvm-lib, yes, I can do that...

Done.

@andylizi andylizi closed this May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants