Skip to content

Commit

Permalink
cmd/link: fix TestLargeText
Browse files Browse the repository at this point in the history
Do not need to add single quotes '' when passing the parameter value of
 the -ldflags option, otherwise the following error will be reported:
invalid value "'-linkmode=external'" for flag -ldflags: parameter may
not start with quote character.

Change-Id: I322fa7079ac24c8a68d9cb0872b0a20dbc4893d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/410074
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Run-TryBot: Eric Fang <eric.fang@arm.com>
  • Loading branch information
eric fang committed Jun 3, 2022
1 parent 74dc84a commit 7846e25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/link/linkbig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func TestLargeText(t *testing.T) {
}

// Build and run with external linking
cmd = exec.Command(testenv.GoToolPath(t), "build", "-o", "bigtext", "-ldflags", "'-linkmode=external'")
cmd = exec.Command(testenv.GoToolPath(t), "build", "-o", "bigtext", "-ldflags", "-linkmode=external")
cmd.Dir = tmpdir
out, err = cmd.CombinedOutput()
if err != nil {
Expand Down

0 comments on commit 7846e25

Please sign in to comment.