Skip to content

Commit

Permalink
Update cgo usage (#2184)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph committed Oct 19, 2023
1 parent cd65240 commit 3b843a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/constants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fi
#
# We use "export" here instead of just setting a bash variable because we need
# to pass this flag to all child processes spawned by the shell.
export CGO_CFLAGS="-O -D__BLST_PORTABLE__"
export CGO_CFLAGS="-O2 -D__BLST_PORTABLE__"
# While CGO_ENABLED doesn't need to be explicitly set, it produces a much more
# clear error due to the default value change in go1.20.
export CGO_ENABLED=1
2 changes: 2 additions & 0 deletions scripts/mock.gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ then
go install -v github.com/palantir/go-license@v1.25.0
fi

source ./scripts/constants.sh

# tuples of (source interface import path, comma-separated interface names, output file path)
input="scripts/mocks.mockgen.txt"
while IFS= read -r line
Expand Down

0 comments on commit 3b843a3

Please sign in to comment.