I want to change CFLAGS/CXXFLAGS for C++ compiler

I want to change CFLAGS/CXXFLAGS for C++ compiler

  1. I want to change “Dynamic Runtime CRT (/MD)” to “Static Runtime CRT (/MT)” for the all project
  2. I want to use “Advanced Vector Extensions (/arch:AVX)” for the all project

Please help me, Thank you~

I can use “Advanced Vector Extensions (/arch:AVX)” for C++ compiler successful
I have add an array “ARCH”: “AVX”, to “lumberyard_version\dev_WAF_\settings\platforms\common.msvc.json”

But I still can’t use “Static Runtime CRT (/MT)” to compile

I found code for select runtime crt in “lumberyard_version\dev\Tools\build\waf-1.7.13\lmbrwaflib\cryengine_modules.py”

runtime_crt = 'dynamic'                     # Global Setting
if overwrite_settings:                      # Setting per Task Generator Type
    runtime_crt = overwrite_settings
if kw.get('force_static_crt', False):       # Setting per Task Generator
    runtime_crt = 'static'
if kw.get('force_dynamic_crt', False):      # Setting per Task Generator
    runtime_crt = 'dynamic'

I think there must be a setting “force_static_crt” is True
But I don’t know where to fix it

1 Like