From 9dbdad3dc4c11b2288a4ea78f6f4dc90946e926d Mon Sep 17 00:00:00 2001 From: HappyDOGE <28511119+HappyDOGE@users.noreply.github.com> Date: Thu, 28 Jul 2022 19:48:53 +0300 Subject: [PATCH] fix debug compile --- mathlib/polyhedron.cpp | 2 ++ scripts/waifulib/compiler_optimizations.py | 4 ++-- wscript | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mathlib/polyhedron.cpp b/mathlib/polyhedron.cpp index 24ab0462..5981ebca 100644 --- a/mathlib/polyhedron.cpp +++ b/mathlib/polyhedron.cpp @@ -84,7 +84,9 @@ CPolyhedron_AllocByNew *CPolyhedron_AllocByNew::Allocate( unsigned short iVertic (iIndices * sizeof( Polyhedron_IndexedLineReference_t )) + (iPolygons * sizeof( Polyhedron_IndexedPolygon_t ))); +#include "tier0/memdbgoff.h" CPolyhedron_AllocByNew *pAllocated = new ( pMemory ) CPolyhedron_AllocByNew; +#include "tier0/memdbgon.h" pAllocated->iVertexCount = iVertices; pAllocated->iLineCount = iLines; diff --git a/scripts/waifulib/compiler_optimizations.py b/scripts/waifulib/compiler_optimizations.py index 4314fe95..8064dd98 100644 --- a/scripts/waifulib/compiler_optimizations.py +++ b/scripts/waifulib/compiler_optimizations.py @@ -47,7 +47,7 @@ LINKFLAGS = { CFLAGS = { 'common': { # disable thread-safe local static initialization for C++11 code, as it cause crashes on Windows XP - 'msvc': ['/D_USING_V110_SDK71_', '/Zi', '/FS', '/Zc:threadSafeInit-', '/MT'], + 'msvc': ['/D_USING_V110_SDK71_', '/Zi', '/FS', '/Zc:threadSafeInit-'], 'clang': ['-g0', '-fno-strict-aliasing', '-gdwarf-2', '-fvisibility=hidden'], 'gcc': ['-g0', '-fno-strict-aliasing', '-fvisibility=hidden'], 'owcc': ['-fno-short-enum', '-ffloat-store', '-g0'] @@ -81,7 +81,7 @@ CFLAGS = { 'default': ['-O0'] }, 'nooptimize': { - 'msvc': ['/Od'], + 'msvc': ['/Od', '/MT'], 'default': ['-O0'] } } diff --git a/wscript b/wscript index 6007ef35..a2f8a1b2 100644 --- a/wscript +++ b/wscript @@ -353,7 +353,8 @@ def configure(conf): '/INCREMENTAL:NO', '/NODEFAULTLIB:libc', '/NODEFAULTLIB:libcd', - '/NODEFAULTLIB:libcmt' + '/NODEFAULTLIB:libcmt', + '/FORCE' ] else: linkflags += [