1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Apple fixes

This commit is contained in:
Brian Fiete 2019-10-29 05:01:04 -07:00
parent 43b69023f6
commit 9f3fded709
23 changed files with 847 additions and 425 deletions

View file

@ -4029,6 +4029,7 @@ bool BfIRCodeGen::WriteObjectFile(const StringImpl& outFileName, const BfCodeGen
case BfRelocType_ROPI_RWPI:
relocModel = llvm::Reloc::Model::ROPI_RWPI;
break;
default: break;
}
switch (codeGenOptions.mPICLevel)
@ -4042,6 +4043,7 @@ bool BfIRCodeGen::WriteObjectFile(const StringImpl& outFileName, const BfCodeGen
case BfPICLevel_Big:
mLLVMModule->setPICLevel(llvm::PICLevel::Level::BigPIC);
break;
default: break;
}
std::unique_ptr<llvm::TargetMachine> target(

View file

@ -1098,7 +1098,7 @@ void BfModule::EnsureIRBuilder(bool dbgVerifyCodeGen)
// code as we walk the AST
//mBfIRBuilder->mDbgVerifyCodeGen = true;
if (
(mModuleName == "Program")
(mModuleName == "-")
//|| (mModuleName == "System_Internal")
//|| (mModuleName == "vdata")
//|| (mModuleName == "Hey_Dude_Bro_TestClass")

View file

@ -191,8 +191,8 @@ static int DecodeInt(uint8* buf, int& idx)
static int gCurDataId = 0;
BfParserData::BfParserData()
{
mDataId = (int)::InterlockedIncrement((volatile uint32*)&gCurDataId);
{
mDataId = (int)BfpSystem_InterlockedExchangeAdd32((uint32*)&gCurDataId, 1) + 1;
mHash = 0;
mRefCount = -1;