Added TARGET_PLATFORM variable and fixed (hopefully) debug symbols on
Windows.
This commit is contained in:
parent
9b82fb87c0
commit
202331ba60
@ -8,6 +8,7 @@ import json
|
||||
import multiprocessing
|
||||
import os
|
||||
import pathlib
|
||||
import platform
|
||||
import psutil
|
||||
import shutil
|
||||
import sys
|
||||
@ -1068,6 +1069,7 @@ vars.Add('COMPILATIONDB_FILTER_FILES', 'Removes source files from the compilatio
|
||||
' project.', config['COMPILATIONDB_FILTER_FILES'])
|
||||
vars.Add('SHOW_INCLUDES', 'Show include hierarchy (for debugging).', False)
|
||||
vars.Add('ENABLE_ASAN', 'Enable address sanitization.', bool(enable_asan))
|
||||
vars.Add('TARGET_PLATFORM', 'Target platform.', platform.system())
|
||||
|
||||
if 'VARIABLES' in config:
|
||||
for vardef in config['VARIABLES']:
|
||||
@ -1269,12 +1271,14 @@ elif env['COMPILER_FAMILY'] == 'cl':
|
||||
if env['SHOW_INCLUDES']:
|
||||
env.Append(CCFLAGS = ['/showIncludes'])
|
||||
if build_type == 'debug':
|
||||
env.Append(CCFLAGS = ['/Od', '/Zi', '/MDd'], LINKFLAGS = ' /DEBUG')
|
||||
env['PDB'] = env.File('#bin/full.pdb')
|
||||
env.Append(CCFLAGS = ['/Od', '/MDd'], LINKFLAGS = ' /DEBUG')
|
||||
env.Append(CPPDEFINES = ['_DEBUG', '_ITERATOR_DEBUG_LEVEL=2'])
|
||||
env.Append(DEPS_CXXFLAGS = ['/MDd', '/Zi', '/D_DEBUG', '/D_ITERATOR_DEBUG_LEVEL=2'])
|
||||
env.Append(DEPS_LINKFLAGS = ['/DEBUG'])
|
||||
elif build_type == 'release_debug' or build_type == 'profile':
|
||||
env.Append(CCFLAGS = ['/O2', '/MD', '/Zi'], LINKFLAGS = ' /DEBUG')
|
||||
env['PDB'] = env.File('#bin/full.pdb')
|
||||
env.Append(CCFLAGS = ['/O2', '/MD'], LINKFLAGS = ' /DEBUG')
|
||||
env.Append(DEPS_CXXFLAGS = ['/Zi', '/MD'])
|
||||
env.Append(DEPS_LINKFLAGS = ['/DEBUG'])
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user