12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- 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
- }
- # https://msdn.microsoft.com/en-us/library/abx4dbyh.aspx
- when ($DLL_RUNTIME == "yes") {
- _FLAGS_DEBUG_RUNTIME=/MDd
- _FLAGS_RELEASE_RUNTIME=/MD
- }
- otherwise {
- _FLAGS_DEBUG_RUNTIME=/MTd
- _FLAGS_RELEASE_RUNTIME=/MT
- }
- CFLAGS_DEBUG=/Ob0 /Od /D_DEBUG $_FLAGS_DEBUG_RUNTIME
- CFLAGS_RELEASE=/Ox /Ob2 /Oi /DNDEBUG $_FLAGS_RELEASE_RUNTIME
- MASMFLAGS=
- _MASM_IO=/nologo /c /Fo${output;suf=${OBJECT_SUF}:SRC} ${input;msvs_source:SRC}
- when ($ARCH_ARMV7) {
- _MASM_IO=-o ${output;suf=${OBJECT_SUF}:SRC} ${input;msvs_source: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
- ML_WRAPPER=${FIX_MSVC_OUTPUT} ml
- when ($_UNDER_WINE == "yes" && $CLANG_CL !="yes") {
- CL_WRAPPER=
- ML_WRAPPER=
- }
- _FORCE_CPP_FLAGS=/TP
- _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=${TOOLCHAIN_ENV} ${CL_WRAPPER} ${CXX_COMPILER} /c /Fo$_COMPILE_OUTPUTS ${input;msvs_source:SRC} ${EXTRA_C_FLAGS} ${pre=/I :_C__INCLUDE} ${CXXFLAGS} ${SRCFLAGS} ${_LANG_CFLAGS_VALUE} ${hide;kv:"soe"} ${hide;kv:"p CC"} ${hide;kv:"pc yellow"}
- _SRC_C_CMD=${TOOLCHAIN_ENV} ${CL_WRAPPER} ${C_COMPILER} /c /Fo$_COMPILE_OUTPUTS ${input;msvs_source:SRC} ${EXTRA_C_FLAGS} ${pre=/I :_C__INCLUDE} ${CFLAGS} ${CONLYFLAGS} ${SRCFLAGS} ${hide;kv:"soe"} ${hide;kv:"p CC"} ${hide;kv:"pc yellow"}
- _SRC_M_CMD=$_EMPTY_CMD
- _SRC_MASM_CMD=${cwd:ARCADIA_BUILD_ROOT} ${TOOLCHAIN_ENV} ${ML_WRAPPER} ${MASM_COMPILER} ${MASMFLAGS} ${SRCFLAGS} $_MASM_IO ${kv;hide:"p AS"} ${kv;hide:"pc yellow"}
|