|
@@ -1794,30 +1794,13 @@ class MSVCToolchainOptions(ToolchainOptions):
|
|
|
self.under_wine_link = self.under_wine_tools
|
|
|
self.under_wine_lib = self.under_wine_tools
|
|
|
self.system_msvc = self.params.get('system_msvc', False)
|
|
|
- self.ide_msvs = self.params.get('ide_msvs', False)
|
|
|
self.use_clang = self.params.get('use_clang', False)
|
|
|
self.use_msvc_linker = is_positive('USE_MSVC_LINKER')
|
|
|
self.use_arcadia_toolchain = self.params.get('use_arcadia_toolchain', False)
|
|
|
|
|
|
self.sdk_version = None
|
|
|
|
|
|
- if self.ide_msvs:
|
|
|
- bindir = '$(VC_ExecutablePath_x64_x64)\\'
|
|
|
- self.c_compiler = bindir + 'cl.exe'
|
|
|
- self.cxx_compiler = self.c_compiler
|
|
|
-
|
|
|
- self.link = bindir + 'link.exe'
|
|
|
- self.lib = bindir + 'lib.exe'
|
|
|
- self.masm_compiler = bindir + 'ml64.exe'
|
|
|
-
|
|
|
- self.vc_root = None
|
|
|
-
|
|
|
- sdk_dir = '$(WindowsSdkDir)'
|
|
|
- self.sdk_version = '$(WindowsTargetPlatformVersion)'
|
|
|
- self.kit_includes = win_path_fix(os.path.join(sdk_dir, 'Include', self.sdk_version))
|
|
|
- self.kit_libs = win_path_fix(os.path.join(sdk_dir, 'Lib', self.sdk_version))
|
|
|
-
|
|
|
- elif detector:
|
|
|
+ if detector:
|
|
|
self.use_clang = is_positive('USE_CLANG_CL')
|
|
|
|
|
|
self.masm_compiler = which('ml64.exe')
|
|
@@ -1900,7 +1883,7 @@ class MSVCToolchain(MSVC, Toolchain):
|
|
|
Toolchain.__init__(self, tc, build)
|
|
|
MSVC.__init__(self, tc, build)
|
|
|
|
|
|
- if self.tc.from_arcadia and not self.tc.ide_msvs:
|
|
|
+ if self.tc.from_arcadia:
|
|
|
if not is_positive('DISABLE_YMAKE_CONF_CUSTOMIZATION'):
|
|
|
self.platform_projects.append('build/internal/platform/msvc')
|
|
|
self.platform_projects.append('build/platform/wine')
|
|
@@ -1920,8 +1903,6 @@ class MSVCToolchain(MSVC, Toolchain):
|
|
|
emit('_UNDER_WINE_COMPILER', 'yes')
|
|
|
if self.tc.use_clang:
|
|
|
emit('CLANG_CL', 'yes')
|
|
|
- if self.tc.ide_msvs:
|
|
|
- emit('IDE_MSVS', 'yes')
|
|
|
if self.tc.use_arcadia_toolchain:
|
|
|
emit('USE_ARCADIA_TOOLCHAIN', 'yes')
|
|
|
emit('_MSVC_TC_KIT_LIBS', self.tc.kit_libs)
|
|
@@ -1984,8 +1965,8 @@ class MSVCCompiler(MSVC, Compiler):
|
|
|
'${hide:CPP_FAKEID}',
|
|
|
# FIXME: This is quick fix to let catboost build from MSVS IDE
|
|
|
# This place is questionable overall, see YMAKE-437
|
|
|
- '/DARCADIA_ROOT=' + ('${ARCADIA_ROOT}' if not self.tc.ide_msvs else '.'),
|
|
|
- '/DARCADIA_BUILD_ROOT=' + ('${ARCADIA_BUILD_ROOT}' if not self.tc.ide_msvs else '.'),
|
|
|
+ '/DARCADIA_ROOT=${ARCADIA_ROOT}',
|
|
|
+ '/DARCADIA_BUILD_ROOT=${ARCADIA_BUILD_ROOT}',
|
|
|
'/DWIN32',
|
|
|
'/D_WIN32',
|
|
|
'/D_WINDOWS',
|
|
@@ -2092,11 +2073,6 @@ class MSVCCompiler(MSVC, Compiler):
|
|
|
'-Wno-undefined-var-template',
|
|
|
]
|
|
|
|
|
|
- if self.tc.ide_msvs:
|
|
|
- cxx_warnings += [
|
|
|
- '-Wno-unused-command-line-argument',
|
|
|
- ]
|
|
|
-
|
|
|
defines.append('/D_WIN32_WINNT={0}'.format(WINDOWS_VERSION_MIN))
|
|
|
|
|
|
if winapi_unicode:
|
|
@@ -2104,20 +2080,17 @@ class MSVCCompiler(MSVC, Compiler):
|
|
|
else:
|
|
|
defines += ['/D_MBCS']
|
|
|
|
|
|
- vc_include = win_path_fix(os.path.join(self.tc.vc_root, 'include')) if not self.tc.ide_msvs else "$(VC_VC_IncludePath.Split(';')[0].Replace('\\','/'))"
|
|
|
+ vc_include = win_path_fix(os.path.join(self.tc.vc_root, 'include'))
|
|
|
|
|
|
- if not self.tc.ide_msvs:
|
|
|
- def include_flag(path):
|
|
|
- return '{flag}"{path}"'.format(path=path, flag='/I ' if not self.tc.use_clang else '-imsvc')
|
|
|
+ def include_flag(path):
|
|
|
+ return '{flag}"{path}"'.format(path=path, flag='/I ' if not self.tc.use_clang else '-imsvc')
|
|
|
|
|
|
- for name in ('shared', 'ucrt', 'um', 'winrt'):
|
|
|
- flags.append(include_flag(win_path_fix(os.path.join(self.tc.kit_includes, name))))
|
|
|
- flags.append(include_flag(vc_include))
|
|
|
+ for name in ('shared', 'ucrt', 'um', 'winrt'):
|
|
|
+ flags.append(include_flag(win_path_fix(os.path.join(self.tc.kit_includes, name))))
|
|
|
+ flags.append(include_flag(vc_include))
|
|
|
|
|
|
if self.tc.use_clang:
|
|
|
emit('CLANG_CL', 'yes')
|
|
|
- if self.tc.ide_msvs:
|
|
|
- emit('IDE_MSVS', 'yes')
|
|
|
if self.tc.use_arcadia_toolchain:
|
|
|
emit('USE_ARCADIA_TOOLCHAIN', 'yes')
|
|
|
|
|
@@ -2142,7 +2115,7 @@ class MSVCCompiler(MSVC, Compiler):
|
|
|
|
|
|
emit('_MSVC_FLAGS', flags)
|
|
|
|
|
|
- ucrt_include = win_path_fix(os.path.join(self.tc.kit_includes, 'ucrt')) if not self.tc.ide_msvs else "$(UniversalCRT_IncludePath.Split(';')[0].Replace('\\','/'))"
|
|
|
+ ucrt_include = win_path_fix(os.path.join(self.tc.kit_includes, 'ucrt'))
|
|
|
|
|
|
# clang-cl has '#include_next', and MSVC hasn't. It needs separately specified CRT and VC include directories for libc++ to include second in order standard C and C++ headers.
|
|
|
if not self.tc.use_clang:
|
|
@@ -2171,8 +2144,6 @@ class MSVCLinker(MSVC, Linker):
|
|
|
emit('LINK_EXE_FLAGS_PER_TYPE', '$LINK_EXE_FLAGS_RELEASE')
|
|
|
if self.build.is_debug:
|
|
|
emit('LINK_EXE_FLAGS_PER_TYPE', '$LINK_EXE_FLAGS_DEBUG')
|
|
|
- if self.build.is_ide and self.tc.ide_msvs:
|
|
|
- emit('LINK_EXE_FLAGS_PER_TYPE', '@[debug|$LINK_EXE_FLAGS_DEBUG]@[release|$LINK_EXE_FLAGS_RELEASE]')
|
|
|
|
|
|
print('@import "${CONF_ROOT}/conf/linkers/msvc_linker.conf"')
|
|
|
|
|
@@ -2425,7 +2396,7 @@ class Cuda(object):
|
|
|
mtime = ' --mtime ${tool:"tools/mtime0"} '
|
|
|
custom_pid = '--custom-pid ${tool:"tools/custom_pid"} '
|
|
|
if not self.cuda_use_clang.value:
|
|
|
- cmd = '$YMAKE_PYTHON ${input:"build/scripts/compile_cuda.py"}' + mtime + custom_pid + '$NVCC $NVCC_STD $NVCC_FLAGS -c ${input:SRC} -o ${output;suf=${OBJ_SUF}${NVCC_OBJ_EXT}:SRC} ${pre=-I:_C__INCLUDE} --cflags $C_FLAGS_PLATFORM $CXXFLAGS $NVCC_STD $NVCC_CFLAGS $SRCFLAGS ${hide;input:"build/platform/cuda/cuda_runtime_include.h"} $NVCC_ENV $CUDA_HOST_COMPILER_ENV ${hide;kv:"p CC"} ${hide;kv:"pc light-green"}' # noqa E501
|
|
|
+ cmd = '$YMAKE_PYTHON ${input:"build/scripts/compile_cuda.py"}' + mtime + custom_pid + '$NVCC $NVCC_STD $NVCC_FLAGS -c ${input:SRC} -o ${output;suf=${OBJ_SUF}${NVCC_OBJ_EXT}:SRC} ${pre=-I:_C__INCLUDE} --cflags $C_FLAGS_PLATFORM $CXXFLAGS $NVCC_STD $SRCFLAGS ${hide;input:"build/platform/cuda/cuda_runtime_include.h"} $NVCC_ENV $CUDA_HOST_COMPILER_ENV ${hide;kv:"p CC"} ${hide;kv:"pc light-green"}' # noqa E501
|
|
|
else:
|
|
|
cmd = '$CXX_COMPILER --cuda-path=$CUDA_ROOT $C_FLAGS_PLATFORM -c ${input:SRC} -o ${output;suf=${OBJ_SUF}${NVCC_OBJ_EXT}:SRC} ${pre=-I:_C__INCLUDE} $CXXFLAGS $SRCFLAGS $TOOLCHAIN_ENV ${hide;kv:"p CU"} ${hide;kv:"pc green"}' # noqa E501
|
|
|
|
|
@@ -2540,7 +2511,7 @@ class Cuda(object):
|
|
|
'Y_SDK_Root': '$WINDOWS_KITS_RESOURCE_GLOBAL',
|
|
|
}
|
|
|
|
|
|
- if not self.build.tc.ide_msvs and not is_positive('DISABLE_YMAKE_CONF_CUSTOMIZATION'):
|
|
|
+ if not is_positive('DISABLE_YMAKE_CONF_CUSTOMIZATION'):
|
|
|
self.peerdirs.append('build/internal/platform/msvc')
|
|
|
self.cuda_host_compiler_env.value = format_env(env)
|
|
|
self.cuda_host_msvc_version.value = vc_version
|