Skip to content

Commit

Permalink
repo-sync-2023-12-21T10:26:36+0800
Browse files Browse the repository at this point in the history
  • Loading branch information
shanzhu.cjm committed Dec 21, 2023
1 parent 44c888a commit 861d6c6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
22 changes: 14 additions & 8 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def yacl_deps():
_com_github_google_cpu_features()
_com_github_dltcollab_sse2neon()
_com_github_msgpack_msgpack()
_com_github_greendow_hash_drbg()

# crypto related
_com_github_openssl_openssl()
Expand All @@ -61,14 +62,6 @@ def yacl_deps():
remote = "{}/interconnection.git".format(SECRETFLOW_GIT),
)

maybe(
git_repository,
name = "com_github_greendow_hash_drbg",
build_file = "@yacl//bazel:hash_drbg.BUILD",
commit = "2411fa9d0de81c69dce2a48555c30298253db15d",
remote = "https://github.com/greendow/Hash-DRBG.git",
)

# Add homebrew openmp for macOS, somehow..homebrew installs to different location on Apple Silcon/Intel macs.. so we need two rules here
native.new_local_repository(
name = "macos_omp_x64",
Expand Down Expand Up @@ -331,6 +324,19 @@ def _com_github_msgpack_msgpack():
build_file = "@yacl//bazel:msgpack.BUILD",
)

def _com_github_greendow_hash_drbg():
maybe(
http_archive,
name = "com_github_greendow_hash_drbg",
sha256 = "c03a3da5742d0f0c40232817d84f21d8eed4c4af498c4dff3a51b3bcadcb3787",
type = "tar.gz",
strip_prefix = "Hash-DRBG-2411fa9d0de81c69dce2a48555c30298253db15d",
urls = [
"https://github.com/greendow/Hash-DRBG/archive/2411fa9d0de81c69dce2a48555c30298253db15d.tar.gz",
],
build_file = "@yacl//bazel:hash_drbg.BUILD",
)

def _com_github_herumi_mcl():
maybe(
http_archive,
Expand Down
4 changes: 2 additions & 2 deletions yacl/utils/spi/argument/arg_kv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ const std::string& SpiArg::Key() const { return key_; }

bool SpiArg::HasValue() const { return value_.has_value(); }

SpiArg SpiArg::operator=(const char* value) {
SpiArg& SpiArg::operator=(const char* value) {
value_ = absl::AsciiStrToLower(std::string(value));
return *this;
}

SpiArg SpiArg::operator=(const std::string& value) {
SpiArg& SpiArg::operator=(const std::string& value) {
value_ = absl::AsciiStrToLower(value);
return *this;
}
Expand Down
4 changes: 2 additions & 2 deletions yacl/utils/spi/argument/arg_kv.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ class SpiArg {
}

// Specialized functions of operator=<T>
SpiArg operator=(const char *value);
SpiArg operator=(const std::string &value);
SpiArg &operator=(const char *value);
SpiArg &operator=(const std::string &value);

const std::string &Key() const;
bool HasValue() const;
Expand Down

0 comments on commit 861d6c6

Please sign in to comment.