Skip to content

Commit

Permalink
Go link tool needs to find gcc on Arm platform (bazel-contrib#1574)
Browse files Browse the repository at this point in the history
Signed-off-by: Bin Lu <bin.lu@arm.com>
  • Loading branch information
lubinszARM authored and jayconrod committed Jun 29, 2018
1 parent 89e85eb commit 3fcd473
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion go/private/actions/link.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ def _bootstrap_link(go, archive, executable, gc_linkopts):
inputs = inputs,
outputs = [executable],
mnemonic = "GoLink",
command = "export GOROOT=$(pwd)/{} && export GOROOT_FINAL=GOROOT && {} {}".format(go.root, go.go.path, " ".join(args)),
# workaround: go link tool needs some features of gcc to complete the job on Arm platform.
# So, PATH for 'gcc' is required here on Arm platform.
command = "export GOROOT=$(pwd)/{} && export GOROOT_FINAL=GOROOT && export PATH={} && {} {}".format(go.root, go.cgo_tools.compiler_path, go.go.path, " ".join(args)),
)

def _extract_extldflags(gc_linkopts, extldflags):
Expand Down

0 comments on commit 3fcd473

Please sign in to comment.