From 64795144f374512dba2d6a92b9a90e2c0a0c3e5c Mon Sep 17 00:00:00 2001 From: yujinqiu Date: Thu, 12 Oct 2023 16:16:02 +0800 Subject: [PATCH] Fix linker issue (#357) * Expose VAD isDetected api to Swift * Fix link issue --- build-ios.sh | 13 ++++++++++--- build-swift-macos.sh | 5 ++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/build-ios.sh b/build-ios.sh index 855b92dd6..e5fa9e2a0 100755 --- a/build-ios.sh +++ b/build-ios.sh @@ -127,7 +127,8 @@ cmake --build build/os64 --target install echo "Generate xcframework" mkdir -p "build/simulator/lib" -for f in libkaldi-native-fbank-core.a libsherpa-onnx-c-api.a libsherpa-onnx-core.a; do +for f in libkaldi-native-fbank-core.a libsherpa-onnx-c-api.a libsherpa-onnx-core.a \ + libsherpa-onnx-fst.a libsherpa-onnx-kaldifst-core.a libkaldi-decoder-core.a; do lipo -create build/simulator_arm64/lib/${f} \ build/simulator_x86_64/lib/${f} \ -output build/simulator/lib/${f} @@ -138,12 +139,18 @@ done libtool -static -o build/simulator/sherpa-onnx.a \ build/simulator/lib/libkaldi-native-fbank-core.a \ build/simulator/lib/libsherpa-onnx-c-api.a \ - build/simulator/lib/libsherpa-onnx-core.a + build/simulator/lib/libsherpa-onnx-core.a \ + build/simulator/lib/libsherpa-onnx-fst.a \ + build/simulator/lib/libsherpa-onnx-kaldifst-core.a \ + build/simulator/lib/libkaldi-decoder-core.a libtool -static -o build/os64/sherpa-onnx.a \ build/os64/lib/libkaldi-native-fbank-core.a \ build/os64/lib/libsherpa-onnx-c-api.a \ - build/os64/lib/libsherpa-onnx-core.a + build/os64/lib/libsherpa-onnx-core.a \ + build/os64/lib/libsherpa-onnx-fst.a \ + build/os64/lib/libsherpa-onnx-kaldifst-core.a \ + build/os64/lib/libkaldi-decoder-core.a rm -rf sherpa-onnx.xcframework diff --git a/build-swift-macos.sh b/build-swift-macos.sh index a346adbb5..a1b06205c 100755 --- a/build-swift-macos.sh +++ b/build-swift-macos.sh @@ -26,4 +26,7 @@ make install libtool -static -o ./install/lib/libsherpa-onnx.a \ ./install/lib/libsherpa-onnx-c-api.a \ ./install/lib/libsherpa-onnx-core.a \ - ./install/lib/libkaldi-native-fbank-core.a + ./install/lib/libkaldi-native-fbank-core.a \ + ./install/lib/libsherpa-onnx-fst.a \ + ./install/lib/libsherpa-onnx-kaldifst-core.a \ + ./install/lib/libkaldi-decoder-core.a