mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Disable lto on modules with dll exports (lld-link bug)
This commit is contained in:
parent
0c3f9a139d
commit
1b5f85615a
2 changed files with 6 additions and 0 deletions
|
@ -352,6 +352,7 @@ BfIRCodeGen::BfIRCodeGen()
|
|||
mLLVMContext = new llvm::LLVMContext();
|
||||
mLLVMModule = NULL;
|
||||
mIsCodeView = false;
|
||||
mHadDLLExport = false;
|
||||
mConstValIdx = 0;
|
||||
mCmdCount = 0;
|
||||
|
||||
|
@ -3794,6 +3795,7 @@ void BfIRCodeGen::HandleNextCmd()
|
|||
else if (attribute == BFIRAttribute_DllExport)
|
||||
{
|
||||
func->setDLLStorageClass(llvm::GlobalValue::DLLExportStorageClass);
|
||||
mHadDLLExport = true;
|
||||
}
|
||||
else if (attribute == BFIRAttribute_NoFramePointerElim)
|
||||
{
|
||||
|
@ -5314,6 +5316,9 @@ bool BfIRCodeGen::WriteObjectFile(const StringImpl& outFileName)
|
|||
{
|
||||
enableLTO = false;
|
||||
}
|
||||
|
||||
if (mHadDLLExport) // LTO bug in LLVM-link?
|
||||
enableLTO = false;
|
||||
}
|
||||
|
||||
std::error_code EC;
|
||||
|
|
|
@ -106,6 +106,7 @@ public:
|
|||
BfCodeGenOptions mCodeGenOptions;
|
||||
bool mHasDebugLoc;
|
||||
bool mIsCodeView;
|
||||
bool mHadDLLExport;
|
||||
int mConstValIdx;
|
||||
|
||||
int mCmdCount;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue