diff options
author | shokhor <shokhor@yandex-team.com> | 2023-10-16 22:02:29 +0300 |
---|---|---|
committer | shokhor <shokhor@yandex-team.com> | 2023-10-16 22:26:25 +0300 |
commit | 8fc2cb092687030d0a554c8d695b6e7bab713413 (patch) | |
tree | e715987b71b638ea079e8c4da1542ed6c5f27b2c | |
parent | 23b4cd86157da8b9f0f8acd5ef46acfab39669db (diff) | |
download | ydb-8fc2cb092687030d0a554c8d695b6e7bab713413.tar.gz |
Exclude libiconv and dictutil unicode at compile time for iOs/Android targets
Put libiconv under a build-time flag to optionally replace library with mock implementation
Цель:
- выпилить libiconv в мобильных билдах
Что проверено:
- клавиатура
- мобильный переводчик: проверено с помощью ```$ARCADIA/dict/mt/make/tools/eval_nmt/eval_nmt --mobile <direction>``` с флагами компиляции, отключающими libiconv/dictutil.
Проверены направления:
- en-ru/ru-en
- en-tr/tr-en
- en-da/da-en
- en-el/el-en
- en-lt/lt-en
- en-uk/uk-en
- en-it/it-en
- en-pt/pt-en
- en-sk/sk-en
- en-sv/sv-en
- en-lv/lv-en
- en-es/es-en
- en-nl/nl-en
- en-fi/fi-en
- en-de/de-en
- en-cs/cs-en
- en-no/no-en
- en-fr/fr-en
###########
- en-ar/ar-en
- en-he/he-en
- en-ja
- en-th
- en-zh/zh-en
Результаты совпадают с https://wiki.yandex-team.ru/users/dimdi-y/mobilnye-modeli/
Что еще затронуто:
- все проекты под iOs/Android
-rw-r--r-- | library/cpp/charset/CMakeLists.darwin-x86_64.txt | 2 | ||||
-rw-r--r-- | library/cpp/charset/CMakeLists.linux-aarch64.txt | 2 | ||||
-rw-r--r-- | library/cpp/charset/CMakeLists.linux-x86_64.txt | 2 | ||||
-rw-r--r-- | library/cpp/charset/CMakeLists.windows-x86_64.txt | 2 | ||||
-rw-r--r-- | library/cpp/charset/ya.make | 15 |
5 files changed, 17 insertions, 6 deletions
diff --git a/library/cpp/charset/CMakeLists.darwin-x86_64.txt b/library/cpp/charset/CMakeLists.darwin-x86_64.txt index 04a8e24de1..cade4ef3cd 100644 --- a/library/cpp/charset/CMakeLists.darwin-x86_64.txt +++ b/library/cpp/charset/CMakeLists.darwin-x86_64.txt @@ -16,6 +16,6 @@ target_link_libraries(library-cpp-charset PUBLIC ) target_sources(library-cpp-charset PRIVATE ${CMAKE_SOURCE_DIR}/library/cpp/charset/decodeunknownplane.cpp - ${CMAKE_SOURCE_DIR}/library/cpp/charset/iconv.cpp ${CMAKE_SOURCE_DIR}/library/cpp/charset/wide.cpp + ${CMAKE_SOURCE_DIR}/library/cpp/charset/iconv.cpp ) diff --git a/library/cpp/charset/CMakeLists.linux-aarch64.txt b/library/cpp/charset/CMakeLists.linux-aarch64.txt index 9d456b690b..63f8766de9 100644 --- a/library/cpp/charset/CMakeLists.linux-aarch64.txt +++ b/library/cpp/charset/CMakeLists.linux-aarch64.txt @@ -17,6 +17,6 @@ target_link_libraries(library-cpp-charset PUBLIC ) target_sources(library-cpp-charset PRIVATE ${CMAKE_SOURCE_DIR}/library/cpp/charset/decodeunknownplane.cpp - ${CMAKE_SOURCE_DIR}/library/cpp/charset/iconv.cpp ${CMAKE_SOURCE_DIR}/library/cpp/charset/wide.cpp + ${CMAKE_SOURCE_DIR}/library/cpp/charset/iconv.cpp ) diff --git a/library/cpp/charset/CMakeLists.linux-x86_64.txt b/library/cpp/charset/CMakeLists.linux-x86_64.txt index 9d456b690b..63f8766de9 100644 --- a/library/cpp/charset/CMakeLists.linux-x86_64.txt +++ b/library/cpp/charset/CMakeLists.linux-x86_64.txt @@ -17,6 +17,6 @@ target_link_libraries(library-cpp-charset PUBLIC ) target_sources(library-cpp-charset PRIVATE ${CMAKE_SOURCE_DIR}/library/cpp/charset/decodeunknownplane.cpp - ${CMAKE_SOURCE_DIR}/library/cpp/charset/iconv.cpp ${CMAKE_SOURCE_DIR}/library/cpp/charset/wide.cpp + ${CMAKE_SOURCE_DIR}/library/cpp/charset/iconv.cpp ) diff --git a/library/cpp/charset/CMakeLists.windows-x86_64.txt b/library/cpp/charset/CMakeLists.windows-x86_64.txt index 3756311ac1..951a43b812 100644 --- a/library/cpp/charset/CMakeLists.windows-x86_64.txt +++ b/library/cpp/charset/CMakeLists.windows-x86_64.txt @@ -18,6 +18,6 @@ target_link_libraries(library-cpp-charset PUBLIC ) target_sources(library-cpp-charset PRIVATE ${CMAKE_SOURCE_DIR}/library/cpp/charset/decodeunknownplane.cpp - ${CMAKE_SOURCE_DIR}/library/cpp/charset/iconv.cpp ${CMAKE_SOURCE_DIR}/library/cpp/charset/wide.cpp + ${CMAKE_SOURCE_DIR}/library/cpp/charset/iconv.cpp ) diff --git a/library/cpp/charset/ya.make b/library/cpp/charset/ya.make index 6a52da56bb..6c03d98450 100644 --- a/library/cpp/charset/ya.make +++ b/library/cpp/charset/ya.make @@ -6,7 +6,6 @@ ENDIF() SRCS( decodeunknownplane.cpp - iconv.cpp recyr.hh recyr_int.hh wide.cpp @@ -14,9 +13,21 @@ SRCS( PEERDIR( library/cpp/charset/lite - contrib/libs/libiconv ) +IF (OS_ANDROID OR OS_IOS OR LIBRARY_CHARSET_WITHOUT_LIBICONV) + SRCS( + iconv_mock.cpp + ) +ELSE() + SRCS( + iconv.cpp + ) + PEERDIR( + contrib/libs/libiconv + ) +ENDIF() + END() RECURSE_FOR_TESTS( |