summaryrefslogtreecommitdiffstats
path: root/build/ymake_conf.py
diff options
context:
space:
mode:
authorYDBot <[email protected]>2025-09-26 05:40:56 +0000
committerYDBot <[email protected]>2025-09-26 05:40:56 +0000
commita7e5af7043672a57f330696519f435f19fcd03d0 (patch)
treefa751accfbb8afcd928340c9078b00453c07dde1 /build/ymake_conf.py
parentd7cd65635ff05f602b8eb7c6e2a42217057dd2c6 (diff)
parentee5ee24a4d661a146d6142a78050207193937281 (diff)
Merge pull request #25828 from ydb-platform/merge-rightlib-250926-0050
Diffstat (limited to 'build/ymake_conf.py')
-rwxr-xr-xbuild/ymake_conf.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/build/ymake_conf.py b/build/ymake_conf.py
index b6bfce4e68c..325c80327ba 100755
--- a/build/ymake_conf.py
+++ b/build/ymake_conf.py
@@ -536,6 +536,8 @@ def get_target_triple(target):
(target.is_emscripten and target.is_wasm32, 'wasm32-unknown-emscripten'),
(target.is_emscripten and target.is_wasm64, 'wasm64-unknown-emscripten'),
+
+ (target.is_windows and target.is_x86_64, 'x86_64-pc-win32'),
],
)
@@ -2066,7 +2068,15 @@ class MSVCCompiler(MSVC, Compiler):
c_warnings += ['/wd{}'.format(code) for code in warns_disabled]
cxx_warnings = []
+ c_flags_platform = []
+
if self.tc.use_clang:
+ # gcc does not support multiple targets within the same compiler build,
+ # hence this logic is only relevant for clang
+ target_triple = get_target_triple(target)
+ if target_triple:
+ c_flags_platform.append('--target={}'.format(target_triple))
+
if not self.tc.is_system_cxx:
flags += [
# Allow <windows.h> to be included via <Windows.h> in case-sensitive file-systems.
@@ -2145,6 +2155,7 @@ class MSVCCompiler(MSVC, Compiler):
emit('C_COMPILER_UNQUOTED', '"{}"'.format(self.tc.c_compiler))
emit('MASM_COMPILER_UNQUOTED', '"{}"'.format(self.tc.masm_compiler))
emit('MASM_COMPILER_OLD_UNQUOTED', self.tc.masm_compiler)
+ emit('C_FLAGS_PLATFORM', c_flags_platform)
append('C_DEFINES', defines)
append('C_WARNING_OPTS', c_warnings)
emit('_CXX_DEFINES', cxx_defines)