aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoregovol <egovol@yandex-team.com>2024-03-27 16:22:17 +0300
committeregovol <egovol@yandex-team.com>2024-03-27 16:35:08 +0300
commit7db0665b94eeea164e6f8f5371440821a46d2b5c (patch)
treefb2d513d559ac415a66fce08d97402c9434aaee0
parent3eb96baa49c261fc3c356e2ecd4135a51e86a757 (diff)
downloadydb-7db0665b94eeea164e6f8f5371440821a46d2b5c.tar.gz
Use llvm-lib instead of lib.exe for clang-win target
9c1a51fbc15924d93a0b7008ddc9a60722f08505
-rw-r--r--build/conf/linkers/msvc_linker.conf4
-rw-r--r--build/conf/toolchains/msvc_toolchain.conf4
-rwxr-xr-xbuild/ymake_conf.py13
3 files changed, 18 insertions, 3 deletions
diff --git a/build/conf/linkers/msvc_linker.conf b/build/conf/linkers/msvc_linker.conf
index 5c226298eb..79886b3dc5 100644
--- a/build/conf/linkers/msvc_linker.conf
+++ b/build/conf/linkers/msvc_linker.conf
@@ -117,9 +117,11 @@ LINK_EXTRA_OUTPUT=$_LINK_EXTRA_OUTPUT
LIB_WRAPPER=${FIX_MSVC_OUTPUT} lib
LINK_WRAPPER=${FIX_MSVC_OUTPUT} link
when ($_UNDER_WINE_TOOLS == "yes") {
- LIB_WRAPPER=
LINK_WRAPPER=
}
+when ($_UNDER_WINE_LIB == "yes") {
+ LIB_WRAPPER=
+}
LINK_WRAPPER_DYNLIB=${YMAKE_PYTHON} ${input:"build/scripts/link_dyn_lib.py"} --arch WINDOWS --target $TARGET
diff --git a/build/conf/toolchains/msvc_toolchain.conf b/build/conf/toolchains/msvc_toolchain.conf
index 4e99f3a455..94e0e444f0 100644
--- a/build/conf/toolchains/msvc_toolchain.conf
+++ b/build/conf/toolchains/msvc_toolchain.conf
@@ -11,9 +11,11 @@ _WINE_LIB_PREFIX=
_WINE_MASM_PREFIX=
when ($_UNDER_WINE_TOOLS == "yes") {
_WINE_LINK_PREFIX=${_WINE_CMD} link ${ARCADIA_ROOT} ${ARCADIA_BUILD_ROOT}
- _WINE_LIB_PREFIX=${_WINE_CMD} lib ${ARCADIA_ROOT} ${ARCADIA_BUILD_ROOT}
_WINE_MASM_PREFIX=${_WINE_CMD} masm ${ARCADIA_ROOT} ${ARCADIA_BUILD_ROOT}
}
+when ($_UNDER_WINE_LIB == "yes") {
+ _WINE_LIB_PREFIX=${_WINE_CMD} lib ${ARCADIA_ROOT} ${ARCADIA_BUILD_ROOT}
+}
when ($_UNDER_WINE_COMPILER == "yes") {
_WINE_C_PREFIX=${_WINE_CMD} c ${ARCADIA_ROOT} ${ARCADIA_BUILD_ROOT}
_WINE_CXX_PREFIX=${_WINE_CMD} cxx ${ARCADIA_ROOT} ${ARCADIA_BUILD_ROOT}
diff --git a/build/ymake_conf.py b/build/ymake_conf.py
index 7082e59776..df21e7d47a 100755
--- a/build/ymake_conf.py
+++ b/build/ymake_conf.py
@@ -1793,6 +1793,7 @@ class MSVCToolchainOptions(ToolchainOptions):
self.under_wine_compiler = self.params.get('wine', False)
self.under_wine_tools = not build.host.is_windows
+ 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)
@@ -1865,7 +1866,15 @@ class MSVCToolchainOptions(ToolchainOptions):
self.masm_compiler = win_path_fix(os.path.join(bindir, tools_name, asm_name))
self.link = win_path_fix(os.path.join(bindir, tools_name, 'link.exe'))
- self.lib = win_path_fix(os.path.join(bindir, tools_name, 'lib.exe'))
+
+ if self.use_clang:
+ self.lib = self.host.exe(self.name_marker, "bin", "llvm-lib")
+ self.under_wine_lib = False
+ else:
+ self.lib = win_path_fix(os.path.join(bindir, tools_name, 'lib.exe'))
+ self.under_wine_lib = self.under_wine_tools
+
+ logger.debug("link {}; lib {}".format(self.link, self.lib))
class MSVC(object):
@@ -1905,6 +1914,8 @@ class MSVCToolchain(MSVC, Toolchain):
if self.tc.under_wine_tools:
emit('_UNDER_WINE_TOOLS', 'yes')
+ if self.tc.under_wine_lib:
+ emit('_UNDER_WINE_LIB', 'yes')
if self.tc.under_wine_compiler:
emit('_UNDER_WINE_COMPILER', 'yes')
if self.tc.use_clang: