Skip to content

Commit 6bef8f6

Browse files
committed
Fixed compilation of bergamot
I kept separate sentencepiece variants between RTranslator -> bergamot -> marian-dev and RTranslator -> sentencepiece-interface because marian used a older version of sentencepiece that was also forked and modified by Mozilla
1 parent ee78d43 commit 6bef8f6

6 files changed

Lines changed: 25 additions & 6 deletions

File tree

.idea/deviceManager.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,14 @@ android {
4949
'-DUSE_WASM_COMPATIBLE_SOURCE=OFF',
5050
'-DTHREADS_PREFER_PTHREAD_FLAG=ON',
5151
'-DUSE_TCMALLOC=OFF',
52-
'-DSSPLIT_USE_INTERNAL_PCRE2=ON',
52+
'-DSSPLIT_USE_INTERNAL_PCRE2:BOOL=ON',
5353
'-DUSE_PATHIECPP=ON',
54-
'-DBUILD_ARCH=armv8-a'
54+
'-DBUILD_ARCH=armv8-a',
55+
'-G',
56+
'Ninja'
5557
//'-DCMAKE_C_FLAGS="-O3 -fPIC -march=armv8-a -mtune=generic -ffast-math -funroll-loops -fdata-sections -ffunction-sections"',
5658
//'-DCMAKE_CXX_FLAGS="-O3 -fPIC -march=armv8-a -mtune=generic -ffast-math -funroll-loops -fdata-sections -ffunction-sections"'
57-
cppFlags ''
59+
cppFlags '-std=c++17'
5860
abiFilters 'arm64-v8a'
5961
}
6062
}

app/src/main/cpp/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ add_library(bergamot_translator_interface SHARED BergamotTranslator.cpp)
2424

2525

2626
target_link_libraries(sentencepiece-interface
27-
sentencepiece-static
27+
sentencepiece-static-android
2828
android
2929
log
3030
)

0 commit comments

Comments
 (0)