_STD_CXX=/std:$_STD_CXX_VERSION C_COMPILER=${_WINE_C_PREFIX} ${C_COMPILER_UNQUOTED} CXX_COMPILER=${_WINE_CXX_PREFIX} ${CXX_COMPILER_UNQUOTED} CXX_COMPILER_OLD=${_WINE_CXX_PREFIX} ${quo:CXX_COMPILER_OLD_UNQUOTED} MASM_COMPILER=${_WINE_MASM_PREFIX} ${MASM_COMPILER_UNQUOTED} MASM_COMPILER_OLD=${_WINE_MASM_PREFIX} ${quo:MASM_COMPILER_OLD_UNQUOTED} MSVC_INLINE_OPTIMIZED=yes when ($MSVC_INLINE_OPTIMIZED == "yes") { MSVC_INLINE_FLAG=/Zc:inline } when ($MSVC_INLINE_OPTIMIZED == "no") { MSVC_INLINE_FLAG=/Zc:inline- } # Provide proper __cplusplus value # https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ _CXX_FLAGS=/Zc:__cplusplus _MSVC_ONLY_FLAGS= DEBUG_INFO_FLAGS=/Z7 when ($IDE_MSVS == "yes") { when ($CLANG_CL != "yes") { _MSVC_ONLY_FLAGS=/FD /MP } DEBUG_INFO_FLAGS=/Zi /FS } CFLAGS_DEBUG = /Od /Ob0 /Oi CFLAGS_RELEASE = /O2 /Ob2 /Oi MASMFLAGS= _MASM_IO=/nologo /c /Fo${output;suf=${OBJECT_SUF}:SRC} ${input:SRC} when ($ARCH_ARMV7) { _MASM_IO=-o ${output;suf=${OBJECT_SUF}:SRC} ${input:SRC} } OBJ_CROSS_SUF=$OBJ_SUF OBJECT_SUF=$OBJ_SUF.obj CFLAGS+=$_MSVC_FLAGS $_MSVC_ONLY_FLAGS $CFLAGS_PER_TYPE $DEBUG_INFO_FLAGS $C_WARNING_OPTS $C_DEFINES $USER_CFLAGS $USER_CFLAGS_GLOBAL CXXFLAGS+=$CFLAGS $_STD_CXX $_CXX_FLAGS $_CXX_DEFINES $CXX_WARNING_OPTS $USER_CXXFLAGS $USER_CXXFLAGS_GLOBAL CONLYFLAGS+=$USER_CONLYFLAGS $USER_CONLYFLAGS_GLOBAL BC_CFLAGS+=$CFLAGS BC_CXXFLAGS+=$BC_CFLAGS $CXXFLAGS CFLAGS+=$_CFLAGS_UCRT_VC_INCLUDES when ($NO_WSHADOW == "yes") { C_WARNING_OPTS+=/wd4456 /wd4457 } when ($NO_COMPILER_WARNINGS == "yes") { when ($CLANG_CL == "yes") { # Though /w is intended to switch off all the warnings, # it does not switch at least -Wregister and -Wreserved-user-defined-literal under clang-cl. # # Use -Wno-everything to force warning suppression. C_WARNING_OPTS = -Wno-everything CXX_WARNING_OPTS = } otherwise { C_WARNING_OPTS=/w CXX_WARNING_OPTS= } } when ($NO_OPTIMIZE == "yes") { OPTIMIZE=/Od } SFDL_FLAG=/E /C /P /TP /Fi$SFDL_TMP_OUT WERROR_FLAG=/WX CL_WRAPPER=${FIX_MSVC_OUTPUT} cl when ($_UNDER_WINE_COMPILER == "yes" || $CLANG_CL == "yes") { CL_WRAPPER= } ML_WRAPPER=${FIX_MSVC_OUTPUT} ml when ($_UNDER_WINE_TOOLS == "yes") { ML_WRAPPER= } _FORCE_CPP_FLAGS=/TP _C_CPP_KV_STYLE_P=p CC _C_CPP_KV_STYLE_PC=pc yellow _SRC_C_NODEPS_CMD=${TOOLCHAIN_ENV} ${CL_WRAPPER} ${C_COMPILER} /c /Fo${OUTFILE} ${SRC} ${EXTRA_C_FLAGS} ${pre=/I :INC} ${CFLAGS} ${hide;kv:"soe"} ${hide;kv:"p CC"} ${hide;kv:"pc yellow"} _SRC_CPP_CMD_NEW=${TOOLCHAIN_ENV} ${CL_WRAPPER} ${CXX_COMPILER} /c /Fo$_COMPILE_OUTPUTS ${input:SRC} ${EXTRA_C_FLAGS} ${pre=/I :_C__INCLUDE} ${CXXFLAGS} ${SRCFLAGS} ${_LANG_CFLAGS_VALUE_NEW} ${hide;kv:"soe"} ${hide;kv:_C_CPP_KV_STYLE_P} ${hide;kv:_C_CPP_KV_STYLE_PC} _SRC_C_CMD_NEW=${TOOLCHAIN_ENV} ${CL_WRAPPER} ${C_COMPILER} /c /Fo$_COMPILE_OUTPUTS ${input:SRC} ${EXTRA_C_FLAGS} ${pre=/I :_C__INCLUDE} ${CFLAGS} ${CONLYFLAGS} ${SRCFLAGS} ${hide;kv:"soe"} ${hide;kv:_C_CPP_KV_STYLE_P} ${hide;kv:_C_CPP_KV_STYLE_PC} _SRC_M_CMD=$_EMPTY_CMD _SRC_MASM_CMD=${cwd:ARCADIA_BUILD_ROOT} ${TOOLCHAIN_ENV} ${ML_WRAPPER} ${MASM_COMPILER_OLD} ${MASMFLAGS} ${SRCFLAGS} $_MASM_IO ${hide;kv:"p AS"} ${hide;kv:"pc yellow"}