{"id":495807,"date":"2026-09-23T16:52:03","date_gmt":"2026-09-23T16:52:03","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=495807"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=495807","title":{"rendered":"\u041a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043f\u043e\u0434 \u0430\u043d\u0434\u0440\u043e\u0438\u0434 \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 cmake add_subdirectory \u0438 \u0441\u0431\u043e\u0440\u043a\u0443 \u0447\u0435\u0440\u0435\u0437 Gradle \u0434\u043b\u044f \u043a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0441\u0438\u0448\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043f\u043e\u0434 \u0430\u043d\u0434\u0440\u043e\u0438\u0434. \u041c\u044b \u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0438 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u0438\u0441\u0442\u0435\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u044e\u0431\u044b\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c \u043d\u0430\u0439\u0442\u0438 \u0441\u0432\u043e\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0435\u0437 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u0441\u0442\u044b\u043b\u0435\u0439 \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<h3>\u041a\u0440\u0430\u0442\u043a\u043e \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f<\/h3>\n<p>\u0421\u0431\u043e\u0440\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043f\u043e\u0434 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043e\u0442 \u0442\u043e\u0439, \u0433\u0434\u0435 \u0432\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435.<\/p>\n<h3>\u041e\u0431\u0449\u0438\u0439 \u043f\u043b\u0430\u043d<\/h3>\n<p>\u0412 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0432\u0430\u043c \u043c\u043e\u0433\u043b\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c\u0441\u044f CC=gcc \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0442\u0430\u043a\u043e\u0435. \u0422\u0430\u043a \u0432\u043e\u0442, \u043f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0449\u044c \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0434\u0435\u043b\u0430\u044e\u0442 \u043f\u0440\u0438 \u043b\u044e\u0431\u044b\u0445 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f\u0445 &#8212; \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 environment \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0438\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0434\u043b\u044f ndk \u0442\u0443\u043b\u0447\u0435\u0439\u043d\u0430, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432. \u0422\u0443\u043b\u0447\u0435\u0439\u043d\u043e\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430\u0431\u043e\u0440 \u0443\u0442\u0438\u043b\u0438\u0442 \u0438 \u043f\u0440\u0435\u0434\u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u043e\u0434 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0430\u0440\u0445\u0438\u0432 \u0441 NDK, \u0433\u0434\u0435 \u043b\u0435\u0436\u0430\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b, \u043e\u0431\u0435\u0440\u0442\u043a\u0438, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 &#8212; \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0442\u0443\u043b\u0447\u0435\u0439\u043d\u043e\u043c.<\/p>\n<p>\u0412\u0442\u043e\u0440\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0441\u0434\u0435\u043b\u0430\u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 \u0441\u0435\u043a\u0446\u0438\u0438, \u0434\u043b\u044f autoconf, cmake, meson, rust.<\/p>\n<p>\u0417\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043d\u0430\u0448\u0438\u043c\u0438 \u0442\u0440\u0443\u0434\u0430\u043c\u0438 \u0447\u0442\u043e\u0431\u044b \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c.<\/p>\n<h3>\u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/h3>\n<p>\u041e\u0442 \u0432\u0430\u0441 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Android SDK \u0438 \u0447\u0435\u0440\u0435\u0437 sdkmanager \u0438\u043b\u0438 \u0435\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Android NDK, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0447\u0442\u043e $ANDROID_HOME \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 Android SDK. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043b\u044e\u0431\u044b\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0434\u043b\u044f \u0432\u0430\u0441 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u044f \u043f\u0438\u0441\u0430\u043b \u043e\u0431 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 SDK \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 sdkmanager \u0447\u0435\u0440\u0435\u0437 mise \u0432 \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habr.com\/ru\/articles\/1058494\/\" rel=\"noopener nofollow\">https:\/\/habr.com\/ru\/articles\/1058494\/<\/a> , \u0442\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c sdkmanager \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 ndk. \u0427\u0435\u0441\u0442\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c &#8212; \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u044d\u0442\u043e \u0432\u0441\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0434\u0430\u0442\u044c \u043d\u0435 \u043c\u043e\u0433\u0443, \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c <code>curl something | sh<\/code> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442, \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u0442 \u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 ANDROID_HOME, \u043d\u043e \u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435 \u043d\u0430\u0448\u0435\u043b.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043e\u043f\u043e\u0440\u044b, \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a\u0438\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0443 \u043c\u0435\u043d\u044f \u043b\u0435\u0436\u0430\u0442 \u0432 $ANDROID_HOME:<\/p>\n<pre><code>c-android-utils HEAD \u276f ls $ANDROID_HOMEcmdline-toolslicensesndkplatform-tools<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u0428\u0430\u0433 0. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u0443\u0442\u0438 \u043a NDK<\/h3>\n<p>NDK &#8212; \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0432 \u043f\u043b\u0430\u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0443\u0442\u0435\u0439. \u0412\u043e\u0442 \u043a\u0430\u043a \u044f \u0440\u0435\u0448\u0430\u044e \u0435\u0435:<\/p>\n<pre><code>_ndk_ver=\"$(for _ndk_cand in \"$ANDROID_HOME\/ndk\"\/*; do  [ -d \"$_ndk_cand\" ] || continue  printf '%s\\n' \"${_ndk_cand##*\/}\"done | sort -V | tail -1)\"[ -n \"$_ndk_ver\" ] || { echo \"\u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 $ANDROID_HOME\/ndk \u043d\u0435\u0442 \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 NDK\" &gt;&amp;2; return 1 2&gt;\/dev\/null || exit 1; }export NDK=\"$ANDROID_HOME\/ndk\/$_ndk_ver\"unset _ndk_ver _ndk_cand<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0413\u043b\u043e\u0431 <code>\"$ANDROID_HOME\/ndk\"\/*<\/code> \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u0430\u043c \u0448\u0435\u043b\u043b \u0438 \u043e\u0442\u0434\u0430\u0451\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u043d\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432 (\u0444\u0430\u0439\u043b\u044b \u043e\u0442\u0441\u0435\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 <code>-d<\/code>), sort \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e-\u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438 (<code>-V<\/code> \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0438 <code>27.0.0<\/code>, \u0438 <code>28.2.13676358<\/code>), tail \u043e\u0442\u043a\u0443\u0441\u0438\u0442 \u0441\u0430\u043c\u0443\u044e \u0441\u0432\u0435\u0436\u0443\u044e \u2014 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f NDK \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441 \u0441\u0430\u043c\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 NDK. \u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0442\u0443\u0442 <code>ls<\/code>: \u0443 \u043c\u043d\u043e\u0433\u0438\u0445 <code>ls<\/code> \u043f\u043e\u0434\u043c\u0435\u043d\u0451\u043d \u0430\u043b\u0438\u0430\u0441\u043e\u043c \u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0432\u0440\u043e\u0434\u0435 eza \u0441 \u0438\u043a\u043e\u043d\u043a\u0430\u043c\u0438, \u0446\u0432\u0435\u0442\u0430\u043c\u0438 \u0438 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u2014 \u0442\u0430\u043a\u043e\u0439 \u0432\u044b\u0432\u043e\u0434 \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f, \u043e\u043d \u0440\u0430\u0437\u0432\u0430\u043b\u0438\u0442\u0441\u044f. \u0410 \u0431\u0435\u0437 <code>ls<\/code> \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0430\u043b\u0438\u0430\u0441 \u043d\u0435 \u0441\u0442\u0440\u0430\u0448\u0435\u043d: <code>ls<\/code> \u0442\u0443\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0443\u0436\u0435 \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e $ANDROID_HOME! \u0411\u0435\u0437 \u043d\u0435\u0435 \u0443\u0436\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u0435 \u0432\u0441\u0435 \u043f\u043e\u0439\u0434\u0435\u0442 \u043d\u0435 \u043f\u043e \u043f\u043b\u0430\u043d\u0443. \u0415\u0441\u043b\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 <code>ndk<\/code> \u043f\u0443\u0441\u0442, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u0432\u043c\u0435\u0441\u0442\u043e \u043c\u043e\u043b\u0447\u0430\u043b\u0438\u0432\u043e\u0433\u043e \u0431\u0438\u0442\u043e\u0433\u043e \u043f\u0443\u0442\u0438.<\/p>\n<p>\u043e\u0442 NDK \u0443\u0436\u0435 \u0434\u043e\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u043a \u0435\u0433\u043e \u0442\u0443\u043b\u0447\u0435\u0439\u043d\u0443:<\/p>\n<pre><code>export TOOLCHAIN=\"$NDK\/toolchains\/llvm\/prebuilt\/linux-x86_64\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435 linux x86_64 \u043a\u0430\u043a \u0443 \u043c\u0435\u043d\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435, \u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0432 \u044d\u0442\u043e\u043c \u043f\u0443\u0442\u0438 \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f, \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0435 \u043f\u0443\u0442\u0438, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0438 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0437 \u0442\u0443\u043b\u0447\u0435\u0439\u043d\u0430 \u0432 PATH:<\/p>\n<pre><code>export PATH=\"$TOOLCHAIN\/bin:$PATH\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0435 <code>ls $TOOLCHAIN\/bin<\/code> \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043c\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u0446\u0435\u043b\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 aarch64-linux-android21-clang &#8212; \u044d\u0442\u043e \u0421-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 clang \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u043e\u0434 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 android \u0441 api level 21 (\u0438 \u0432\u044b\u0448\u0435, \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0434\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438) \u043f\u043e\u0434 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 aarch64 . \u0414\u0440\u0443\u0433\u0438\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0432\u0440\u043e\u0434\u0435 llvm-nm, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0438 api level, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043d\u0438\u0445 \u043d\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u0435\u0440\u0442\u043e\u043a \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430\u043c\u0438.<\/p>\n<h3>\u0428\u0430\u0433 1. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/h3>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e, \u0438 \u0435\u0441\u043b\u0438 \u0431\u044b \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b \u0441\u043f\u0438\u0441\u043e\u043a, \u043a\u0430\u043a\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043a\u0430\u043a \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c &#8212; \u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0443\u043d\u044b\u043b\u043e, \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0431\u044b \u044d\u0442\u043e \u043e\u0441\u043e\u0431\u043e \u043d\u0435 \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u043b\u043e, \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0443\u0445\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0442 \u0442\u0443\u0442 <a href=\"https:\/\/docs.conan.io\/en\/1.19\/systems_cross_building\/cross_building.html\" rel=\"noopener nofollow\">https:\/\/docs.conan.io\/en\/1.19\/systems_cross_building\/cross_building.html<\/a> . \u042f \u0436\u0435 \u043f\u043e\u0439\u0434\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0438 \u0431\u0443\u0434\u0443 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043c\u043e\u0433\u0443.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u043e\u0435\u0445\u0430\u043b\u0438.<\/p>\n<h4>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u0443\u0436\u043d\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b. \u041e\u0431\u044b\u0447\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0434\u043b\u044f \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0432\u0440\u043e\u0434\u0435 \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a\u0430 \u0438 \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043a\u0440\u043e\u043c\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043e\u0434\u043d\u0430\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0435, \u043a\u0442\u043e \u0437\u043d\u0430\u0435\u0442 \u043a\u0430\u043a\u043e\u0439 \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a \u0432\u0430\u043c \u043d\u0443\u0436\u0435\u043d?<\/p>\n<p>\u0422\u0430\u043a \u0447\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0447\u0442\u043e \u0432 \u0442\u0443\u043b\u0447\u0435\u0439\u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438\u0433\u0440\u0430\u0435\u0442 \u0440\u043e\u043b\u044c \u0441\u0431\u043e\u0440\u043a\u0438 \u0444\u0430\u0439\u043b\u0430 .c \u0438\u043b\u0438 .cpp \u0432 .o \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u0431\u043e\u043b\u0435\u0435:<\/p>\n<pre><code>export CC=\"aarch64-linux-android21-clang\"export CXX=\"aarch64-linux-android21-clang++\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u0410\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440<\/h4>\n<p>\u0410\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440 \u0443\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u0448 .o \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 .a (\u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0432\u044f\u0437\u0435\u0439 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 \u0442\u0443\u0442 \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0430)<\/p>\n<pre><code>export AR=\"llvm-ar\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u0418\u043d\u0434\u0435\u043a\u0441\u0430\u0442\u043e\u0440 \u0430\u0440\u0445\u0438\u0432\u043e\u0432<\/h4>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0442\u043e\u0440\u0430 &#8212; \u0432\u0437\u044f\u0442\u044c \u043d\u0430\u0448 \u0430\u0440\u0445\u0438\u0432 .a, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u0432 \u043d\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u044d\u0442\u0438\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438 \u0434\u043e\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0442 .a . \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043d\u0435\u043c\u0443 \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432 \u043d\u0430\u0448\u0438\u0445 .a<\/p>\n<pre><code>export RANLIB=\"llvm-ranlib\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u041b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a<\/h4>\n<p>\u041b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a \u0432\u0430\u0448 .o \u0438\u043b\u0438 .a \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u0442 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a \u0438\u043b\u0438 .so \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u0412\u043e\u0442 \u043e\u043d \u0443\u0436\u0435 \u0438\u0449\u0435\u0442 \u043f\u043e \u043b\u0438\u043d\u043a\u0443\u0435\u043c\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c \u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f, \u043a\u0430\u043a\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0435\u0441\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043d\u0443\u0436\u043d\u044b, \u043a\u0430\u043a\u0438\u0445 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442. \u041f\u043e\u043c\u0438\u043c\u043e \u0441\u043a\u043b\u0435\u0439\u043a\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u043e\u0434\u0438\u043d \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0431\u043b\u043e\u0431, \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0438 \u0441 \u043d\u0443\u0436\u043d\u043e\u0439 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u044f\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 ffi.<\/p>\n<pre><code>export LD=\"ld.lld\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u0410\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440<\/h4>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435 \u043f\u0440\u0438\u0447\u0435\u043c \u0442\u043e\u0442 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443 LLVM &#8212; llvm-as &#8212; \u044d\u0442\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435 \u0442\u043e \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u044d\u0442\u0430 \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0447\u0438\u0442\u0430\u0435\u0442 llvm-\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0439 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 .ll \u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0435\u0433\u043e \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 .bc, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0442\u043e\u043c \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 opt \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0438 \u043f\u043e\u0442\u043e\u043c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 llc -march=aarch64 \u043c\u044b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u044d\u0442\u043e\u0442 \u0441\u0443\u043f\u0435\u0440\u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 LLVM \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u0432 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 .S \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u0434\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0422\u0430\u043a \u0432\u043e\u0442, \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 &#8212; \u044d\u0442\u043e \u0442\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u044c\u043c\u0435\u0442 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 .S \u0438\u043b\u0438 .s \u0438 \u0441\u043e\u0431\u0435\u0440\u0435\u0442 \u0435\u0433\u043e \u0432 .o . \u0418 \u0432 LLVM \u044d\u0442\u0438\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0442\u043e? clang. \u0422\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u0438, \u0434\u0430.<\/p>\n<pre><code>export AS=\"$CC\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>Strip<\/h4>\n<p>strip &#8212; \u044d\u0442\u043e \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0434\u043b\u044f \u0432\u044b\u0440\u0435\u0437\u0430\u043d\u0438\u044f \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438\u0437 .so, .a \u0438\u043b\u0438 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0430. \u041d\u0435 \u0441\u043c\u043e\u0433 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438, \u043d\u0435 \u043f\u0440\u0438\u043f\u043e\u043c\u043d\u044e \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u0440\u043c\u0438\u043d \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b<\/p>\n<pre><code>export STRIP=\"llvm-strip\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>ObjCopy<\/h4>\n<p>objcopy &#8212; \u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 strip, \u043f\u043e\u043c\u0438\u043c\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0445 \u0441\u0435\u043a\u0446\u0438\u0439 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\/\u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0438\u043d\u044b\u0435 \u0441\u0435\u043a\u0446\u0438\u0438 \u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e .so\/.a\/.exe<\/p>\n<pre><code>export OBJCOPY=\"llvm-objcopy\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>ReadELF<\/h4>\n<p>\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430. \u0427\u0438\u0442\u0430\u043b\u043a\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0438 .so-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<pre><code>export READELF=\"llvm-readelf\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>NM<\/h4>\n<p>\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430, \u0434\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 defined\/undefined \u0432 .o\/.a\/.so. \u0411\u044b\u0441\u0442\u0440\u0430\u044f \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0438 undefined reference.<\/p>\n<pre><code>export NM=\"llvm-nm\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>ObjDump<\/h4>\n<p>\u0414\u0438\u0437\u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440, \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u0442\u0430\u043c \u0432 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435 \u044d\u0442\u043e\u0433\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0430, \u0447\u0435\u0433\u043e \u043d\u0430\u0432\u0435\u0440\u0442\u0435\u043b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u0438, \u0447\u0442\u043e \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0432 \u0438\u0442\u043e\u0433\u0435. \u0414\u0438\u0437\u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u044f \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0438\u043d\u0433\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<pre><code>export OBJDUMP=\"llvm-objdump\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>SYSROOT<\/h4>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u043c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438 \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u043c\u0438 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0443\u0436\u0435 \u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c! SYSROOT \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0438 \u043f\u0440\u0435\u0434\u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432\u0440\u043e\u0434\u0435 crt \u0438\u043b\u0438 libc, NDK \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 SYSROOT:<\/p>\n<pre><code>export SYSROOT=\"$TOOLCHAIN\/sysroot\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>PREFIX<\/h4>\n<p>\u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f, \u0442\u0443\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0442\u0430\u043c \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u0422\u0430\u043a \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0441\u0435\u0431\u0435 \u0433\u0434\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0443\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f prefix-aarch64-android21:<\/p>\n<pre><code>mkdir -p prefix-aarch64-android21export PREFIX=\"$PWD\/prefix-aarch64-android21\" # \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b \u0432\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0438 \u043f\u043e\u0434 windows, \u0432\u0430\u043c \u0431\u044b \u0435\u0449\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0430\u0441\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f WINDRES, \u044d\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 windows-\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 .rc, \u043e\u0431\u044b\u0447\u043d\u043e \u043e\u043d \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0442\u0443\u043b\u0447\u0435\u0439\u043d\u0430\u043c\u0438 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f llvm-rc<\/p>\n<h4>CFLAGS, CXXFLAGS<\/h4>\n<p>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u0434\u043b\u044f \u0443\u0442\u0438\u043b\u0438\u0442. CFLAGS &#8212; \u044d\u0442\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b \u0441\u0438\u0448\u043d\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443. CXXFLAGS &#8212; \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0421++. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u0447\u0442\u043e\u0431 \u0438\u0441\u043a\u0430\u043b \u0432 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0435 \u0438 \u0432 sysroot \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0434\u0435\u0444\u0430\u0439\u043d\u0430\u043c\u0438 ANDROID, \u0430 \u0446\u0435\u043b\u0435\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0430\u043f\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u043d\u0430\u043c\u0438 \u043e\u0431\u0435\u0440\u0442\u043a\u0430.<\/p>\n<pre><code>export CFLAGS=\"-O2 -fPIC -I$PREFIX\/include -DANDROID -isystem $SYSROOT\/usr\/include\"export CXXFLAGS=\"-O2 -fPIC -I$PREFIX\/include -DANDROID -isystem $SYSROOT\/usr\/include\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u041f\u0440\u043e CPPFLAGS<\/h4>\n<p>CPPFLAGS &#8212; \u044d\u0442\u043e \u0444\u043b\u0430\u0433\u0438 \u0434\u043b\u044f \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 #include, #define, \u0443\u0441\u043b\u043e\u0432\u043d\u0443\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0438 \u043f\u0440\u043e\u0447\u0435\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435, \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u043c\u0443 \u043d\u0443\u0436\u043d\u044b \u0444\u043b\u0430\u0433\u0438 -I -D \u0438 \u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435, \u0430 \u0432\u043e \u0444\u043b\u0430\u0433\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442 -O2 -fPIC \u0438 \u043f\u0440\u043e\u0447\u0435\u0435 \u0442\u0430\u043a\u043e\u0435, \u043d\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443 \u043c\u0435\u043d\u044f \u0438 \u0442\u0430\u043a \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0435\u0433\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c.<\/p>\n<h4>LDFLAGS<\/h4>\n<p>\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a\u0430. \u201c-Wl,\u201d \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0442\u043e \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0432 \u043b\u0438\u043d\u043a\u0435\u0440, \u0442\u0430\u043a\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u0438\u0434\u0438\u043c\u043e \u043d\u0443\u0436\u0435\u043d \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043b\u0438\u043d\u043a\u0435\u0440\u043e\u043c \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0441\u0430\u043c clang \u0430 \u043d\u0435 lld, \u043d\u043e \u0438 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e ld.lld \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p><code>-L$PREFIX\/lib<\/code> &#8212; \u0438\u0449\u0438 \u0442\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0435\u0431\u0435 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043b\u0438\u043d\u043a\u043e\u0432\u0430\u0442\u044c, \u0432 $PREFIX\/lib<\/p>\n<p><code>-rpath-link,$PREFIX\/lib<\/code> &#8212; \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0435\u0441\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0442\u043e \u044d\u0442\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (\u043d\u0435\u043f\u0440\u044f\u043c\u044b\u0435) \u0442\u043e\u0436\u0435 \u0438\u0449\u0438 \u0432 $PREFIX\/lib.<\/p>\n<p><code>--undefined-version<\/code> &#8212; \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0443 \u043c\u043d\u043e\u0433\u0438\u0445 \u0443\u0442\u0438\u043b\u0438\u0442 \u0435\u0441\u0442\u044c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u0430\u044f \u0448\u0442\u0443\u043a\u0430, \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 <code>libname.so<\/code>, \u0430 <code>libname.so.2.4<\/code> , \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u043a\u0438\u0445-\u043d\u0438\u0431\u0443\u0434\u044c \u0432\u0435\u0440\u0441\u0438\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439 \u043e\u0442\u044b\u0449\u0438. \u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u043b\u0430\u0433 \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a\u0430 \u043e\u0441\u043b\u0430\u0431\u043b\u044f\u0435\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0438\u0441\u043a\u043e\u043c\u044b\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438.<\/p>\n<pre><code>export LDFLAGS=\"-L$PREFIX\/lib -Wl,-rpath-link,$PREFIX\/lib -Wl,--undefined-version\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u0424\u043b\u0430\u0433\u0438 \u0434\u043b\u044f pkg-config<\/h4>\n<p>pkg-config \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u043e\u0438\u0441\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u0415\u0441\u043b\u0438 \u043a\u0440\u0430\u0442\u043a\u043e &#8212; \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043c\u043d\u043e\u0433\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u0444\u0430\u0439\u043b\u0438\u043a .pc, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0444\u043b\u0430\u0433\u0438 \u043a \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u043c \u0438 \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a\u0430\u043c \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431 \u0441\u043b\u0438\u043d\u043a\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439. \u0415\u0449\u0435 \u0432 .pc \u0444\u0430\u0439\u043b\u0430\u0445 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445, \u0444\u043b\u0430\u0433\u0438 \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0442\u043e\u043c \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 pkg-config. \u041c\u043d\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e. pkg-config &#8212; \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u043b\u0438\u043d\u0443\u043a\u0441\u043e\u0432\u0430\u044f \u0448\u0442\u0443\u043a\u0430 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043d\u0435\u0439 autoconf, meson \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u0438\u043d\u043e\u0433\u0434\u0430 cmake, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 gnu make \u0448\u0442\u0443\u043a\u0438 \u0438\u0449\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0444\u043b\u0430\u0433\u0438 \u0434\u043b\u044f \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 \u0441 \u043d\u0438\u043c\u0438. CMake \u0438\u043d\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0432\u043e\u0438, \u0438\u043d\u044b\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b, \u0447\u0442\u043e \u0432\u043f\u0440\u043e\u0447\u0435\u043c \u0447\u0430\u0441\u0442\u043e \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043b\u0430\u0447\u0435\u0432\u043d\u043e. \u0418\u0442\u0430\u043a:<\/p>\n<pre><code># pkg-config lookup path: \u0438\u0449\u0435\u043c .pc \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0435, \u043f\u043e\u0442\u043e\u043c \u0432 sysroot export PKG_CONFIG_LIBDIR=\"$PREFIX\/lib\/pkgconfig:$PREFIX\/share\/pkgconfig:$SYSROOT\/usr\/lib\/pkgconfig:$SYSROOT\/usr\/share\/pkgconfig\"# \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 .pc \u0444\u0430\u0439\u043b\u044b \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u0442\u044c \u0432 \u0430\u043d\u0434\u0440\u043e\u0438\u0434 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u043b\u0438\u043d\u0443\u043a\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442export PKG_CONFIG_PATH=\"\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u0428\u0430\u0433 2. \u0414\u043e\u043f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430<\/h3>\n<p>\u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0447\u0442\u043e\u0431 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u0431\u043e\u0440\u043a\u0438.<\/p>\n<h4>autoconf<\/h4>\n<pre><code>export AUTOCONF_CONFIGURE_FLAGS=\"--host=aarch64-linux-android --prefix=$PREFIX\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0442\u0430\u043a:<\/p>\n<pre><code>.\/configure $AUTOCONF_CONFIGURE_FLAGS<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0432 \u043a\u043e\u043d\u0435\u0446 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0449\u0435 \u0444\u043b\u0430\u0433\u0438, \u0430 \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e <code>make; make install<\/code><\/p>\n<h4>cmake<\/h4>\n<p>\u0412\u043e\u043e\u0431\u0449\u0435 \u0434\u043b\u044f CMake \u0443 NDK \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u0442\u0443\u043b\u0447\u0435\u0439\u043d-\u0444\u0430\u0439\u043b, \u043d\u043e \u0434\u043b\u044f \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u044f \u0440\u0435\u0448\u0438\u043b \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 <code>aarch64-linux-android21-toolchain.cmake<\/code>:<\/p>\n<pre><code># \u0415\u0441\u043b\u0438 \u0442\u0443\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c Android, \u0442\u043e cmake \u043d\u0430\u0447\u043d\u0435\u0442 \u0432\u044b\u0442\u0432\u043e\u0440\u044f\u0442\u044c \u0441\u0432\u043e\u044e \u043c\u0430\u0433\u0438\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 NDK,# \u0430 \u043c\u044b \u0435\u0435 \u0442\u0443\u0442 \u0440\u0443\u043a\u0430\u043c\u0438 \u0434\u0435\u043b\u0430\u0435\u043c, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0443\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 Linuxset(CMAKE_SYSTEM_NAME Linux)# \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430set(CMAKE_SYSTEM_PROCESSOR \"aarch64\")# \u0437\u0430\u0434\u0430\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u0438 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0435 \u0431\u044b\u043b \u0437\u0430\u0434\u0430\u043dif(NOT CMAKE_C_COMPILER)  set(CMAKE_C_COMPILER \"$ENV{CC}\" CACHE FILEPATH \"C compiler\" FORCE)endif()# \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u0421++if(NOT CMAKE_CXX_COMPILER)  set(CMAKE_CXX_COMPILER \"$ENV{CXX}\" CACHE FILEPATH \"C++ compiler\" FORCE)endif()set(CMAKE_AR \"$ENV{AR}\" CACHE FILEPATH \"archiver\" FORCE)             # \u043d\u0430\u0448 $ARset(CMAKE_RANLIB \"$ENV{RANLIB}\" CACHE FILEPATH \"ranlib\" FORCE)       # \u043d\u0430\u0448 $RANLIBset(CMAKE_STRIP \"$ENV{STRIP}\" CACHE FILEPATH \"strip\" FORCE)          # \u043d\u0430\u0448 $STRIPset(CMAKE_READELF \"$ENV{READELF}\" CACHE FILEPATH \"readelf\" FORCE)    # \u043d\u0430\u0448 $READELFset(CMAKE_OBJDUMP \"$ENV{OBJDUMP}\" CACHE FILEPATH \"objdump\" FORCE)    # \u043d\u0430\u0448 $OBJDUMPset(CMAKE_OBJCOPY \"$ENV{OBJCOPY}\" CACHE FILEPATH \"objcopy\" FORCE)    # \u043d\u0430\u0448 $OBJCOPYset(CMAKE_NM \"$ENV{NM}\" CACHE FILEPATH \"nm\" FORCE)                   # \u043d\u0430\u0448 $NMset(CMAKE_ASM_COMPILER \"$ENV{AS}\" CACHE FILEPATH \"assembler\" FORCE)  # \u043d\u0430\u0448 $ASset(CMAKE_LINKER \"$ENV{LD}\" CACHE FILEPATH \"linker\" FORCE)           # \u043d\u0430\u0448 $LDset(CMAKE_SYSROOT \"$ENV{SYSROOT}\")                                   # \u043d\u0430\u0448 $SYSROOTset(CMAKE_INSTALL_PREFIX \"$ENV{PREFIX}\" CACHE PATH \"install prefix\") # \u043d\u0430\u0448 $PREFIX# \u0434\u043b\u044f find_library\/find_path \u0438\u0449\u0435\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 PREFIX, \u043f\u043e\u0442\u043e\u043c SYSROOTset(CMAKE_FIND_ROOT_PATH \"$ENV{PREFIX};$ENV{SYSROOT}\")# \u041d\u0435 \u0438\u0449\u0435\u043c \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432 CMAKE_FIND_ROOT_PATH, \u0442\u043e \u0435\u0441\u0442\u044c \u0432 SYSROOT \u0438\u043b\u0438 PREFIXset(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)# \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u0449\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 SYSROOT \u0438\u043b\u0438 PREFIXset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)# \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u0449\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 SYSROOT \u0438\u043b\u0438 PREFIXset(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)# CMake \u043f\u0430\u043a\u0435\u0442\u044b (\u044f \u0442\u0430\u043a \u043f\u043e\u043d\u0438\u043c\u0430\u044e \u0435\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043d\u0435 \u0434\u043b\u044f pkg-config \u0430 \u0434\u043b\u044f find_package) # \u0438\u0449\u0435\u043c \u0442\u043e\u0436\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 SYSROOT \u0438\u043b\u0438 PREFIXset(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0418 \u0437\u0430\u0434\u0430\u0435\u043c \u043d\u0430\u0448\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f cmake:<\/p>\n<pre><code># \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u0442\u0443\u043b\u0447\u0435\u0439\u043d\u0430 (\u043f\u043e\u043b\u043d\u044b\u0439)export CMAKE_TOOLCHAIN_FILE=\"$PWD\/aarch64-linux-android21-toolchain.cmake\" # \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c# \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0434\u043b\u044f cmake find_packageexport CMAKE_PREFIX_PATH=\"$PREFIX\"# \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430export CMAKE_FLAGS=\"-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_PREFIX_PATH=$PREFIX\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0442\u0430\u043a:<\/p>\n<pre><code># \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438mkdir -p build; cd buildcmake $CMAKE_FLAGS ..makemake install<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>meson<\/h4>\n<p>\u0414\u043b\u044f \u043a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 meson \u043d\u0430\u0441\u0442\u0430\u0438\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e\u043c \u0447\u0442\u043e\u0431 \u0431\u044b\u043b cross file, \u043f\u0440\u0438\u0447\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e env-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 &#8212; \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0442\u0430\u043a \u0447\u0442\u043e \u0442\u0443\u0442 \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0442\u0435\u043c \u0447\u0442\u043e \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432\u0441\u0451 \u043d\u0443\u0436\u043d\u043e\u0435 \u0432 PATH \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u043b\u044f meson <code>crossfile-aarch64-android21.ini<\/code><\/p>\n<pre><code>[binaries]# \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u0438c = 'aarch64-linux-android21-clang'# \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441++cpp = 'aarch64-linux-android21-clang++'# arar = 'llvm-ar'# stripstrip = 'llvm-strip'# \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043ald = 'ld.lld'# \u043d\u0430\u0448 \u0445\u043e\u0441\u0442\u043e\u0432\u044b\u0439 pkg-config \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438# \u0432\u043f\u043e\u043b\u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442pkgconfig = 'pkg-config'[host_machine]# \u0446\u0435\u043b\u0435\u0432\u0430\u044f os \u043a\u0430\u043a meson \u0435\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442; google: meson host_machine system android.system = 'android'# \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430cpu_family = 'aarch64'# \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430, \u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442cpu = 'aarch64'# \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0431\u0430\u0439\u0442\u043e\u0432, \u043e\u043d \u0436\u0435 endiannessendian = 'little'[properties]# \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u043d\u0430\u0448\u0438\u043c\u0438 \u0444\u043b\u0430\u0433\u0430\u043c\u0438 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0434\u043e<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430:<\/p>\n<pre><code>export MESON_CROSS_FILE=\"$PWD\/crossfile-aarch64-android21.ini\" # \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044cexport MESON_FLAGS=\"--prefix=$PREFIX --cross-file $MESON_CROSS_FILE\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f:<\/p>\n<pre><code># \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438:meson setup builddir $MESON_FLAGScd builddirninjaninja install<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>rust<\/h4>\n<p>Rust \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0441\u0438\u0448\u043d\u044b\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 cargo \u043f\u043e\u0434\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 \u043a\u0440\u0435\u0439\u0442 cc.<\/p>\n<pre><code># \u0446\u0435\u043b\u044c \u0441\u0431\u043e\u0440\u043a\u0438 \u0434\u043b\u044f cargoexport CARGO_BUILD_TARGET=\"aarch64-linux-android\"# linker \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c\u044b\u0435 \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u043d\u043d\u043e# \u0442\u0430\u043a\u043e\u0439 \u0442\u0430\u0440\u0433\u0435\u0442export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=\"aarch64-linux-android21-clang\" export CARGO_TARGET_AARCH64_LINUX_ANDROID_AR=\"llvm-ar\"# \u042d\u0442\u043e \u0443\u0436\u0435 \u0434\u043b\u044f \u043a\u0440\u0435\u0439\u0442\u0430 ccexport CC_aarch64_linux_android=\"$CC\"export CFLAGS_aarch64_linux_android=\"$CFLAGS\"export CXX_aarch64_linux_android=\"$CXX\"export CXXFLAGS_aarch64_linux_android=\"$CXXFLAGS\"# \u0434\u043b\u044f \u043a\u0440\u0435\u0439\u0442\u0430 pkg-configexport PKG_CONFIG_ALLOW_CROSS=1<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f cargo \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0432 PREFIX \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0443\u043a\u0430\u043c\u0438:<\/p>\n<pre><code># \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043ccargo build --release --target \"$CARGO_BUILD_TARGET\"cp \"target\/$CARGO_BUILD_TARGET\/release\/libfoo.a\" \"$PREFIX\/lib\/\" # .so \u0434\u043b\u044f cdylibmkdir -p \"$PREFIX\/include\/foo\"cp path\/to\/headers\/*.h \"$PREFIX\/include\/foo\/\" # \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u2014 \u0432\u043d\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 cargo, \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0443\u043a\u0430\u043c\u0438pkg-config --modversion foo 2&gt;\/dev\/null || echo \"no .pc \u2014 \u043d\u0430\u043f\u0438\u0448\u0438 \u0441\u0430\u043c, cargo \u0435\u0433\u043e \u043d\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0442\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u0428\u0430\u0433 3. \u041a\u0440\u043e\u0441\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c<\/h3>\n<p>\u0421\u043e\u0431\u0435\u0440\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 <code>env.sh<\/code> (ls \u043c\u043e\u0439 \u043c\u043e\u0434\u043d\u044b\u0439 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 \u0437\u0430\u043c\u0435\u043d\u0438\u043b \u043d\u0430 eza \u0438 \u043d\u0430\u0432\u0435\u0440\u0442\u0435\u043b \u0444\u043b\u0430\u0433\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0443\u0442\u044c \u043a NDK \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e \u0431\u0435\u0437 ls):<\/p>\n<pre><code>#!\/bin\/sh# \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438.# \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435: . .\/env.sh# \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0440\u0441\u0438\u043d\u0433\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0448\u0430\u0433\u0443 3: \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c autoconf\/cmake\/meson\/cargo.# \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0432 $PWD: aarch64-linux-android21-toolchain.cmake, crossfile-aarch64-android21.ini# --- \u0428\u0430\u0433 0. \u041f\u0443\u0442\u0438 \u043a NDK ---: \"${ANDROID_HOME:?\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 ANDROID_HOME (\u0441\u043c. \u0441\u0442\u0430\u0442\u044c\u044e, \u0440\u0430\u0437\u0434\u0435\u043b \u00ab\u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e?\u00bb)}\"# \u0411\u0435\u0437 ls: \u0435\u0433\u043e \u0432\u044b\u0432\u043e\u0434 \u043b\u043e\u043c\u0430\u044e\u0442 \u0430\u043b\u0438\u0430\u0441\u044b\/\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0440\u043e\u0434\u0435 eza \u0441 \u0438\u043a\u043e\u043d\u043a\u0430\u043c\u0438 \u0438 \u0441\u0435\u0442\u043a\u043e\u0439.# \u0413\u043b\u043e\u0431 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u0430\u043c \u0448\u0435\u043b\u043b, ls \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0430\u043b\u0438\u0430\u0441 \u043d\u0435 \u0441\u0442\u0440\u0430\u0448\u0435\u043d._ndk_ver=\"$(for _ndk_cand in \"$ANDROID_HOME\/ndk\"\/*; do  [ -d \"$_ndk_cand\" ] || continue  printf '%s\\n' \"${_ndk_cand##*\/}\"done | sort -V | tail -1)\"if [ -z \"$_ndk_ver\" ]; then  echo \"env.sh: \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 $ANDROID_HOME\/ndk \u043d\u0435\u0442 \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 NDK\" &gt;&amp;2  unset _ndk_ver _ndk_cand  return 1 2&gt;\/dev\/null || exit 1fiexport NDK=\"$ANDROID_HOME\/ndk\/$_ndk_ver\"unset _ndk_ver _ndk_candexport TOOLCHAIN=\"$NDK\/toolchains\/llvm\/prebuilt\/linux-x86_64\"export PATH=\"$TOOLCHAIN\/bin:$PATH\"# --- \u0428\u0430\u0433 1. \u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 ---export CC=\"aarch64-linux-android21-clang\"export CXX=\"aarch64-linux-android21-clang++\"export AR=\"llvm-ar\"export RANLIB=\"llvm-ranlib\"export LD=\"ld.lld\"export AS=\"$CC\"export STRIP=\"llvm-strip\"export OBJCOPY=\"llvm-objcopy\"export READELF=\"llvm-readelf\"export NM=\"llvm-nm\"export OBJDUMP=\"llvm-objdump\"export SYSROOT=\"$TOOLCHAIN\/sysroot\"mkdir -p \"$PWD\/prefix-aarch64-android21\"export PREFIX=\"$PWD\/prefix-aarch64-android21\" # \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439export CFLAGS=\"-O2 -fPIC -I$PREFIX\/include -DANDROID -isystem $SYSROOT\/usr\/include\"export CXXFLAGS=\"-O2 -fPIC -I$PREFIX\/include -DANDROID -isystem $SYSROOT\/usr\/include\"export LDFLAGS=\"-L$PREFIX\/lib -Wl,-rpath-link,$PREFIX\/lib -Wl,--undefined-version\"# pkg-config lookup path: \u0438\u0449\u0435\u043c .pc \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0435, \u043f\u043e\u0442\u043e\u043c \u0432 sysrootexport PKG_CONFIG_LIBDIR=\"$PREFIX\/lib\/pkgconfig:$PREFIX\/share\/pkgconfig:$SYSROOT\/usr\/lib\/pkgconfig:$SYSROOT\/usr\/share\/pkgconfig\"# \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 .pc \u0444\u0430\u0439\u043b\u044b \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u0442\u044c \u0432 \u0430\u043d\u0434\u0440\u043e\u0438\u0434 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u043b\u0438\u043d\u0443\u043a\u0441\u0430export PKG_CONFIG_PATH=\"\"# --- \u0428\u0430\u0433 2. autoconf ---export AUTOCONF_CONFIGURE_FLAGS=\"--host=aarch64-linux-android --prefix=$PREFIX\"# --- \u0428\u0430\u0433 2. cmake ---export CMAKE_TOOLCHAIN_FILE=\"$PWD\/aarch64-linux-android21-toolchain.cmake\" # \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044cexport CMAKE_PREFIX_PATH=\"$PREFIX\"export CMAKE_FLAGS=\"-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_PREFIX_PATH=$PREFIX\"cat &gt; \"$CMAKE_TOOLCHAIN_FILE\" &lt;&lt;'EOF'# \u0415\u0441\u043b\u0438 \u0442\u0443\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c Android, \u0442\u043e cmake \u043d\u0430\u0447\u043d\u0435\u0442 \u0432\u044b\u0442\u0432\u043e\u0440\u044f\u0442\u044c \u0441\u0432\u043e\u044e \u043c\u0430\u0433\u0438\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 NDK,# \u0430 \u043c\u044b \u0435\u0435 \u0442\u0443\u0442 \u0440\u0443\u043a\u0430\u043c\u0438 \u0434\u0435\u043b\u0430\u0435\u043c, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0443\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 Linuxset(CMAKE_SYSTEM_NAME Linux)# \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430set(CMAKE_SYSTEM_PROCESSOR \"aarch64\")# \u0437\u0430\u0434\u0430\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u0438 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0435 \u0431\u044b\u043b \u0437\u0430\u0434\u0430\u043dif(NOT CMAKE_C_COMPILER)  set(CMAKE_C_COMPILER \"$ENV{CC}\" CACHE FILEPATH \"C compiler\" FORCE)endif()# \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u0421++if(NOT CMAKE_CXX_COMPILER)  set(CMAKE_CXX_COMPILER \"$ENV{CXX}\" CACHE FILEPATH \"C++ compiler\" FORCE)endif()set(CMAKE_AR \"$ENV{AR}\" CACHE FILEPATH \"archiver\" FORCE)             # \u043d\u0430\u0448 $ARset(CMAKE_RANLIB \"$ENV{RANLIB}\" CACHE FILEPATH \"ranlib\" FORCE)       # \u043d\u0430\u0448 $RANLIBset(CMAKE_STRIP \"$ENV{STRIP}\" CACHE FILEPATH \"strip\" FORCE)          # \u043d\u0430\u0448 $STRIPset(CMAKE_READELF \"$ENV{READELF}\" CACHE FILEPATH \"readelf\" FORCE)    # \u043d\u0430\u0448 $READELFset(CMAKE_OBJDUMP \"$ENV{OBJDUMP}\" CACHE FILEPATH \"objdump\" FORCE)    # \u043d\u0430\u0448 $OBJDUMPset(CMAKE_OBJCOPY \"$ENV{OBJCOPY}\" CACHE FILEPATH \"objcopy\" FORCE)    # \u043d\u0430\u0448 $OBJCOPYset(CMAKE_NM \"$ENV{NM}\" CACHE FILEPATH \"nm\" FORCE)                   # \u043d\u0430\u0448 $NMset(CMAKE_ASM_COMPILER \"$ENV{AS}\" CACHE FILEPATH \"assembler\" FORCE)  # \u043d\u0430\u0448 $ASset(CMAKE_LINKER \"$ENV{LD}\" CACHE FILEPATH \"linker\" FORCE)           # \u043d\u0430\u0448 $LDset(CMAKE_SYSROOT \"$ENV{SYSROOT}\")                                   # \u043d\u0430\u0448 $SYSROOTset(CMAKE_INSTALL_PREFIX \"$ENV{PREFIX}\" CACHE PATH \"install prefix\") # \u043d\u0430\u0448 $PREFIX# \u0434\u043b\u044f find_library\/find_path \u0438\u0449\u0435\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 PREFIX, \u043f\u043e\u0442\u043e\u043c SYSROOTset(CMAKE_FIND_ROOT_PATH \"$ENV{PREFIX};$ENV{SYSROOT}\")# \u041d\u0435 \u0438\u0449\u0435\u043c \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432 CMAKE_FIND_ROOT_PATH, \u0442\u043e \u0435\u0441\u0442\u044c \u0432 SYSROOT \u0438\u043b\u0438 PREFIXset(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)# \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u0449\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 SYSROOT \u0438\u043b\u0438 PREFIXset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)# \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u0449\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 SYSROOT \u0438\u043b\u0438 PREFIXset(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)# CMake \u043f\u0430\u043a\u0435\u0442\u044b (\u044f \u0442\u0430\u043a \u043f\u043e\u043d\u0438\u043c\u0430\u044e \u0435\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043d\u0435 \u0434\u043b\u044f pkg-config \u0430 \u0434\u043b\u044f find_package)# \u0438\u0449\u0435\u043c \u0442\u043e\u0436\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 SYSROOT \u0438\u043b\u0438 PREFIXset(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)EOF# --- \u0428\u0430\u0433 2. meson ---export MESON_CROSS_FILE=\"$PWD\/crossfile-aarch64-android21.ini\" # \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044cexport MESON_FLAGS=\"--prefix=$PREFIX --cross-file $MESON_CROSS_FILE\"cat &gt; \"$MESON_CROSS_FILE\" &lt;&lt;'EOF'[binaries]# \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u0438c = 'aarch64-linux-android21-clang'# \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441++cpp = 'aarch64-linux-android21-clang++'# arar = 'llvm-ar'# stripstrip = 'llvm-strip'# \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043ald = 'ld.lld'# \u043d\u0430\u0448 \u0445\u043e\u0441\u0442\u043e\u0432\u044b\u0439 pkg-config \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438# \u0432\u043f\u043e\u043b\u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442pkgconfig = 'pkg-config'[host_machine]# \u0446\u0435\u043b\u0435\u0432\u0430\u044f os \u043a\u0430\u043a meson \u0435\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442; google: meson host_machine system android.system = 'android'# \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430cpu_family = 'aarch64'# \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430, \u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442cpu = 'aarch64'# \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0431\u0430\u0439\u0442\u043e\u0432, \u043e\u043d \u0436\u0435 endiannessendian = 'little'[properties]# \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u043d\u0430\u0448\u0438\u043c\u0438 \u0444\u043b\u0430\u0433\u0430\u043c\u0438 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0434\u043eEOF# --- \u0428\u0430\u0433 2. rust ---export CARGO_BUILD_TARGET=\"aarch64-linux-android\"export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=\"aarch64-linux-android21-clang\"export CARGO_TARGET_AARCH64_LINUX_ANDROID_AR=\"llvm-ar\"# \u042d\u0442\u043e \u0443\u0436\u0435 \u0434\u043b\u044f \u043a\u0440\u0435\u0439\u0442\u0430 ccexport CC_aarch64_linux_android=\"$CC\"export CFLAGS_aarch64_linux_android=\"$CFLAGS\"export CXX_aarch64_linux_android=\"$CXX\"export CXXFLAGS_aarch64_linux_android=\"$CXXFLAGS\"# \u0434\u043b\u044f \u043a\u0440\u0435\u0439\u0442\u0430 pkg-configexport PKG_CONFIG_ALLOW_CROSS=1echo \"env aarch64-linux-android21 ready: PREFIX=$PREFIX\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c \u0447\u0442\u043e ANDROID_HOME \u0437\u0430\u0434\u0430\u043d<\/p>\n<p>\u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441 \u044d\u0442\u0438\u043c <code>env.sh<\/code> \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b PATH \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0432 \u0432\u0430\u0448\u0435\u043c shell.<\/p>\n<pre><code>. .\/env.sh<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b \u0432\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 .\/env.sh, \u0442\u043e \u0432\u0441\u0435 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0438 \u0431\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u044b \u0432\u044b\u0448\u0435\u043b.<\/p>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u043a \u0441\u043b\u043e\u0432\u0443 \u0442\u0430\u043a\u0436\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0442\u0443\u043b\u0447\u0435\u0439\u043d \u0444\u0430\u0439\u043b \u0438 \u043a\u0440\u043e\u0441\u0441\u0444\u0430\u0439\u043b \u0434\u043b\u044f cmake \u0438 meson.<\/p>\n<p>\u0418\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0447\u0442\u043e \u044f \u043e\u043f\u0440\u043e\u0441\u0442\u043e\u0432\u043e\u043b\u043e\u0441\u0438\u043b\u0441\u044f \u0441 CPPFLAGS, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0435\u0433\u043e \u0432\u0441\u0435 \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0437\u0430\u0434\u0430\u044e \u0435\u0433\u043e \u0443\u0436\u0435 \u0437\u0434\u0435\u0441\u044c, \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435:<\/p>\n<pre><code>#!\/bin\/sh# \u0428\u0430\u0433 3 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 \u00ab\u041a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043f\u043e\u0434 \u0430\u043d\u0434\u0440\u043e\u0438\u0434 \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e\u00bb \u2014 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c.# env.sh \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u043b \u0444\u043b\u0430\u0433\u0438 \u043f\u043e \u043f\u043e\u043b\u043e\u0447\u043a\u0430\u043c, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442:# \u0442\u044f\u043d\u0435\u043c \u0446\u0435\u043f\u043e\u0447\u043a\u0443 zlib -&gt; libpng -&gt; freetype -&gt; pngprobe \u043a\u0440\u043e\u0441\u0441\u043e\u043c \u0438\u0437 NDK.# \u041f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u043f\u0435\u0440\u0435\u0435\u0437\u0436\u0430\u044e\u0442 \u0432 $PREFIX, \u0447\u0435\u0442\u0432\u0451\u0440\u0442\u044b\u0439 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u2014# \u043e\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0441 $PREFIX \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0438\u043d\u043a\u043e\u0432\u0430\u0442\u044c\u0441\u044f:#   zlib    1.3.1  \u2014 cmake    (\u043a\u043e\u0440\u0435\u043d\u044c, \u043d\u0438 \u043e\u0442 \u043a\u043e\u0433\u043e \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442)#   libpng  1.6.48 \u2014 autoconf (\u0438\u0449\u0435\u0442 zlib \u0447\u0435\u0440\u0435\u0437 --with-zlib-prefix=$PREFIX)#   freetype 2.13.3 \u2014 meson   (\u0438\u0449\u0435\u0442 zlib \u0438 libpng \u0447\u0435\u0440\u0435\u0437 pkg-config)#   pngprobe 0.1.0 \u2014 cargo + libpng-sys 1.1.11 (\u043b\u0438\u043d\u043a\u0443\u0435\u0442 libpng \u0447\u0435\u0440\u0435\u0437 pkg-config)## \u0417\u0430\u043f\u0443\u0441\u043a \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e\u0441\u043b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 article-draft:#   . .\/env.sh#   sh after-env.sh## \u0421\u043a\u0440\u0438\u043f\u0442 \u0442\u0435\u0440\u043f\u0438\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0438: \u0442\u0430\u0440\u0431\u043e\u043b\u043b \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 \u2014 \u043d\u0435 \u043a\u0430\u0447\u0430\u0435\u043c,# \u043c\u0430\u0440\u043a\u0435\u0440 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 (.pc \u0432 $PREFIX, \u0431\u0438\u043d\u0430\u0440\u044c \u0432 target\/) \u2014 \u043d\u0435 \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c.set -eucd \"$(dirname \"$0\")\": \"${PREFIX:?PREFIX \u043f\u0443\u0441\u0442 \u2014 \u043f\u043e\u0445\u043e\u0436\u0435, env.sh \u043d\u0435 \u043f\u043e\u0434\u0441\u043e\u0440\u0441\u0438\u043b\u0438. \u0421\u043d\u0430\u0447\u0430\u043b\u0430: . .\/env.sh}\": \"${AUTOCONF_CONFIGURE_FLAGS:?AUTOCONF_CONFIGURE_FLAGS \u043f\u0443\u0441\u0442 \u2014 \u0431\u0435\u0437 env.sh \u0442\u0443\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0447\u0435\u0433\u043e. \u0421\u043d\u0430\u0447\u0430\u043b\u0430: . .\/env.sh}\": \"${CMAKE_FLAGS:?CMAKE_FLAGS \u043f\u0443\u0441\u0442 \u2014 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u043e\u0434\u0445\u0432\u0430\u0447\u0435\u043d\u043e. \u0421\u043d\u0430\u0447\u0430\u043b\u0430: . .\/env.sh}\": \"${MESON_FLAGS:?MESON_FLAGS \u043f\u0443\u0441\u0442 \u2014 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u043e\u0434\u0445\u0432\u0430\u0447\u0435\u043d\u043e. \u0421\u043d\u0430\u0447\u0430\u043b\u0430: . .\/env.sh}\": \"${CARGO_BUILD_TARGET:?CARGO_BUILD_TARGET \u043f\u0443\u0441\u0442 \u2014 \u0431\u0435\u0437 env.sh \u0446\u0435\u043b\u044c \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430. \u0421\u043d\u0430\u0447\u0430\u043b\u0430: . .\/env.sh}\": \"${READELF:?READELF \u043f\u0443\u0441\u0442 \u2014 \u0431\u0435\u0437 env.sh \u043d\u0435 \u0437\u043d\u0430\u0435\u043c, \u0447\u0435\u043c \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0431\u0438\u043d\u0430\u0440\u0438. \u0421\u043d\u0430\u0447\u0430\u043b\u0430: . .\/env.sh}\"for cmd in curl cmake ninja meson cargo pkg-config make llvm-readelf; do    command -v \"$cmd\" &gt;\/dev\/null 2&gt;&amp;1 || {        echo \"error: \u043d\u0435\u0442 '$cmd' \u0432 PATH \u2014 \u043f\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e, \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0438\u043a\u0430\u043a\" &gt;&amp;2        exit 1    }doneJOBS=\"$(nproc 2&gt;\/dev\/null || echo 4)\"fetch() {    # fetch DEST URL [URL...]: \u043a\u0430\u0447\u0430\u0435\u0442 DEST, \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u044f \u0437\u0435\u0440\u043a\u0430\u043b\u0430 \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438.    # \u0420\u0430\u0437 \u043b\u0435\u0436\u0438\u0442 \u2014 \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437 \u043d\u0435 \u043a\u0430\u0447\u0430\u0435\u043c. \u041a\u043b\u044e\u0447 -C - \u0437\u0430\u043e\u0434\u043d\u043e \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0431\u043e\u0440\u0432\u0430\u043d\u043d\u043e\u0435.    _dest=\"$1\"    shift    if [ -f \"$_dest\" ]; then        echo \"-- $_dest \u0443\u0436\u0435 \u0441\u043a\u0430\u0447\u0430\u043d, \u0441\u043d\u043e\u0432\u0430 \u043d\u0435 \u0442\u044f\u043d\u0435\u043c\"        return 0    fi    for _url in \"$@\"; do        echo \"-- \u043a\u0430\u0447\u0430\u044e $_url\"        if curl -fSL -C - -o \"$_dest\" \"$_url\"; then            echo \"-- $_dest \u0441\u043a\u0430\u0447\u0430\u043b\u0441\u044f, \u0432\u0441\u0451 \u0447\u0435\u0441\u0442\u043d\u043e\"            return 0        fi        echo \"-- $_url \u043d\u0435 \u043e\u0442\u0434\u0430\u043b, \u0438\u0434\u0451\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0437\u0435\u0440\u043a\u0430\u043b\u0443\"    done    echo \"error: $_dest \u0442\u0430\u043a \u0438 \u043d\u0435 \u0441\u043a\u0430\u0447\u0430\u043b\u0441\u044f \u2014 \u0433\u043b\u044f\u043d\u044c\u0442\u0435 \u0441\u0435\u0442\u044c \u0438 \u0437\u0435\u0440\u043a\u0430\u043b\u0430\" &gt;&amp;2    return 1}# libpng \u0438 freetype \u0438\u0449\u0443\u0442 zlib.h \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c, \u0430 \u043e\u043d \u0447\u0438\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e CPPFLAGS \u2014# CFLAGS \u0435\u043c\u0443 \u043c\u0430\u043b\u043e (\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f pnglibconf.h \u0432\u043e\u043e\u0431\u0449\u0435 \u0437\u043e\u0432\u0451\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440# \u0431\u0435\u0437 CFLAGS). \u0410 \u0432 sysroot NDK \u043b\u0435\u0436\u0438\u0442 \u0441\u0432\u043e\u0439 \u0434\u0440\u0435\u0432\u043d\u0438\u0439 zlib.h: \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0444\u043b\u0430\u0433\u0430# \u043d\u0430\u0439\u0434\u0451\u0442\u0441\u044f \u043e\u043d, \u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0440\u0430\u0437\u043e\u0439\u0434\u0451\u0442\u0441\u044f \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439.export CPPFLAGS=\"-I$PREFIX\/include\"ZLIB_VER=\"1.3.1\"ZLIB_TARBALL=\"zlib-$ZLIB_VER.tar.gz\"ZLIB_SRC=\"zlib-$ZLIB_VER\"LIBPNG_VER=\"1.6.48\"LIBPNG_TARBALL=\"libpng-$LIBPNG_VER.tar.gz\"LIBPNG_SRC=\"libpng-$LIBPNG_VER\"FREETYPE_VER=\"2.13.3\"FREETYPE_TARBALL=\"freetype-$FREETYPE_VER.tar.gz\"FREETYPE_SRC=\"freetype-$FREETYPE_VER\"LIBPNG_SYS_VER=\"1.1.11\"PNGPROBE_VER=\"0.1.0\"PNGPROBE_SRC=\"pngprobe-$PNGPROBE_VER\"echo \"== [1\/4] zlib $ZLIB_VER (cmake \u2014 \u043a\u043e\u0440\u0435\u043d\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0438) ==\"if [ -f \"$PREFIX\/lib\/pkgconfig\/zlib.pc\" ] || [ -f \"$PREFIX\/share\/pkgconfig\/zlib.pc\" ]; then    echo \"-- zlib \u0443\u0436\u0435 \u0432 PREFIX, \u044d\u0442\u043e\u0442 \u0448\u0430\u0433 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c\"else    fetch \"$ZLIB_TARBALL\" \\        \"https:\/\/zlib.net\/fossils\/zlib-$ZLIB_VER.tar.gz\" \\        \"https:\/\/github.com\/madler\/zlib\/releases\/download\/v$ZLIB_VER\/zlib-$ZLIB_VER.tar.gz\"    rm -rf \"$ZLIB_SRC\"    tar -xzf \"$ZLIB_TARBALL\"    # $CMAKE_FLAGS \u0431\u0435\u0437 \u043a\u0430\u0432\u044b\u0447\u0435\u043a \u2014 \u0442\u0430\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u043b\u0430\u0433\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b, \u0442\u0430\u043a \u0438 \u043d\u0430\u0434\u043e    cmake -S \"$ZLIB_SRC\" -B \"$ZLIB_SRC\/build-android\" $CMAKE_FLAGS -DZLIB_BUILD_EXAMPLES=OFF    cmake --build \"$ZLIB_SRC\/build-android\" -j\"$JOBS\"    cmake --install \"$ZLIB_SRC\/build-android\"    echo \"-- zlib \u0432\u0441\u0442\u0430\u043b, \u043a\u043e\u0440\u0435\u043d\u044c \u0435\u0441\u0442\u044c\"fiecho \"== [2\/4] libpng $LIBPNG_VER (autoconf \u2014 \u0435\u043c\u0443 \u043d\u0443\u0436\u0435\u043d \u043d\u0430\u0448 zlib) ==\"if [ -f \"$PREFIX\/lib\/pkgconfig\/libpng16.pc\" ]; then    echo \"-- libpng \u0443\u0436\u0435 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435, \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437 \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\"else    fetch \"$LIBPNG_TARBALL\" \\        \"https:\/\/download.sourceforge.net\/libpng\/libpng-$LIBPNG_VER.tar.gz\" \\        \"https:\/\/github.com\/pnggroup\/libpng\/archive\/refs\/tags\/v$LIBPNG_VER.tar.gz\"    rm -rf \"$LIBPNG_SRC\"    tar -xzf \"$LIBPNG_TARBALL\"    (        cd \"$LIBPNG_SRC\"        # $AUTOCONF_CONFIGURE_FLAGS \u0431\u0435\u0437 \u043a\u0430\u0432\u044b\u0447\u0435\u043a \u2014 \u0442\u0430\u043c --host \u0438 --prefix \u043f\u0430\u0440\u043e\u0439.        # --with-zlib-prefix \u0432\u0435\u0434\u0451\u0442 configure \u043a \u043d\u0430\u0448\u0435\u043c\u0443 zlib \u0441 \u0448\u0430\u0433\u0430 [1\/4].        # \u0410 CPPFLAGS (\u0437\u0430\u0434\u0430\u043d \u0432\u044b\u0448\u0435) \u0434\u043e\u0441\u0442\u0430\u0451\u0442 \u0434\u0430\u0436\u0435 \u0434\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438        # pnglibconf.h: \u0442\u0430 \u0432\u043e\u0437\u044c\u043c\u0451\u0442 \u043d\u0430\u0448 zlib.h \u0438\u0437 $PREFIX, \u0430 \u043d\u0435 \u0434\u0440\u0435\u0432\u043d\u0438\u0439 \u0438\u0437 sysroot NDK.        .\/configure $AUTOCONF_CONFIGURE_FLAGS --with-zlib-prefix=\"$PREFIX\"        make -j\"$JOBS\"        make install    )    echo \"-- libpng \u0441\u043e\u0431\u0440\u0430\u043b\u0441\u044f \u043f\u0440\u043e\u0442\u0438\u0432 \u043d\u0430\u0448\u0435\u0433\u043e zlib\"fiecho \"== [3\/4] freetype $FREETYPE_VER (meson \u2014 \u0442\u044f\u043d\u0435\u0442 zlib \u0438 libpng) ==\"if [ -f \"$PREFIX\/lib\/pkgconfig\/freetype2.pc\" ]; then    echo \"-- freetype \u0443\u0436\u0435 \u0441\u0442\u043e\u0438\u0442, meson \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0433\u043e\u043d\u044f\u0442\u044c\"else    fetch \"$FREETYPE_TARBALL\" \\        \"https:\/\/download.savannah.gnu.org\/releases\/freetype\/freetype-$FREETYPE_VER.tar.gz\" \\        \"https:\/\/github.com\/freetype\/freetype\/archive\/refs\/tags\/VER-2-13-3.tar.gz\"    rm -rf \"$FREETYPE_SRC\"    tar -xzf \"$FREETYPE_TARBALL\"    (        cd \"$FREETYPE_SRC\"        # $MESON_FLAGS \u0431\u0435\u0437 \u043a\u0430\u0432\u044b\u0447\u0435\u043a \u2014 \u0442\u0430\u043c --prefix \u0438 --cross-file \u043f\u0430\u0440\u043e\u0439.        # zlib \u0438 libpng \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0441\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 pkg-config (PKG_CONFIG_LIBDIR \u0438\u0437 env.sh),        # \u0430 brotli\/bzip2\/harfbuzz \u0433\u0430\u0441\u0438\u043c \u044f\u0432\u043d\u043e \u2014 \u043d\u0435\u0447\u0435\u0433\u043e meson \u0448\u0430\u0440\u0438\u0442\u044c \u043f\u043e \u0445\u043e\u0441\u0442\u0443.        meson setup build-android $MESON_FLAGS \\            -Dzlib=system -Dpng=enabled \\            -Dbrotli=disabled -Dbzip2=disabled -Dharfbuzz=disabled \\            -Dtests=disabled        ninja -C build-android        ninja -C build-android install    )    echo \"-- freetype \u0432\u0441\u0442\u0430\u043b, \u0441\u0438\u0448\u043d\u0430\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0446\u0435\u043b\u0438\u043a\u043e\u043c\"fiecho \"== [4\/4] pngprobe $PNGPROBE_VER (cargo + libpng-sys $LIBPNG_SYS_VER \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438) ==\"# \u041f\u043e\u0434\u043c\u0435\u0442\u0430\u0435\u043c \u0437\u0430 \u0441\u0442\u0430\u0440\u044b\u043c \u0448\u0430\u0433\u043e\u043c [4\/4]: xcadd \u0443\u0448\u0451\u043b, \u0430 \u0445\u0432\u043e\u0441\u0442\u044b \u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c.rm -f \"$PREFIX\/lib\/libxcadd.a\" \"$PREFIX\/lib\/pkgconfig\/xcadd.pc\"rm -rf \"$PREFIX\/include\/xcadd\"if [ -f \"$PNGPROBE_SRC\/target\/$CARGO_BUILD_TARGET\/release\/pngprobe\" ]; then    echo \"-- pngprobe \u0443\u0436\u0435 \u0441\u043e\u0431\u0440\u0430\u043d, cargo \u043e\u0442\u0434\u044b\u0445\u0430\u0435\u0442\"else    # pngprobe \u043a\u0430\u0447\u0430\u0442\u044c \u043d\u0435\u043e\u0442\u043a\u0443\u0434\u0430 \u2014 \u044d\u0442\u043e \u043d\u0430\u0448 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434,    # \u0440\u043e\u0436\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u0440\u044f\u043c\u043e \u0437\u0434\u0435\u0441\u044c. \u0412\u0435\u0440\u0441\u0438\u044f libpng-sys \u043f\u0440\u0438\u0431\u0438\u0442\u0430 \u0432\u044b\u0448\u0435 \u0441\u0442\u0440\u043e\u0433\u0438\u043c \u00ab=\u00bb.    mkdir -p \"$PNGPROBE_SRC\/src\"    cat &gt; \"$PNGPROBE_SRC\/Cargo.toml\" &lt;&lt;EOF[package]name = \"pngprobe\"version = \"$PNGPROBE_VER\"edition = \"2021\"[dependencies]libpng-sys = \"=$LIBPNG_SYS_VER\"EOF    cat &gt; \"$PNGPROBE_SRC\/src\/main.rs\" &lt;&lt;'EOF'fn main() {    \/\/ \u0421\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0443 libpng \u0435\u0433\u043e \u0432\u0435\u0440\u0441\u0438\u044e \u2014 \u0441 \u043a\u0435\u043c \u0441\u043b\u0438\u043d\u043a\u043e\u0432\u0430\u043b\u0438\u0441\u044c, \u0441 \u0442\u0435\u043c \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u043c.    \/\/ \u0421\u0430\u043c \u0431\u0438\u043d\u0430\u0440\u044c \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u043d\u044b\u0439, \u0442\u0443\u0442 \u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u2014 \u0432\u0430\u0436\u043d\u0430 \u043b\u0438\u0448\u044c \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0430,    \/\/ \u0435\u0451 \u0447\u0443\u0442\u044c \u043d\u0438\u0436\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 readelf.    let ver = unsafe { libpng_sys::ffi::png_access_version_number() };    println!(\"libpng version: {ver}\");    assert!(ver &gt;= 10648, \"unexpected libpng version: {ver}\");}EOF    (        cd \"$PNGPROBE_SRC\"        # libpng \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 pkg-config (PKG_CONFIG_LIBDIR \u0438\u0437 env.sh:        # $PREFIX \u0442\u0430\u043c \u043f\u0435\u0440\u0432\u044b\u0439, \u0445\u043e\u0441\u0442\u043e\u0432\u043e\u0433\u043e \/usr \u043d\u0435\u0442 \u0432\u043e\u0432\u0441\u0435),        # \u043a\u0440\u043e\u0441\u0441 \u0434\u043b\u044f pkg-config \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d \u0447\u0435\u0440\u0435\u0437 PKG_CONFIG_ALLOW_CROSS=1.        # \u041b\u0438\u043d\u043a\u0435\u0440 \u2014 \u0438\u0437 CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER, \u0440\u0443\u043a\u0430\u043c\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0434\u043e.        cargo build --release --target \"$CARGO_BUILD_TARGET\"    )    # \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0442\u0443\u0442 \u043d\u0435\u0442 \u2014 \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0451 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438: \u044d\u0442\u043e\u043c\u0443 \u0448\u0430\u0433\u0443    # \u0432 $PREFIX \u043a\u043b\u0430\u0441\u0442\u044c \u043d\u0435\u0447\u0435\u0433\u043e (libpng-sys \u2014 rlib-only \u043a\u0440\u0435\u0439\u0442 \u0431\u0435\u0437 \u0441\u0432\u043e\u0438\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432:    # \u0432\u0441\u0435 .h \u0443\u0436\u0435 \u043b\u0435\u0436\u0430\u0442 \u0432 $PREFIX\/include \u0441 \u0448\u0430\u0433\u0430 [2\/4], \u0430 rlib \u0436\u0438\u0432\u0451\u0442 \u0432 target\/;    # \u0440\u0443\u043a\u043e\u043f\u0438\u0441\u043d\u044b\u0439 .pc \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043d\u0435 \u043f\u0438\u0448\u0435\u043c \u2014 \u043e\u043d \u0431\u044b \u0437\u0430\u0433\u043e\u0440\u043e\u0434\u0438\u043b \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 libpng16.pc).    # \u0412 pkg-config-\u0440\u0435\u0436\u0438\u043c\u0435 \u0431\u0438\u043d\u0430\u0440\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u044f\u043d\u0435\u0442 libpng16.so, \u0430 \u043f\u0440\u0438 \u0442\u0438\u0445\u043e\u043c    # \u043e\u0442\u043a\u0430\u0442\u0435 build.rs \u043d\u0430 \u0432\u0435\u043d\u0434\u043e\u0440\u043d\u044b\u0439 static \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e NEEDED libpng16 \u043d\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u2014    # \u0442\u043e\u0433\u0434\u0430 \u043f\u0430\u0434\u0430\u0435\u043c \u0441 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439.    if ! \"$READELF\" -d \"$PNGPROBE_SRC\/target\/$CARGO_BUILD_TARGET\/release\/pngprobe\" | grep -q \"libpng16\"; then        echo \"error: pngprobe \u043d\u0435 \u0437\u0430\u0446\u0435\u043f\u0438\u043b libpng16 \u0438\u0437 \\$PREFIX \u2014 \u043f\u043e\u0445\u043e\u0436\u0435, pkg-config \u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0448\u0451\u043b\" &gt;&amp;2        rm -f \"$PNGPROBE_SRC\/target\/$CARGO_BUILD_TARGET\/release\/pngprobe\"        exit 1    fi    echo \"-- pngprobe \u0441\u043e\u0431\u0440\u0430\u043b\u0441\u044f \u0438 \u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0437\u0430 libpng16 \u0438\u0437 \\$PREFIX\"fiechoecho \"== \u0432\u0441\u0451 \u0441\u043e\u0431\u0440\u0430\u043b\u043e\u0441\u044c \u2014 \u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043e\u0441\u0435\u043b\u043e \u0432 PREFIX=$PREFIX ==\"pkg-config --modversion zlib libpng16 freetype2<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438\u0441\u044c, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 cmake, autoconf, meson \u0438 rust \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u0438 rust \u043d\u0430\u0448\u0435\u043b \u043d\u0443\u0436\u043d\u044b\u0435 \u0435\u043c\u0443 \u0441\u0438\u0448\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c $PREFIX.<\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1085858\/\">https:\/\/habr.com\/ru\/articles\/1085858\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 cmake add_subdirectory \u0438 \u0441\u0431\u043e\u0440\u043a\u0443 \u0447\u0435\u0440\u0435\u0437 Gradle \u0434\u043b\u044f \u043a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0441\u0438\u0448\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043f\u043e\u0434 \u0430\u043d\u0434\u0440\u043e\u0438\u0434. \u041c\u044b \u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0438 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u0438\u0441\u0442\u0435\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u044e\u0431\u044b\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c \u043d\u0430\u0439\u0442\u0438 \u0441\u0432\u043e\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0435\u0437 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u0441\u0442\u044b\u043b\u0435\u0439 \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.\u041a\u0440\u0430\u0442\u043a\u043e \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f\u0421\u0431\u043e\u0440\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043f\u043e\u0434 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043e\u0442 \u0442\u043e\u0439, \u0433\u0434\u0435 \u0432\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435.\u041e\u0431\u0449\u0438\u0439 \u043f\u043b\u0430\u043d\u0412 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0432\u0430\u043c \u043c\u043e\u0433\u043b\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c\u0441\u044f CC=gcc \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0442\u0430\u043a\u043e\u0435. \u0422\u0430\u043a \u0432\u043e\u0442, \u043f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0449\u044c \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0434\u0435\u043b\u0430\u044e\u0442 \u043f\u0440\u0438 \u043b\u044e\u0431\u044b\u0445 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f\u0445 &#8212; \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 environment \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0438\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0434\u043b\u044f ndk \u0442\u0443\u043b\u0447\u0435\u0439\u043d\u0430, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432. \u0422\u0443\u043b\u0447\u0435\u0439\u043d\u043e\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430\u0431\u043e\u0440 \u0443\u0442\u0438\u043b\u0438\u0442 \u0438 \u043f\u0440\u0435\u0434\u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u043e\u0434 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0430\u0440\u0445\u0438\u0432 \u0441 NDK, \u0433\u0434\u0435 \u043b\u0435\u0436\u0430\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b, \u043e\u0431\u0435\u0440\u0442\u043a\u0438, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 &#8212; \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0442\u0443\u043b\u0447\u0435\u0439\u043d\u043e\u043c.\u0412\u0442\u043e\u0440\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0441\u0434\u0435\u043b\u0430\u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 \u0441\u0435\u043a\u0446\u0438\u0438, \u0434\u043b\u044f autoconf, cmake, meson, rust.\u0417\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043d\u0430\u0448\u0438\u043c\u0438 \u0442\u0440\u0443\u0434\u0430\u043c\u0438 \u0447\u0442\u043e\u0431\u044b \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c.\u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e?\u041e\u0442 \u0432\u0430\u0441 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Android SDK \u0438 \u0447\u0435\u0440\u0435\u0437 sdkmanager \u0438\u043b\u0438 \u0435\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Android NDK, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0447\u0442\u043e $ANDROID_HOME \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 Android SDK. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043b\u044e\u0431\u044b\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0434\u043b\u044f \u0432\u0430\u0441 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u044f \u043f\u0438\u0441\u0430\u043b \u043e\u0431 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 SDK \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 sdkmanager \u0447\u0435\u0440\u0435\u0437 mise \u0432 \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 https:\/\/habr.com\/ru\/articles\/1058494\/ , \u0442\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c sdkmanager \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 ndk. \u0427\u0435\u0441\u0442\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c &#8212; \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u044d\u0442\u043e \u0432\u0441\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0434\u0430\u0442\u044c \u043d\u0435 \u043c\u043e\u0433\u0443, \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c curl something | sh \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442, \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u0442 \u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 ANDROID_HOME, \u043d\u043e \u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435 \u043d\u0430\u0448\u0435\u043b.\u0427\u0442\u043e\u0431\u044b \u0434\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043e\u043f\u043e\u0440\u044b, \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a\u0438\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0443 \u043c\u0435\u043d\u044f \u043b\u0435\u0436\u0430\u0442 \u0432 $ANDROID_HOME:c-android-utils HEAD \u276f ls $ANDROID_HOMEcmdline-toolslicensesndkplatform-tools\u0428\u0430\u0433 0. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u0443\u0442\u0438 \u043a NDKNDK &#8212; \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0432 \u043f\u043b\u0430\u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0443\u0442\u0435\u0439. \u0412\u043e\u0442 \u043a\u0430\u043a \u044f \u0440\u0435\u0448\u0430\u044e \u0435\u0435:_ndk_ver=&#187;$(for _ndk_cand in &#171;$ANDROID_HOME\/ndk&#187;\/*; do  [ -d &#171;$_ndk_cand&#187; ] || continue  printf &#8216;%s\\n&#8217; &#171;${_ndk_cand##*\/}&#187;done | sort -V | tail -1)&#187;[ -n &#171;$_ndk_ver&#187; ] || { echo &#171;\u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 $ANDROID_HOME\/ndk \u043d\u0435\u0442 \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 NDK&#187; &gt;&amp;2; return 1 2&gt;\/dev\/null || exit 1; }export NDK=&#187;$ANDROID_HOME\/ndk\/$_ndk_ver&#187;unset _ndk_ver _ndk_cand\u0413\u043b\u043e\u0431 &#171;$ANDROID_HOME\/ndk&#187;\/* \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u0430\u043c \u0448\u0435\u043b\u043b \u0438 \u043e\u0442\u0434\u0430\u0451\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u043d\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432 (\u0444\u0430\u0439\u043b\u044b \u043e\u0442\u0441\u0435\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 -d), sort \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e-\u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438 (-V \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0438 27.0.0, \u0438 28.2.13676358), tail \u043e\u0442\u043a\u0443\u0441\u0438\u0442 \u0441\u0430\u043c\u0443\u044e \u0441\u0432\u0435\u0436\u0443\u044e \u2014 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f NDK \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441 \u0441\u0430\u043c\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 NDK. \u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0442\u0443\u0442 ls: \u0443 \u043c\u043d\u043e\u0433\u0438\u0445 ls \u043f\u043e\u0434\u043c\u0435\u043d\u0451\u043d \u0430\u043b\u0438\u0430\u0441\u043e\u043c \u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0432\u0440\u043e\u0434\u0435 eza \u0441 \u0438\u043a\u043e\u043d\u043a\u0430\u043c\u0438, \u0446\u0432\u0435\u0442\u0430\u043c\u0438 \u0438 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u2014 \u0442\u0430\u043a\u043e\u0439 \u0432\u044b\u0432\u043e\u0434 \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f, \u043e\u043d \u0440\u0430\u0437\u0432\u0430\u043b\u0438\u0442\u0441\u044f. \u0410 \u0431\u0435\u0437 ls \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0430\u043b\u0438\u0430\u0441 \u043d\u0435 \u0441\u0442\u0440\u0430\u0448\u0435\u043d: ls \u0442\u0443\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0443\u0436\u0435 \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e $ANDROID_HOME! \u0411\u0435\u0437 \u043d\u0435\u0435 \u0443\u0436\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u0435 \u0432\u0441\u0435 \u043f\u043e\u0439\u0434\u0435\u0442 \u043d\u0435 \u043f\u043e \u043f\u043b\u0430\u043d\u0443. \u0415\u0441\u043b\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 ndk \u043f\u0443\u0441\u0442, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u0432\u043c\u0435\u0441\u0442\u043e \u043c\u043e\u043b\u0447\u0430\u043b\u0438\u0432\u043e\u0433\u043e \u0431\u0438\u0442\u043e\u0433\u043e \u043f\u0443\u0442\u0438.\u043e\u0442 NDK \u0443\u0436\u0435 \u0434\u043e\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u043a \u0435\u0433\u043e \u0442\u0443\u043b\u0447\u0435\u0439\u043d\u0443:export TOOLCHAIN=&#187;$NDK\/toolchains\/llvm\/prebuilt\/linux-x86_64&#8243;\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435 linux x86_64 \u043a\u0430\u043a \u0443 \u043c\u0435\u043d\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435, \u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0432 \u044d\u0442\u043e\u043c \u043f\u0443\u0442\u0438 \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f, \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e.\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0435 \u043f\u0443\u0442\u0438, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0438 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0437 \u0442\u0443\u043b\u0447\u0435\u0439\u043d\u0430 \u0432 PATH:export PATH=&#187;$TOOLCHAIN\/bin:$PATH&#187;\u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0435 ls $TOOLCHAIN\/bin \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043c\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u0446\u0435\u043b\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 aarch64-linux-android21-clang &#8212; \u044d\u0442\u043e \u0421-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 clang \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u043e\u0434 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 android \u0441 api level 21 (\u0438 \u0432\u044b\u0448\u0435, \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0434\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438) \u043f\u043e\u0434 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 aarch64 . \u0414\u0440\u0443\u0433\u0438\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0432\u0440\u043e\u0434\u0435 llvm-nm, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0438 api level, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043d\u0438\u0445 \u043d\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u0435\u0440\u0442\u043e\u043a \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430\u043c\u0438.\u0428\u0430\u0433 1. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e, \u0438 \u0435\u0441\u043b\u0438 \u0431\u044b \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b \u0441\u043f\u0438\u0441\u043e\u043a, \u043a\u0430\u043a\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043a\u0430\u043a \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c &#8212; \u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0443\u043d\u044b\u043b\u043e, \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0431\u044b \u044d\u0442\u043e \u043e\u0441\u043e\u0431\u043e \u043d\u0435 \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u043b\u043e, \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0443\u0445\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0442 \u0442\u0443\u0442 https:\/\/docs.conan.io\/en\/1.19\/systems_cross_building\/cross_building.html . \u042f \u0436\u0435 \u043f\u043e\u0439\u0434\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0438 \u0431\u0443\u0434\u0443 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043c\u043e\u0433\u0443.\u0418\u0442\u0430\u043a, \u043f\u043e\u0435\u0445\u0430\u043b\u0438.\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b\u0427\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u0443\u0436\u043d\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b. \u041e\u0431\u044b\u0447\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0434\u043b\u044f \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0432\u0440\u043e\u0434\u0435 \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a\u0430 \u0438 \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043a\u0440\u043e\u043c\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043e\u0434\u043d\u0430\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0435, \u043a\u0442\u043e \u0437\u043d\u0430\u0435\u0442 \u043a\u0430\u043a\u043e\u0439 \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a \u0432\u0430\u043c \u043d\u0443\u0436\u0435\u043d?\u0422\u0430\u043a \u0447\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0447\u0442\u043e \u0432 \u0442\u0443\u043b\u0447\u0435\u0439\u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438\u0433\u0440\u0430\u0435\u0442 \u0440\u043e\u043b\u044c \u0441\u0431\u043e\u0440\u043a\u0438 \u0444\u0430\u0439\u043b\u0430 .c \u0438\u043b\u0438 .cpp \u0432 .o \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u0431\u043e\u043b\u0435\u0435:export CC=&#187;aarch64-linux-android21-clang&#187;export CXX=&#187;aarch64-linux-android21-clang++&#187;\u0410\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440\u0410\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440 \u0443\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u0448 .o \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 .a (\u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0432\u044f\u0437\u0435\u0439 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 \u0442\u0443\u0442 \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0430)export AR=&#187;llvm-ar&#187;\u0418\u043d\u0434\u0435\u043a\u0441\u0430\u0442\u043e\u0440 \u0430\u0440\u0445\u0438\u0432\u043e\u0432\u0417\u0430\u0434\u0430\u0447\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0442\u043e\u0440\u0430 &#8212; \u0432\u0437\u044f\u0442\u044c \u043d\u0430\u0448 \u0430\u0440\u0445\u0438\u0432 .a, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u0432 \u043d\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u044d\u0442\u0438\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438 \u0434\u043e\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0442 .a . \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043d\u0435\u043c\u0443 \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432 \u043d\u0430\u0448\u0438\u0445 .aexport RANLIB=&#187;llvm-ranlib&#187;\u041b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a\u041b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a \u0432\u0430\u0448 .o \u0438\u043b\u0438 .a \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u0442 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a \u0438\u043b\u0438 .so \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u0412\u043e\u0442 \u043e\u043d \u0443\u0436\u0435 \u0438\u0449\u0435\u0442 \u043f\u043e \u043b\u0438\u043d\u043a\u0443\u0435\u043c\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c \u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f, \u043a\u0430\u043a\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0435\u0441\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043d\u0443\u0436\u043d\u044b, \u043a\u0430\u043a\u0438\u0445 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442. \u041f\u043e\u043c\u0438\u043c\u043e \u0441\u043a\u043b\u0435\u0439\u043a\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u043e\u0434\u0438\u043d \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0431\u043b\u043e\u0431, \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0438 \u0441 \u043d\u0443\u0436\u043d\u043e\u0439 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u044f\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 ffi.export LD=&#187;ld.lld&#187;\u0410\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0418\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435 \u043f\u0440\u0438\u0447\u0435\u043c \u0442\u043e\u0442 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443 LLVM &#8212; llvm-as &#8212; \u044d\u0442\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435 \u0442\u043e \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u044d\u0442\u0430 \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0447\u0438\u0442\u0430\u0435\u0442 llvm-\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0439 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 .ll \u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0435\u0433\u043e \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 .bc, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0442\u043e\u043c \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 opt \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0438 \u043f\u043e\u0442\u043e\u043c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 llc -march=aarch64 \u043c\u044b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u044d\u0442\u043e\u0442 \u0441\u0443\u043f\u0435\u0440\u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 LLVM \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u0432 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 .S \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u0434\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0422\u0430\u043a \u0432\u043e\u0442, \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 &#8212; \u044d\u0442\u043e \u0442\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u044c\u043c\u0435\u0442 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 .S \u0438\u043b\u0438 .s \u0438 \u0441\u043e\u0431\u0435\u0440\u0435\u0442 \u0435\u0433\u043e \u0432 .o . \u0418 \u0432 LLVM \u044d\u0442\u0438\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0442\u043e? clang. \u0422\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u0438, \u0434\u0430.export AS=&#187;$CC&#187;Stripstrip &#8212; \u044d\u0442\u043e \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0434\u043b\u044f \u0432\u044b\u0440\u0435\u0437\u0430\u043d\u0438\u044f \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438\u0437 .so, .a \u0438\u043b\u0438 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0430. \u041d\u0435 \u0441\u043c\u043e\u0433 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438, \u043d\u0435 \u043f\u0440\u0438\u043f\u043e\u043c\u043d\u044e \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u0440\u043c\u0438\u043d \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044bexport STRIP=&#187;llvm-strip&#187;ObjCopyobjcopy &#8212; \u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 strip, \u043f\u043e\u043c\u0438\u043c\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0445 \u0441\u0435\u043a\u0446\u0438\u0439 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\/\u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0438\u043d\u044b\u0435 \u0441\u0435\u043a\u0446\u0438\u0438 \u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e .so\/.a\/.exeexport OBJCOPY=&#187;llvm-objcopy&#187;ReadELF\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430. \u0427\u0438\u0442\u0430\u043b\u043a\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0438 .so-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.export READELF=&#187;llvm-readelf&#187;NM\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430, \u0434\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 defined\/undefined \u0432 .o\/.a\/.so. \u0411\u044b\u0441\u0442\u0440\u0430\u044f \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0438 undefined reference.export NM=&#187;llvm-nm&#187;ObjDump\u0414\u0438\u0437\u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440, \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u0442\u0430\u043c \u0432 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435 \u044d\u0442\u043e\u0433\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0430, \u0447\u0435\u0433\u043e \u043d\u0430\u0432\u0435\u0440\u0442\u0435\u043b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u0438, \u0447\u0442\u043e \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0432 \u0438\u0442\u043e\u0433\u0435. \u0414\u0438\u0437\u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u044f \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0438\u043d\u0433\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.export OBJDUMP=&#187;llvm-objdump&#187;SYSROOT\u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u043c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438 \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u043c\u0438 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0443\u0436\u0435 \u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c! SYSROOT \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0438 \u043f\u0440\u0435\u0434\u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432\u0440\u043e\u0434\u0435 crt \u0438\u043b\u0438 libc, NDK \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 SYSROOT:export SYSROOT=&#187;$TOOLCHAIN\/sysroot&#187;PREFIX\u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f, \u0442\u0443\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0442\u0430\u043c \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u0422\u0430\u043a \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0441\u0435\u0431\u0435 \u0433\u0434\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0443\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f prefix-aarch64-android21:mkdir -p prefix-aarch64-android21export PREFIX=&#187;$PWD\/prefix-aarch64-android21&#8243; # \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439\u0415\u0441\u043b\u0438 \u0431\u044b \u0432\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0438 \u043f\u043e\u0434 windows, \u0432\u0430\u043c \u0431\u044b \u0435\u0449\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0430\u0441\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f WINDRES, \u044d\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 windows-\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 .rc, \u043e\u0431\u044b\u0447\u043d\u043e \u043e\u043d \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0442\u0443\u043b\u0447\u0435\u0439\u043d\u0430\u043c\u0438 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f llvm-rcCFLAGS, CXXFLAGS\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u0434\u043b\u044f \u0443\u0442\u0438\u043b\u0438\u0442. CFLAGS &#8212; \u044d\u0442\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b \u0441\u0438\u0448\u043d\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443. CXXFLAGS &#8212; \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0421++. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u0447\u0442\u043e\u0431 \u0438\u0441\u043a\u0430\u043b \u0432 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0435 \u0438 \u0432 sysroot \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0434\u0435\u0444\u0430\u0439\u043d\u0430\u043c\u0438 ANDROID, \u0430 \u0446\u0435\u043b\u0435\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0430\u043f\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u043d\u0430\u043c\u0438 \u043e\u0431\u0435\u0440\u0442\u043a\u0430.export CFLAGS=&#187;-O2 -fPIC -I$PREFIX\/include -DANDROID -isystem $SYSROOT\/usr\/include&#187;export CXXFLAGS=&#187;-O2 -fPIC -I$PREFIX\/include -DANDROID -isystem $SYSROOT\/usr\/include&#187;\u041f\u0440\u043e CPPFLAGSCPPFLAGS &#8212; \u044d\u0442\u043e \u0444\u043b\u0430\u0433\u0438 \u0434\u043b\u044f \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 #include, #define, \u0443\u0441\u043b\u043e\u0432\u043d\u0443\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0438 \u043f\u0440\u043e\u0447\u0435\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435, \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u043c\u0443 \u043d\u0443\u0436\u043d\u044b \u0444\u043b\u0430\u0433\u0438 -I -D \u0438 \u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435, \u0430 \u0432\u043e \u0444\u043b\u0430\u0433\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442 -O2 -fPIC \u0438 \u043f\u0440\u043e\u0447\u0435\u0435 \u0442\u0430\u043a\u043e\u0435, \u043d\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443 \u043c\u0435\u043d\u044f \u0438 \u0442\u0430\u043a \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0435\u0433\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c.LDFLAGS\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a\u0430. \u201c-Wl,\u201d \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0442\u043e \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0432 \u043b\u0438\u043d\u043a\u0435\u0440, \u0442\u0430\u043a\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u0438\u0434\u0438\u043c\u043e \u043d\u0443\u0436\u0435\u043d \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043b\u0438\u043d\u043a\u0435\u0440\u043e\u043c \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0441\u0430\u043c clang \u0430 \u043d\u0435 lld, \u043d\u043e \u0438 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e ld.lld \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.-L$PREFIX\/lib &#8212; \u0438\u0449\u0438 \u0442\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0435\u0431\u0435 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043b\u0438\u043d\u043a\u043e\u0432\u0430\u0442\u044c, \u0432 $PREFIX\/lib-rpath-link,$PREFIX\/lib &#8212; \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0435\u0441\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0442\u043e \u044d\u0442\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (\u043d\u0435\u043f\u0440\u044f\u043c\u044b\u0435) \u0442\u043e\u0436\u0435 \u0438\u0449\u0438 \u0432 $PREFIX\/lib.&#8212;undefined-version &#8212; \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0443 \u043c\u043d\u043e\u0433\u0438\u0445 \u0443\u0442\u0438\u043b\u0438\u0442 \u0435\u0441\u0442\u044c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u0430\u044f \u0448\u0442\u0443\u043a\u0430, \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 libname.so, \u0430 libname.so.2.4 , \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u043a\u0438\u0445-\u043d\u0438\u0431\u0443\u0434\u044c \u0432\u0435\u0440\u0441\u0438\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439 \u043e\u0442\u044b\u0449\u0438. \u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u043b\u0430\u0433 \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a\u0430 \u043e\u0441\u043b\u0430\u0431\u043b\u044f\u0435\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0438\u0441\u043a\u043e\u043c\u044b\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438.export LDFLAGS=&#187;-L$PREFIX\/lib -Wl,-rpath-link,$PREFIX\/lib -Wl,&#8212;undefined-version&#187;\u0424\u043b\u0430\u0433\u0438 \u0434\u043b\u044f pkg-configpkg-config \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u043e\u0438\u0441\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u0415\u0441\u043b\u0438 \u043a\u0440\u0430\u0442\u043a\u043e &#8212; \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043c\u043d\u043e\u0433\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u0444\u0430\u0439\u043b\u0438\u043a .pc, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0444\u043b\u0430\u0433\u0438 \u043a \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u043c \u0438 \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a\u0430\u043c \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-495807","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/495807","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=495807"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/495807\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=495807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=495807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=495807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}