Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added race flag to our build #1052

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions build/coreum/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const (

cosmovisorBinaryPath = "bin/cosmovisor"
goCoverFlag = "-cover"
goRaceFlag = "-race"
)

var defaultBuildTags = []string{"netgo", "ledger"}
Expand All @@ -54,12 +55,13 @@ func BuildCoredLocally(ctx context.Context, deps types.DepsFunc) error {
CGOEnabled: true,
Tags: defaultBuildTags,
LDFlags: ldFlags,
Flags: []string{goCoverFlag, goRaceFlag},
})
}

// BuildCoredInDocker builds cored in docker.
func BuildCoredInDocker(ctx context.Context, deps types.DepsFunc) error {
return buildCoredInDocker(ctx, deps, tools.TargetPlatformLinuxLocalArchInDocker, []string{goCoverFlag},
return buildCoredInDocker(ctx, deps, tools.TargetPlatformLinuxLocalArchInDocker, []string{goCoverFlag, goRaceFlag},
binaryName, "")
}

Expand All @@ -81,7 +83,7 @@ func BuildExtendedCoredInDocker(ctx context.Context, deps types.DepsFunc) error
return err
}

err = buildCoredInDocker(ctx, deps, tools.TargetPlatformLinuxLocalArchInDocker, []string{goCoverFlag},
err = buildCoredInDocker(ctx, deps, tools.TargetPlatformLinuxLocalArchInDocker, []string{goCoverFlag, goRaceFlag},
extendedBinaryName, "ext")
if err != nil {
return err
Expand Down
Loading