Skip to content

Commit

Permalink
fix: ci build error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie authored and Jamie committed Nov 11, 2024
1 parent ce9649b commit 5c78b2f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 52 deletions.
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# YACL (Yet Another Common crypto Library)
# YACL-r (Yet Another Common crypto Library for cryptographic Research)

[![CircleCI](https://dl.circleci.com/status-badge/img/gh/secretflow/yacl/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/secretflow/yacl/tree/main)

Yacl is a C++ library that contains common cryptgraphy, network and io modules which other SecretFlow code depends on. The crypto modules in Yacl implement many state-of-art secure computation protocols, including primitives like OT, VOLE, TPRE, and tools like PRG, RO. Check the full list of Yacl's supported algorithms in [ALGORITHMS.md](ALGORITHMS.md).

Supported platforms:
| Linux x86_64 | Linux aarch64 | macOS x86_64 | macOS Apple Silicon | Windows x86_64 | Windows WSL2 x86_64 |
|--------------|---------------|----------------|---------------------|----------------|---------------------|
| yes | yes | yes<sup>1</sup>| yes | no | yes<sup>1</sup> |

1. Yacl has not been thoroughly tested on these platforms.
Yacl-r is a fork and extension of the C++ crypto library [secretflow/yacl](https://github.com/secretflow/yacl).
The crypto modules in Yacl implement many state-of-art secure computation protocols, including primitives like OT, VOLE, TPRE, and tools like PRG, RO. Check the full list of Yacl's supported algorithms in [ALGORITHMS.md](ALGORITHMS.md).

## Repo Layout

Expand Down
31 changes: 0 additions & 31 deletions SECURITY.md

This file was deleted.

1 change: 1 addition & 0 deletions cmake/AddCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ add_compiler_flags("-Werror")

# FIXME remove this flag
add_compiler_flags("-Wno-unused-function")
add_compiler_flags("-Wno-vla") # no variable length error warning

# For cryptos
add_compiler_flags("-maes")
Expand Down
18 changes: 10 additions & 8 deletions cmake/ExternalOpenSSL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ set(YACL_WITH_EXT_OPENSSL TRUE)
# https://cmake.org/cmake/help/v3.4/module/FindOpenSSL.html
find_package(OpenSSL QUIET)

if(${OPENSSL_FOUND} AND ${OPENSSL_VERSION} VERSION_GREATER "5.0.0")
message(STATUS "Found system OpenSSL (${OPENSSL_VERSION})")
set(YACL_WITH_EXT_OPENSSL FALSE)
else()
message(STATUS "OpenSSL not found, or its version is incompatiable")
message(STATUS "Use downloaded OpenSSL (${YACL_EXT_OPENSSL_VERSION}) instead")
set(YACL_WITH_EXT_OPENSSL TRUE)
endif()
set(YACL_WITH_EXT_OPENSSL TRUE)

# if(${OPENSSL_FOUND} AND ${OPENSSL_VERSION} VERSION_GREATER "5.0.0")
# message(STATUS "Found system OpenSSL (${OPENSSL_VERSION})")
# set(YACL_WITH_EXT_OPENSSL FALSE)
# else()
# message(STATUS "OpenSSL not found, or its version is incompatiable")
# message(STATUS "Use downloaded OpenSSL (${YACL_EXT_OPENSSL_VERSION}) instead")
# set(YACL_WITH_EXT_OPENSSL TRUE)
# endif()

if(YACL_WITH_EXT_OPENSSL)
ExternalProject_Add(
Expand Down
4 changes: 2 additions & 2 deletions yacl/base/int128.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ inline int CountBitWidth(uint128_t v) {

namespace std {

#if __cplusplus >= 202002L
#if __cplusplus >= 202002L || defined(__GLIBCXX__)
#else
constexpr int128_t abs(int128_t x) { return x >= 0 ? x : -x; }
#endif
Expand All @@ -134,7 +134,7 @@ struct is_scalar<uint128_t> : public true_type {};
template <>
struct is_scalar<int128_t> : public true_type {};

#if __cplusplus >= 202002L
#if __cplusplus >= 202002L || defined(__GLIBCXX__)
//-std=gnu++20 pass, -std=c++20 failed
static_assert(is_integral<uint128_t>::value == true);
static_assert(is_integral<int128_t>::value == true);
Expand Down

0 comments on commit 5c78b2f

Please sign in to comment.