diff options
author | spreis <spreis@yandex-team.com> | 2024-06-25 23:28:34 +0300 |
---|---|---|
committer | spreis <spreis@yandex-team.com> | 2024-06-25 23:39:09 +0300 |
commit | 3ec1e3083ec1a163f9d4667fbf1e88c5267ba6bd (patch) | |
tree | 54afd58383cdc664ad93439536680f8ed511d4cb | |
parent | 3cbbbe56c16926b31ea1dbfbb784f8cc9fdb533e (diff) | |
download | ydb-3ec1e3083ec1a163f9d4667fbf1e88c5267ba6bd.tar.gz |
Use same wine peerdir on Windows target regardless of host - take 2
This PR contains following changes:
1. Unconditional PEERDIR to wine for Windows-targeted builds. This is proven to align UIDs in cross and native builds on Windows for the vast majority of build nodes (.asm built by ml tool and its dependants are the only notable exceptions as of now)
2. Wine is made host platform resource bundle. This more precisely reflects the nature of tools and allows per-host resource selection without effect on UIDs.
3. Wine description is modernized to by-platform json and shared between ya,conf.json and ya.make
4. Separate archive added fpr Windows host to avoid unpacking issues of original archive caused by symlinks in it. This is needed because due totest now getting all transitive resources of their build and try to deliver these resources even though they are unused. In initial experiments this caused tests failures on native Windows in attempts to unpack wine.
5. Brief description of wine resource peculiarities is added.
6. Wine tool reference is fixed in build commands. The resource ID was hardcoded in wine command prefix which is plainly incorrect.
Upon fixingwindows resources may be excluded from JSONs leaving only one platform.
229fbec4453ead9c669bd0ec505a7ba8e5f117fb
-rw-r--r-- | build/conf/toolchains/msvc_toolchain.conf | 2 | ||||
-rw-r--r-- | build/platform/wine/readme.md | 3 | ||||
-rw-r--r-- | build/platform/wine/wine.json | 10 | ||||
-rw-r--r-- | build/platform/wine/wine32.json | 10 | ||||
-rw-r--r-- | build/platform/wine/ya.make | 5 | ||||
-rwxr-xr-x | build/ymake_conf.py | 3 |
6 files changed, 27 insertions, 6 deletions
diff --git a/build/conf/toolchains/msvc_toolchain.conf b/build/conf/toolchains/msvc_toolchain.conf index ce99c84089..5ddb9f3be2 100644 --- a/build/conf/toolchains/msvc_toolchain.conf +++ b/build/conf/toolchains/msvc_toolchain.conf @@ -2,7 +2,7 @@ # для любых платформ. Нужно унифицировать с GnuToolchain. C_FLAGS_PLATFORM= -_WINE_CMD=${YMAKE_PYTHON} ${input:"build/scripts/run_msvc_wine.py"} ${hide;input:"build/scripts/process_command_files.py"} ${hide;input:"build/scripts/process_whole_archive_option.py"} $(WINE_TOOL-sbr:1093314933)/bin/wine64 -v140 ${env:"WINEPREFIX_SUFFIX=4.0"} +_WINE_CMD=${YMAKE_PYTHON} ${input:"build/scripts/run_msvc_wine.py"} ${hide;input:"build/scripts/process_command_files.py"} ${hide;input:"build/scripts/process_whole_archive_option.py"} ${WINE_TOOL_RESOURCE_GLOBAL}/bin/wine64 -v140 ${env:"WINEPREFIX_SUFFIX=4.0"} _WINE_C_PREFIX= _WINE_CXX_PREFIX= diff --git a/build/platform/wine/readme.md b/build/platform/wine/readme.md new file mode 100644 index 0000000000..28a80e07a2 --- /dev/null +++ b/build/platform/wine/readme.md @@ -0,0 +1,3 @@ +## These are resources of wine (Windows execution layer for Linux) +- wine32.json and wine.json describe wine for 32bit (i686) and 64bit (x86_64) tests. It is unclear why separate packages are needed. As of now this is hard-coded in ya-bin even though both resources contain wine (32bit) and wine64 (64bit) binaries. Build uses only latter since 32bit host platform is not supported, tests however use target platform to determine wine flavor to be used and so may use both. +- JSON's also contain resource for Windows host platform. It is just archive with empty directory needed to unify wine tool description among all platforms supporting Windows-targeted builds. This resource will never be actually used but as of now may be downloaded by tests due to deficiecy of implementation (YA-789). Just preserve these resources as they are upon wine updates. diff --git a/build/platform/wine/wine.json b/build/platform/wine/wine.json new file mode 100644 index 0000000000..c2d3a76281 --- /dev/null +++ b/build/platform/wine/wine.json @@ -0,0 +1,10 @@ +{ + "by_platform": { + "linux-x86_64": { + "uri": "sbr:1093314933" + }, + "win32-x86_64": { + "uri": "sbr:6566731101" + } + } +} diff --git a/build/platform/wine/wine32.json b/build/platform/wine/wine32.json new file mode 100644 index 0000000000..5224054a72 --- /dev/null +++ b/build/platform/wine/wine32.json @@ -0,0 +1,10 @@ +{ + "by_platform": { + "linux-x86_64": { + "uri": "sbr:2264052281" + }, + "win32-x86_64": { + "uri": "sbr:6566731101" + } + } +} diff --git a/build/platform/wine/ya.make b/build/platform/wine/ya.make index 9fc1515e9c..148555e524 100644 --- a/build/platform/wine/ya.make +++ b/build/platform/wine/ya.make @@ -1,8 +1,7 @@ RESOURCES_LIBRARY() -# do not forget to update resources in ya.conf.json -DECLARE_EXTERNAL_RESOURCE(WINE_TOOL sbr:1093314933) -DECLARE_EXTERNAL_RESOURCE(WINE32_TOOL sbr:2264052281) +DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE_BY_JSON(WINE_TOOL wine.json) +DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE_BY_JSON(WINE32_TOOL wine32.json) SET(NEED_PLATFORM_PEERDIRS no) END() diff --git a/build/ymake_conf.py b/build/ymake_conf.py index be7a776826..14d3a48a70 100755 --- a/build/ymake_conf.py +++ b/build/ymake_conf.py @@ -1926,8 +1926,7 @@ class MSVCToolchain(MSVC, Toolchain): if self.tc.from_arcadia and not self.tc.ide_msvs: self.platform_projects.append('build/internal/platform/msvc') - if tc.under_wine_compiler or tc.under_wine_tools: - self.platform_projects.append('build/platform/wine') + self.platform_projects.append('build/platform/wine') def print_toolchain(self): super(MSVCToolchain, self).print_toolchain() |