Browse Source

wscript: added support for "Edit and Continue" MSVC feature

pull/2/head
SNMetamorph 4 years ago committed by Alibek Omarov #SupportRMS
parent
commit
1a5b2576f7
  1. 17
      scripts/waifulib/compiler_optimizations.py

17
scripts/waifulib/compiler_optimizations.py

@ -41,19 +41,22 @@ LINKFLAGS = { @@ -41,19 +41,22 @@ LINKFLAGS = {
'sanitize': {
'clang': ['-fsanitize=undefined', '-fsanitize=address'],
'gcc': ['-fsanitize=undefined', '-fsanitize=address'],
},
'debug': {
'msvc': ['/INCREMENTAL', '/SAFESEH:NO']
}
}
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_', '/FS', '/Zc:threadSafeInit-', '/MT'],
'clang': ['-g', '-gdwarf-2', '-fvisibility=hidden'],
'gcc': ['-g', '-fvisibility=hidden'],
'owcc': ['-fno-short-enum', '-ffloat-store', '-g3']
},
'fast': {
'msvc': ['/O2', '/Oy'],
'msvc': ['/O2', '/Oy', '/Zi'],
'gcc': {
'3': ['-O3', '-fomit-frame-pointer'],
'default': ['-Ofast', '-funsafe-math-optimizations', '-funsafe-loop-optimizations', '-fomit-frame-pointer']
@ -62,29 +65,29 @@ CFLAGS = { @@ -62,29 +65,29 @@ CFLAGS = {
'default': ['-O3']
},
'fastnative': {
'msvc': ['/O2', '/Oy'],
'msvc': ['/O2', '/Oy', '/Zi'],
'gcc': ['-Ofast', '-march=native', '-funsafe-math-optimizations', '-funsafe-loop-optimizations', '-fomit-frame-pointer'],
'clang': ['-Ofast', '-march=native'],
'default': ['-O3']
},
'release': {
'msvc': ['/O2'],
'msvc': ['/O2', '/Zi'],
'owcc': ['-O3', '-foptimize-sibling-calls', '-fomit-leaf-frame-pointer', '-fomit-frame-pointer', '-fschedule-insns', '-funsafe-math-optimizations', '-funroll-loops', '-frerun-optimizer', '-finline-functions', '-finline-limit=512', '-fguess-branch-probability', '-fno-strict-aliasing', '-floop-optimize'],
'default': ['-O3']
},
'debug': {
'msvc': ['/Od'],
'msvc': ['/Od', '/ZI'],
'owcc': ['-O0', '-fno-omit-frame-pointer', '-funwind-tables', '-fno-omit-leaf-frame-pointer'],
'default': ['-O0']
},
'sanitize': {
'msvc': ['/Od', '/RTC1'],
'msvc': ['/Od', '/RTC1', '/Zi'],
'gcc': ['-Og', '-fsanitize=undefined', '-fsanitize=address'],
'clang': ['-O0', '-fsanitize=undefined', '-fsanitize=address'],
'default': ['-O0']
},
'nooptimize': {
'msvc': ['/Od'],
'msvc': ['/Od', '/Zi'],
'default': ['-O0']
}
}

Loading…
Cancel
Save