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

Fixed issues using object flags on on-debug default alloc

This commit is contained in:
Brian Fiete 2020-05-15 10:33:56 -07:00
parent 66216ce5d9
commit 63c6421413
8 changed files with 50 additions and 12 deletions

View file

@ -589,9 +589,10 @@ namespace IDE.Compiler
SetOpt(options.mEmitDynamicCastCheck, .EmitDynamicCastCheck);
SetOpt(enableObjectDebugFlags, .EnableObjectDebugFlags);
SetOpt(emitObjectAccessCheck, .EmitObjectAccessCheck);
#if BF_PLATFORM_WINDOWS
SetOpt(options.mEnableRealtimeLeakCheck, .EnableRealtimeLeakCheck);
#endif
if (options.LeakCheckingEnabled)
SetOpt(options.mEnableRealtimeLeakCheck, .EnableRealtimeLeakCheck);
SetOpt(options.mEnableSideStack, .EnableSideStack);
#if !CLI
SetOpt(options.mAllowHotSwapping, .EnableHotSwapping);

View file

@ -7180,13 +7180,12 @@ namespace IDE
// Only supported on Windows at the moment
bool hasLeakCheck = false;
#if BF_PLATFORM_WINDOWS
if (workspaceOptions.mEnableRealtimeLeakCheck && workspaceOptions.mEnableObjectDebugFlags)
if (workspaceOptions.LeakCheckingEnabled)
{
hasLeakCheck = true;
macroList.Add("BF_ENABLE_REALTIME_LEAK_CHECK");
}
#endif
if ((workspaceOptions.mAllocType == .Debug) || (hasLeakCheck))
macroList.Add("BF_DEBUG_ALLOC");

View file

@ -245,6 +245,18 @@ namespace IDE
delete configSel;
}
public bool LeakCheckingEnabled
{
get
{
#if BF_PLATFORM_WINDOWS
return mEnableRealtimeLeakCheck && mEnableObjectDebugFlags && (mAllocType == .Debug);
#else
return false;
#endif
}
}
public bool IsTestProject(Project project)
{
return ((mBuildKind == .Test) &&