[PATCH] Forward #pragma comment(lib/linker) through as flags metadata
rnk at google.com
Mon May 6 13:09:06 PDT 2013
OK, I sent an updated patch that moves /defaultlib into TargetCodeGenInfo.
Adding Daniel if he has any thoughts, since this was basically his
After sending, I also see some unecessary cruft in the diff that I
need to remove...
On Tue, Apr 30, 2013 at 3:37 PM, Robinson, Paul
<Paul_Robinson at playstation.sony.com> wrote:
> Per your request in the email chain on the LLVM part...
> In ActOnPragmaMSComment you embed "/DEFAULTLIB:" in the linker options.
> This should be in a target-sensitive hook so it can easily be made to
> work for other toolchains. While Microsoft defined these pragmas,
> they can be useful on other platforms.
> Whether you handle this as new named metadata that totally imitates
> the old deplibs (so the target stuff is done in LLVM) or handle it
> in a target-dependent way in Clang, either way can work.
>> -----Original Message-----
>> From: cfe-commits-bounces at cs.uiuc.edu [mailto:cfe-commits-
>> bounces at cs.uiuc.edu] On Behalf Of Reid Kleckner
>> Sent: Wednesday, April 24, 2013 1:31 PM
>> To: rnk at google.com
>> Cc: cfe-commits at cs.uiuc.edu
>> Subject: [PATCH] Forward #pragma comment(lib/linker) through as flags
>> Most of this change is wiring the pragma all the way through from the
>> lexer, parser, and sema to codegen. I considered adding a Decl AST node
>> for this, but it seemed too heavyweight.
>> Mach-O already uses a metadata flag called "Linker Options" to do this
>> kind of auto-linking. This change follows that pattern.
>> The MC layer change to forward the metadata into the .drectve section is
>> This is related to auto-linking, which is http://llvm.org/PR13016.
More information about the cfe-commits