From b667c68c872eeec900a830cc4ca37c5a136de681 Mon Sep 17 00:00:00 2001 From: Justin Traglia <95511699+jtraglia@users.noreply.github.com> Date: Fri, 29 Sep 2023 15:35:15 -0500 Subject: [PATCH] Default to the portable version of blst (#12720) * Default to the portable version of blst * Update based on review comments --------- Co-authored-by: Preston Van Loon --- .bazelrc | 2 +- .github/workflows/go.yml | 8 ++++---- third_party/blst/blst.BUILD | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.bazelrc b/.bazelrc index d6cff251f2..443744d289 100644 --- a/.bazelrc +++ b/.bazelrc @@ -15,7 +15,7 @@ coverage --define=coverage_enabled=1 # Stamp binaries with git information build --workspace_status_command=./hack/workspace_status.sh -build --define blst_disabled=false --define blst_modern=true +build --define blst_disabled=false run --define blst_disabled=false build:blst_disabled --define blst_disabled=true diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 9ea889caac..e3e846cb7c 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -75,14 +75,14 @@ jobs: - name: Build # Use blst tag to allow go and bazel builds for blst. run: go build -v ./... - env: - CGO_CFLAGS: "-O -D__BLST_PORTABLE__" + env: + CGO_CFLAGS: "-O2 -D__BLST_PORTABLE__" # fuzz leverage go tag based stubs at compile time. # Building and testing with these tags should be checked and enforced at pre-submit. - name: Test for fuzzing run: go test -tags=fuzz,develop ./... -test.run=^Fuzz - env: - CGO_CFLAGS: "-O -D__BLST_PORTABLE__" + env: + CGO_CFLAGS: "-O2 -D__BLST_PORTABLE__" # Tests run via Bazel for now... # - name: Test diff --git a/third_party/blst/blst.BUILD b/third_party/blst/blst.BUILD index 8d9c2ddd61..d1ba23204e 100644 --- a/third_party/blst/blst.BUILD +++ b/third_party/blst/blst.BUILD @@ -23,7 +23,7 @@ go_library( "-D__BLST_CGO__", "-Ibindings", "-Isrc", - "-O", + "-O2", ] + select({ "@io_bazel_rules_go//go/platform:amd64": [ "-mno-avx", @@ -86,7 +86,7 @@ cc_library( "build/assembly.S", ], copts = [ - "-O", + "-O2", ] + select({ "@io_bazel_rules_go//go/platform:amd64": [ "-mno-avx",