Fix bug for sentencepiece build

This commit is contained in:
ozanarmagan 2023-05-09 11:29:58 +03:00
parent b486ee8cd3
commit b713a12be1

View File

@ -30,15 +30,19 @@ cmake(
install = False,
cache_entries = {
'SPM_USE_BUILTIN_PROTOBUF': 'OFF',
'Protobuf_LIBRARY': '$EXT_BUILD_ROOT/bazel-out/k8-fastbuild/bin/external/com_google_protobuf/',
'Protobuf_LITE_LIBRARY': '$EXT_BUILD_ROOT/bazel-out/k8-fastbuild/bin/external/com_google_protobuf/',
'Protobuf_LIBRARY': '$EXT_BUILD_ROOT/bazel-out/k8-fastbuild/bin/external/com_google_protobuf/libprotobuf.a',
'Protobuf_LITE_LIBRARY': '$EXT_BUILD_ROOT/bazel-out/k8-fastbuild/bin/external/com_google_protobuf/libprotobuf-lite.a',
'Protobuf_PROTOC_EXECUTABLE': '$EXT_BUILD_ROOT/bazel-out/k8-fastbuild/bin/external/com_google_protobuf/protoc',
'Protobuf_INCLUDE_DIR': '$EXT_BUILD_ROOT/external/com_google_protobuf/src',
'CMAKE_POLICY_DEFAULT_CMP0111':'OLD'
},
deps = [
"@com_google_protobuf//:protoc",
"@com_google_protobuf//:protobuf_lite",
"@com_google_protobuf//:protobuf",
"@com_google_protobuf//:protobuf_headers",
],
tags = ["no-sandbox"],
postfix_script= """
echo "Intstalling sentencepiece"
cp $BUILD_TMPDIR/src/libsentencepiece.a $INSTALLDIR/lib/libsentencepiece.a