Workaround to solve "-lphtread" linker error on Android.
PiperOrigin-RevId: 484285361
This commit is contained in:
parent
a941c5cdd1
commit
f315e6dc58
|
@ -172,6 +172,10 @@ http_archive(
|
|||
urls = [
|
||||
"https://github.com/google/sentencepiece/archive/1.0.0.zip",
|
||||
],
|
||||
patches = [
|
||||
"//third_party:com_google_sentencepiece_no_gflag_no_gtest.diff",
|
||||
],
|
||||
patch_args = ["-p1"],
|
||||
repo_mapping = {"@com_google_glog" : "@com_github_glog_glog"},
|
||||
)
|
||||
|
||||
|
|
34
third_party/com_google_sentencepiece_no_gflag_no_gtest.diff
vendored
Normal file
34
third_party/com_google_sentencepiece_no_gflag_no_gtest.diff
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
diff --git a/src/BUILD b/src/BUILD
|
||||
index b4298d2..f3877a3 100644
|
||||
--- a/src/BUILD
|
||||
+++ b/src/BUILD
|
||||
@@ -71,9 +71,7 @@ cc_library(
|
||||
":common",
|
||||
":sentencepiece_cc_proto",
|
||||
":sentencepiece_model_cc_proto",
|
||||
- "@com_github_gflags_gflags//:gflags",
|
||||
"@com_google_glog//:glog",
|
||||
- "@com_google_googletest//:gtest",
|
||||
"@com_google_absl//absl/memory",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
diff --git a/src/normalizer.h b/src/normalizer.h
|
||||
index c16ac16..2af58be 100644
|
||||
--- a/src/normalizer.h
|
||||
+++ b/src/normalizer.h
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
-#include "gtest/gtest_prod.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "third_party/darts_clone/include/darts.h"
|
||||
#include "src/common.h"
|
||||
@@ -97,7 +96,6 @@ class Normalizer {
|
||||
friend class Builder;
|
||||
|
||||
private:
|
||||
- FRIEND_TEST(NormalizerTest, EncodeDecodePrecompiledCharsMapTest);
|
||||
|
||||
void Init();
|
||||
|
Loading…
Reference in New Issue
Block a user