remove source builds of herumi

This commit is contained in:
nisdas
2021-04-06 18:20:20 +08:00
parent 9438cf2ad5
commit ac7dd133ed
5 changed files with 0 additions and 227 deletions

View File

@@ -84,7 +84,6 @@ build:fuzz --linkopt -Wl,--no-as-needed
build:fuzz --define=gc_goopts=-d=libfuzzer,checkptr
build:fuzz --run_under=//tools:fuzz_wrapper
build:fuzz --compilation_mode=opt
build:fuzz --define=blst_enabled=false
test:fuzz --local_test_jobs="HOST_CPUS*.5"

View File

@@ -1,24 +0,0 @@
package(default_visibility = ["//visibility:public"])
cc_library(
name = "bls_c384_256",
srcs = [
"src/bls_c384_256.cpp",
],
deps = [
"@herumi_mcl//:bn",
],
hdrs = [
"include/bls/bls.h",
"src/bls_c_impl.hpp",
"src/qcoeff-bn254.hpp",
],
includes = [
"include",
],
copts = [
"-DBLS_SWAP_G",
"-DBLS_ETH",
"-std=c++03",
],
)

View File

@@ -1,93 +1,5 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
config_setting(
name = "use_gmp",
values = {"define": "BLS_USE_GMP=true"},
)
config_setting(
name = "use_openssl",
values = {"define": "BLS_USE_OPENSSL=true"},
)
OPTS = [
"-DMCL_LLVM_BMI2=0",
"-DMCL_USE_LLVM=1",
"-DMCL_VINT_FIXED_BUFFER",
"-DMCL_SIZEOF_UNIT=8",
"-DMCL_MAX_BIT_SIZE=384",
"-DCYBOZU_DONT_USE_EXCEPTION",
"-DCYBOZU_DONT_USE_STRING",
"-DBLS_SWAP_G",
"-DBLS_ETH",
] + select({
":use_gmp": [],
"//conditions:default": [
"-DMCL_USE_VINT",
],
}) + select({
":use_openssl": [],
"//conditions:default": [
"-DMCL_DONT_USE_OPENSSL",
],
})
genrule(
name = "base64_ll",
outs = ["src/base64.ll"], # llvm assembly language file.
tools = [
"@herumi_mcl//:src_gen",
],
cmd = "touch func.list && $(location @herumi_mcl//:src_gen) -u 64 -f func.list > $@",
)
genrule(
name = "base64_o",
srcs = [
"src/base64.ll",
],
outs = ["base64.o"],
cmd = "$(CC) $(CC_FLAGS) -c -o $@ $(location src/base64.ll)",
toolchains = [
"@bazel_tools//tools/cpp:current_cc_toolchain",
"@bazel_tools//tools/cpp:cc_flags",
],
)
cc_library(
name = "lib",
srcs = [
"@herumi_mcl//:src/fp.cpp",
"@herumi_bls//:src/bls_c384_256.cpp",
"@herumi_bls//:src/bls_c_impl.hpp",
":base64_o",
],
deps = ["@herumi_mcl//:bn"],
includes = [
"bls/include",
],
hdrs = [
"bls/include/bls/bls.h",
"bls/include/bls/bls384_256.h",
"bls/include/mcl/bn.h",
"bls/include/mcl/bn_c384_256.h",
"@herumi_mcl//:include/mcl/curve_type.h",
],
copts = OPTS + [
"-std=c++03",
],
linkopts = select({
":use_gmp": ["-lgmp"],
"//conditions:default": [],
}) + select({
":use_openssl": [
"-lssl",
"-lcrypto",
],
"//conditions:default": [],
}),
visibility = ["//visibility:public"],
)
cc_library(
name = "precompiled",
@@ -125,13 +37,6 @@ cc_library(
deprecation = "Using precompiled BLS archives. To build BLS from source with llvm, use --config=llvm.",
)
config_setting(
name = "llvm_compiler_enabled",
define_values = {
"compiler": "llvm",
},
)
go_library(
name = "go_default_library",
importpath = "github.com/herumi/bls-eth-go-binary/bls",
@@ -142,7 +47,6 @@ go_library(
"bls/mcl.go",
],
cdeps = select({
":llvm_compiler_enabled": [":lib"],
"//conditions:default": [":precompiled"],
}),
cgo = True,

View File

@@ -2,8 +2,6 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
"""
Herumi's BLS library for go depends on
- herumi/mcl
- herumi/bls
- herumi/bls-eth-go-binary
"""
@@ -18,26 +16,6 @@ def bls_dependencies():
sha256 = "9d794d0856bfab78953798b5f446148ed5413c5e5695857c34e2282a80439f2c",
build_file = "@prysm//third_party/herumi:bls_eth_go_binary.BUILD",
)
_maybe(
http_archive,
name = "herumi_mcl",
strip_prefix = "mcl-c08437c973004cf64895da197eb7076d44354aff",
urls = [
"https://github.com/herumi/mcl/archive/c08437c973004cf64895da197eb7076d44354aff.tar.gz",
],
sha256 = "4118dfdcf86d98cdc78349cf9e51a0b58f4ecfea4b974a3d2df9ea11dd2cb6ad",
build_file = "@prysm//third_party/herumi:mcl.BUILD",
)
_maybe(
http_archive,
name = "herumi_bls",
strip_prefix = "bls-4ae022a6bb71dc518d81f22141d71d2a1f767ab3",
urls = [
"https://github.com/herumi/bls/archive/4ae022a6bb71dc518d81f22141d71d2a1f767ab3.tar.gz",
],
sha256 = "9f07c0ce33502e3bd2a3018814ed509093a0865ce16fa16cefff7ba11fb4537e",
build_file = "@prysm//third_party/herumi:bls.BUILD",
)
def _maybe(repo_rule, name, **kwargs):
if name not in native.existing_rules():

View File

@@ -1,84 +0,0 @@
package(default_visibility = ["//visibility:public"])
cc_library(
name = "fp",
srcs = [
"src/fp.cpp",
] + select({
"@io_bazel_rules_go//go/platform:android_arm": [
"src/asm/arm.s",
],
"@io_bazel_rules_go//go/platform:linux_arm64": [
"src/asm/aarch64.s",
],
"@io_bazel_rules_go//go/platform:android_arm64": [
"src/asm/aarch64.s",
],
"@io_bazel_rules_go//go/platform:darwin_amd64": [
"src/asm/x86-64mac.s",
],
"@io_bazel_rules_go//go/platform:linux_amd64": [
"src/asm/x86-64.s",
],
"@io_bazel_rules_go//go/platform:windows_amd64": [
"src/asm/x86-64.s",
],
}),
includes = [
"include",
],
hdrs = glob([
"src/xbyak/*.h",
"include/cybozu/*.hpp",
]) + [
"include/mcl/op.hpp",
"include/mcl/gmp_util.hpp",
"include/mcl/vint.hpp",
"include/mcl/randgen.hpp",
"include/mcl/array.hpp",
"include/mcl/util.hpp",
"include/mcl/fp_tower.hpp",
"include/mcl/fp.hpp",
"include/mcl/conversion.hpp",
"src/low_func.hpp",
"src/fp_generator.hpp",
"src/proto.hpp",
"src/low_func_llvm.hpp",
],
)
cc_library(
name = "bn",
srcs = [
"src/bn_c384_256.cpp",
],
deps = [":fp"],
hdrs = [
"include/mcl/bn.h",
"include/mcl/curve_type.h",
"include/mcl/impl/bn_c_impl.hpp",
"include/mcl/bls12_381.hpp",
"include/mcl/bn_c384_256.h",
"include/mcl/ec.hpp",
"include/mcl/mapto_wb19.hpp",
"include/mcl/ecparam.hpp",
"include/mcl/lagrange.hpp",
"include/mcl/bn.hpp",
"include/mcl/operator.hpp",
"include/mcl/window_method.hpp",
],
includes = ["include"],
)
# src_gen is a tool to generate some llvm assembly language file.
cc_binary(
name = "src_gen",
srcs = [
"src/gen.cpp",
"src/llvm_gen.hpp",
] + glob([
"include/cybozu/*.hpp",
"include/mcl/*.hpp",
]),
includes = ["include"],
)