diff options
author | mikhnenko <mikhnenko@yandex-team.com> | 2024-04-22 19:33:18 +0300 |
---|---|---|
committer | mikhnenko <mikhnenko@yandex-team.com> | 2024-04-22 19:47:40 +0300 |
commit | 1e5b663529d4e8983a4ead666a276dedc58833d6 (patch) | |
tree | 7408f73ef4a9558ac4016c6017bd0dcea21d1b6a /build | |
parent | 6ad5361e45159d8d12fe278dc2c4aab6fa95bc52 (diff) | |
download | ydb-1e5b663529d4e8983a4ead666a276dedc58833d6.tar.gz |
Revert commit rXXXXXX, Use lld-link for target-platform windows, fix arc native build
0bd1ab2bb753fb9458cc5f295e94e24cf1115055
Diffstat (limited to 'build')
-rw-r--r-- | build/conf/linkers/msvc_linker.conf | 20 | ||||
-rw-r--r-- | build/conf/toolchains/msvc_toolchain.conf | 4 | ||||
-rw-r--r-- | build/scripts/generate_win_vfs.py | 31 | ||||
-rw-r--r-- | build/scripts/ya.make | 1 | ||||
-rwxr-xr-x | build/ymake_conf.py | 12 |
5 files changed, 3 insertions, 65 deletions
diff --git a/build/conf/linkers/msvc_linker.conf b/build/conf/linkers/msvc_linker.conf index f10acb71df..79886b3dc5 100644 --- a/build/conf/linkers/msvc_linker.conf +++ b/build/conf/linkers/msvc_linker.conf @@ -106,21 +106,6 @@ OBJADDE_LIB= OBJADDE_LIB_GLOBAL= LINK_EXE_FLAGS=$LINK_EXE_FLAGS_PER_TYPE -LINK_EXE_VFS_FLAGS= -when ($_UNDER_WINE_LINK != "yes") { - LINK_EXE_VFS_FLAGS=/vfsoverlay:${BINDIR}/vfsoverlay.yaml -} -LINK_EXE_FLAGS+=${LINK_EXE_VFS_FLAGS} - -GENERATE_COMMON_LIB_VFS_CMD=\ - ${YMAKE_PYTHON3} ${input:"build/scripts/generate_win_vfs.py"} \ - ${BINDIR} \ - ${_FLAGS_COMMON_LIBPATHS} - -GENERATE_COMMON_LIB_VFS= -when ($_UNDER_WINE_LINK != "yes") { - GENERATE_COMMON_LIB_VFS=${GENERATE_COMMON_LIB_VFS_CMD} -} LINK_IMPLIB=/IMPLIB:${output;noext;rootrel;pre=$MODULE_PREFIX:REALPRJNAME.lib} _LINK_EXTRA_OUTPUT= @@ -131,7 +116,7 @@ LINK_EXTRA_OUTPUT=$_LINK_EXTRA_OUTPUT LIB_WRAPPER=${FIX_MSVC_OUTPUT} lib LINK_WRAPPER=${FIX_MSVC_OUTPUT} link -when ($_UNDER_WINE_LINK == "yes") { +when ($_UNDER_WINE_TOOLS == "yes") { LINK_WRAPPER= } when ($_UNDER_WINE_LIB == "yes") { @@ -171,7 +156,6 @@ _MSVC_SRCS_GLOBALS=\ --ya-start-command-file ${qe;rootrel;ext=.obj:SRCS_GLOBAL} --ya-end-command-file REAL_LINK_DYN_LIB_CMDLINE=\ - ${GENERATE_COMMON_LIB_VFS} && \ ${TOOLCHAIN_ENV} \ ${cwd:ARCADIA_BUILD_ROOT} \ ${LINK_WRAPPER} \ @@ -214,7 +198,6 @@ LINK_EXE_CMDLINE=\ ${GENERATE_MF} && \ ${_GENERATE_EXTRA_OBJS} && \ $GENERATE_VCS_C_INFO_NODEP && \ - ${GENERATE_COMMON_LIB_VFS} && \ ${TOOLCHAIN_ENV} \ ${cwd:ARCADIA_BUILD_ROOT} \ ${LINK_WRAPPER} \ @@ -244,7 +227,6 @@ LINK_DYN_LIB=${GENERATE_MF} && $GENERATE_VCS_C_INFO_NODEP && $REAL_LINK_DYN_LIB LINK_EXEC_DYN_LIB_CMDLINE=\ ${GENERATE_MF} && \ $GENERATE_VCS_C_INFO_NODEP && \ - ${GENERATE_COMMON_LIB_VFS} && \ ${TOOLCHAIN_ENV} \ ${cwd:ARCADIA_BUILD_ROOT} \ ${LINK_WRAPPER} \ diff --git a/build/conf/toolchains/msvc_toolchain.conf b/build/conf/toolchains/msvc_toolchain.conf index ce99c84089..94e0e444f0 100644 --- a/build/conf/toolchains/msvc_toolchain.conf +++ b/build/conf/toolchains/msvc_toolchain.conf @@ -10,10 +10,8 @@ _WINE_LINK_PREFIX= _WINE_LIB_PREFIX= _WINE_MASM_PREFIX= when ($_UNDER_WINE_TOOLS == "yes") { - _WINE_MASM_PREFIX=${_WINE_CMD} masm ${ARCADIA_ROOT} ${ARCADIA_BUILD_ROOT} -} -when ($_UNDER_WINE_LINK == "yes") { _WINE_LINK_PREFIX=${_WINE_CMD} link ${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} diff --git a/build/scripts/generate_win_vfs.py b/build/scripts/generate_win_vfs.py deleted file mode 100644 index b6635aee7d..0000000000 --- a/build/scripts/generate_win_vfs.py +++ /dev/null @@ -1,31 +0,0 @@ -import json -import os -import sys - - -def make_vfsoverlay(bin_dir, args): - # args - list of paths in format: '/LIBPATH:"path_to_dir"' - libpaths = [path[len('/LIBPATH:"'):-1] for path in args] - overlay = { - "version": 0, - "case-sensitive": "false", - "roots": [] - } - for dir in libpaths: - for file in os.listdir(dir): - path_to_file = os.path.join(dir, file) - root = { - "type": "file", - "name": path_to_file, - "external-contents": path_to_file - } - overlay["roots"].append(root) - - with open(os.path.join(bin_dir, "vfsoverlay.yaml"), "w") as f: - json.dump(overlay, f) - - -if __name__ == '__main__': - bin_dir = sys.argv[1] - args = sys.argv[2:] - make_vfsoverlay(bin_dir, args) diff --git a/build/scripts/ya.make b/build/scripts/ya.make index d7e2411e72..c5e310d387 100644 --- a/build/scripts/ya.make +++ b/build/scripts/ya.make @@ -86,7 +86,6 @@ ELSEIF (PY3) gen_yql_python_udf.py generate_mf.py generate_pom.py - generate_win_vfs.py go_proto_wrapper.py java_pack_to_file.py jni_swig.py diff --git a/build/ymake_conf.py b/build/ymake_conf.py index 4a6ec60f05..e06439b484 100755 --- a/build/ymake_conf.py +++ b/build/ymake_conf.py @@ -1796,12 +1796,10 @@ class MSVCToolchainOptions(ToolchainOptions): self.under_wine_compiler = self.params.get('wine', False) self.under_wine_tools = not build.host.is_windows - 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 @@ -1870,13 +1868,7 @@ class MSVCToolchainOptions(ToolchainOptions): ]) self.masm_compiler = win_path_fix(os.path.join(bindir, tools_name, asm_name)) - - if self.use_clang and not self.use_msvc_linker: - self.link = self.host.exe(self.name_marker, "bin", "lld-link") - self.under_wine_link = False - else: - self.link = win_path_fix(os.path.join(bindir, tools_name, 'link.exe')) - self.under_wine_link = self.under_wine_tools + self.link = win_path_fix(os.path.join(bindir, tools_name, 'link.exe')) if self.use_clang: self.lib = self.host.exe(self.name_marker, "bin", "llvm-lib") @@ -1925,8 +1917,6 @@ class MSVCToolchain(MSVC, Toolchain): if self.tc.under_wine_tools: emit('_UNDER_WINE_TOOLS', 'yes') - if self.tc.under_wine_link: - emit('_UNDER_WINE_LINK', 'yes') if self.tc.under_wine_lib: emit('_UNDER_WINE_LIB', 'yes') if self.tc.under_wine_compiler: |