Я установил следующие настройки компилятора и компоновщика для сборки harfbuzz для моей библиотеки IOS:
CC=clang
CXX=clang++ CXXFLAGS='-miphoneos-version-min=9.0 -stdlib=libc++ -pipe -arch arm64 -no-cpp-precomp -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include -I./include/ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -Wl,-headerpad_max_install_names -fembed-bitcode' CFLAGS=' -miphoneos-version-min=9.0 -pipe -arch arm64 -no-cpp-precomp -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include -I./include/ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -Wl,-headerpad_max_install_names -fembed-bitcode' ./configure --with-freetype=no --with-glib=no --with-cairo=no --with-fontconfig=no --enable-static --host=arm-apple-darwin --with-icu=no
После этого я запускаю команду make и получаю следующую ошибку: ld: -bind_at_load и -bitcode_bundle (настройка Xcode ENABLE_BITCODE = YES) нельзя использовать вместе.
Ниже приведена трассировка стека:
manas-534:harfbuzz manasaga$ make
/Users/manasaga/Downloads/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in src
/Users/manasaga/Downloads/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in hb-ucdn
CC libhb_ucdn_la-ucdn.lo
CCLD libhb-ucdn.la
CXX libharfbuzz_la-hb-blob.lo
CXX libharfbuzz_la-hb-buffer-serialize.lo
CXX libharfbuzz_la-hb-buffer.lo
CXX libharfbuzz_la-hb-common.lo
CXX libharfbuzz_la-hb-face.lo
CXX libharfbuzz_la-hb-font.lo
CXX libharfbuzz_la-hb-map.lo
CXX libharfbuzz_la-hb-ot-tag.lo
CXX libharfbuzz_la-hb-set.lo
CXX libharfbuzz_la-hb-shape.lo
CXX libharfbuzz_la-hb-shape-plan.lo
CXX libharfbuzz_la-hb-shaper.lo
CXX libharfbuzz_la-hb-static.lo
CXX libharfbuzz_la-hb-unicode.lo
CXX libharfbuzz_la-hb-warning.lo
CXX libharfbuzz_la-hb-aat-layout.lo
CXX libharfbuzz_la-hb-ot-face.lo
CXX libharfbuzz_la-hb-ot-font.lo
CXX libharfbuzz_la-hb-ot-layout.lo
CXX libharfbuzz_la-hb-ot-color.lo
CXX libharfbuzz_la-hb-ot-map.lo
CXX libharfbuzz_la-hb-ot-math.lo
CXX libharfbuzz_la-hb-ot-shape.lo
CXX libharfbuzz_la-hb-ot-shape-complex-arabic.lo
CXX libharfbuzz_la-hb-ot-shape-complex-default.lo
CXX libharfbuzz_la-hb-ot-shape-complex-hangul.lo
CXX libharfbuzz_la-hb-ot-shape-complex-hebrew.lo
CXX libharfbuzz_la-hb-ot-shape-complex-indic.lo
CXX libharfbuzz_la-hb-ot-shape-complex-indic-table.lo
CXX libharfbuzz_la-hb-ot-shape-complex-khmer.lo
CXX libharfbuzz_la-hb-ot-shape-complex-myanmar.lo
CXX libharfbuzz_la-hb-ot-shape-complex-thai.lo
CXX libharfbuzz_la-hb-ot-shape-complex-tibetan.lo
CXX libharfbuzz_la-hb-ot-shape-complex-use.lo
CXX libharfbuzz_la-hb-ot-shape-complex-use-table.lo
CXX libharfbuzz_la-hb-ot-shape-normalize.lo
CXX libharfbuzz_la-hb-ot-shape-fallback.lo
CXX libharfbuzz_la-hb-ot-var.lo
CXX libharfbuzz_la-hb-fallback-shape.lo
CXX libharfbuzz_la-hb-ucdn.lo
make[5]: Nothing to be done for `all'.
GEN libharfbuzz.la
CXX libharfbuzz_subset_la-hb-static.lo
CXX libharfbuzz_subset_la-hb-subset.lo
CXX libharfbuzz_subset_la-hb-subset-glyf.lo
CXX libharfbuzz_subset_la-hb-subset-input.lo
CXX libharfbuzz_subset_la-hb-subset-plan.lo
CXXLD libharfbuzz-subset.la
CXX main-main.o
CXXLD main
ld: -bind_at_load and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [main] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Редактировать: Мой обновленный компоновщик и настройки компилятора
CC=clang CXX=clang++ IPHONEOS_DEPLOYMENT_TARGET=9.0 LD=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld LDFLAGS='-arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk' AS=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/as AR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar LIBTOOL=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool CXXFLAGS='-stdlib=libc++ -pipe -arch arm64 -no-cpp-precomp -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include -I./include/ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -Wl,-headerpad_max_install_names -fembed-bitcode' CFLAGS='-pipe -arch arm64 -no-cpp-precomp -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include -I./include/ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -Wl,-headerpad_max_install_names -fembed-bitcode' ./configure --with-freetype=no --with-glib=no --with-cairo=no --with-fontconfig=no --enable-static --host=arm-apple-darwin -with-cross-build=/Users/manasaga/Perforce/releases/esg/lipika/main/wrservices/External/Harfbuzz/Source/harfbuzz/ios_mac/ --with-icu=no