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

[lld] MinGW backend does not support -r #113081

Open
albinahlback opened this issue Oct 20, 2024 · 4 comments
Open

[lld] MinGW backend does not support -r #113081

albinahlback opened this issue Oct 20, 2024 · 4 comments
Labels

Comments

@albinahlback
Copy link

LLD with MinGW backend does not seem to support the -r option or something equivalent. I've understood this option to be quite standard.

In order to compile FLINT, this option is required for MinGW since we otherwise go beyond the command line length limit when compiling the library. A proposal was brought up in flintlib/flint#2098 to avoid using lld -r when cross-compiling from Linux to Windows since the command line length is far greater than what is is on MinGW.

Can this feature be implemented here?

@llvmbot
Copy link
Member

llvmbot commented Nov 21, 2024

@llvm/issue-subscribers-lld-coff

Author: Albin Ahlbäck (albinahlback)

LLD with MinGW backend does not seem to support the `-r` option or something equivalent. I've understood this option to be quite standard.

In order to compile FLINT, this option is required for MinGW since we otherwise go beyond the command line length limit when compiling the library. A proposal was brought up in flintlib/flint#2098 to avoid using lld -r when cross-compiling from Linux to Windows since the command line length is far greater than what is is on MinGW.

Can this feature be implemented here?

@mstorsjo
Copy link
Member

This option is indeed standard within GNU ld. I've considered implementing it a number of years ago, and while it probably would be doable, doing that would be a quite invasive change, for relatively little use in the wild.

this option is required for MinGW since we otherwise go beyond the command line length limit when compiling the library.

Have you considered using response files for passing command line arguments? That's supported essentially everywhere (in GNU ld as well), and is a much more straightforward operation. This is what most build systems do to tackle the command line length limit on Windows.

@albinahlback
Copy link
Author

Please remind me, what are response files?

@alvinhochun
Copy link
Contributor

alvinhochun commented Nov 21, 2024

Please remind me, what are response files?

You write the command line arguments to an intermediate file, then pass its path prefixed with @ as a command line argument to the tool.

@EugeneZelenko EugeneZelenko removed the lld label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants