mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-20 23:03:14 +01:00
Implement pragma(lib) using module metadata.
Since LLVM 3.3 pragma(lib) can be implemented like DMD does.
This commit is contained in:
@@ -422,6 +422,12 @@ llvm::Module* Module::genLLVMModule(llvm::LLVMContext& context, Ir* sir)
|
||||
// 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