Skip to content

Commit

Permalink
force CGO_ENABLED=0 env when cross-compiling project binaries
Browse files Browse the repository at this point in the history
closes #116
  • Loading branch information
djelusic committed Mar 4, 2022
1 parent 7d04f04 commit a1309cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/controller/deploy_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (d *Deploy) localDirs(path string) ([]string, error) {
func (d *Deploy) buildFunction(name, funcDir string) error {
bl := shell.NewBufferedLogger()
err := shell.Exec(shell.ExecOptions{
Args: []string{"env", "GOOS=linux", "GOARCH=arm64", "go", "build", "-o", name, "--tags", "lambda.norpc", "--trimpath"},
Args: []string{"env", "GOOS=linux", "GOARCH=arm64", "CGO_ENABLED=0", "go", "build", "-o", name, "--tags", "lambda.norpc", "--trimpath"},
WorkDir: funcDir,
Logger: bl.Logger(),
ShowExitCode: false,
Expand Down

0 comments on commit a1309cb

Please sign in to comment.