mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-23 08:13:13 +01:00
Merge pull request #429 from redstar/moduleflags
Implement pragma(lib) on Windows using module metadata.
This commit is contained in:
@@ -414,6 +414,12 @@ llvm::Module* Module::genLLVMModule(llvm::LLVMContext& context)
|
||||
// generate ModuleInfo
|
||||
genmoduleinfo();
|
||||
|
||||
#if LDC_LLVM_VER >= 303
|
||||
// Add the linker options metadata flag.
|
||||
ir.module->addModuleFlag(llvm::Module::AppendUnique, "Linker Options",
|
||||
llvm::MDNode::get(ir.context(), ir.LinkerMetadataArgs));
|
||||
#endif
|
||||
|
||||
// verify the llvm
|
||||
verifyModule(*ir.module);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user