mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
Get more debugging info out of MSVC.
This commit is contained in:
parent
2d38d1b300
commit
c8b069cc1e
1 changed files with 25 additions and 12 deletions
37
SConstruct
37
SConstruct
|
|
@ -128,17 +128,6 @@ if platform == 'winddk':
|
|||
env['WDM_INC_PATH'],
|
||||
env['CRT_INC_PATH'],
|
||||
])
|
||||
|
||||
env.Append(CFLAGS = '/W3')
|
||||
if debug:
|
||||
env.Append(CPPDEFINES = [
|
||||
('DBG', '1'),
|
||||
('DEBUG', '1'),
|
||||
('_DEBUG', '1'),
|
||||
])
|
||||
env.Append(CFLAGS = '/Od /Zi')
|
||||
env.Append(CXXFLAGS = '/Od /Zi')
|
||||
|
||||
|
||||
# Optimization flags
|
||||
if gcc:
|
||||
|
|
@ -156,10 +145,34 @@ if gcc:
|
|||
env.Append(CFLAGS = '-fmessage-length=0')
|
||||
env.Append(CXXFLAGS = '-fmessage-length=0')
|
||||
|
||||
if msvc:
|
||||
env.Append(CFLAGS = '/W3')
|
||||
if debug:
|
||||
cflags = [
|
||||
'/Od', # disable optimizations
|
||||
'/Oy-', # disable frame pointer omission
|
||||
'/Zi', # enable enable debugging information
|
||||
]
|
||||
else:
|
||||
cflags = [
|
||||
'/Ox', # maximum optimizations
|
||||
'/Os', # favor code space
|
||||
'/Zi', # enable enable debugging information
|
||||
]
|
||||
env.Append(CFLAGS = cflags)
|
||||
env.Append(CXXFLAGS = cflags)
|
||||
|
||||
|
||||
# Defines
|
||||
if debug:
|
||||
env.Append(CPPDEFINES = ['DEBUG'])
|
||||
if gcc:
|
||||
env.Append(CPPDEFINES = ['DEBUG'])
|
||||
if msvc:
|
||||
env.Append(CPPDEFINES = [
|
||||
('DBG', '1'),
|
||||
('DEBUG', '1'),
|
||||
('_DEBUG', '1'),
|
||||
])
|
||||
else:
|
||||
env.Append(CPPDEFINES = ['NDEBUG'])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue