-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Support auto linking #13388
Comments
This feature consists of 3 parts:
While we can implement #2 in LLVM, #3 is beyond its scope. We currently rely on the linker from binutils on windows and most unices. As far as I know it doesn't have the required feature. It's a bit of a chicken-and-egg problem, but it doesn't make much sense to implement only one side. |
Could you talk to the binutils guys and see if they're willing to implement this? |
Hi Olaf, Do you want this support for Linux or Windows or both? |
Eh, both. Or Linux. Currently I use MSVC on Windows, which already supported this. But ideally clang should support it on Windows too. |
I'm looking at threading #pragma comment through to codegen. It's a lot like a stripped down ImportDecl: it basically gets passed through the backend and concatenated with linker options, with some changes on the way. Is it work implementing something like #pragma clang linker_options "..." to implement this in terms of, and then thread that all the way through to the back, or would it be better to have a one off AST node just for #pragma comment? Or is there some better way to move data all the way through Sema to CodeGen? |
I added #pragma comment(lib)-style autolinking in r181426, but that doesn't fix this problem for everyone. |
I'm going to close this. We have '#pragma comment lib' support in clang on Windows. Other platforms will have to wait. |
Extended Description
Could you support auto linking, like supported by MSVC and used by for example Boost?
http://www.boost.org/doc/libs/1_49_0/more/getting_started/windows.html#auto-linking
It'd simplify build scripts of 'simple' apps.
The text was updated successfully, but these errors were encountered: