Skip to content

Commit

Permalink
Go link tool needs to find gcc on Arm platform
Browse files Browse the repository at this point in the history
Signed-off-by: Bin Lu <[email protected]>
  • Loading branch information
Bin Lu committed Jun 27, 2018
1 parent 00adf00 commit ac849b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion go/private/actions/compile.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,7 @@ def _bootstrap_compile(go, sources, out_lib, gc_goopts):
inputs = sources + go.sdk_files + go.sdk_tools,
outputs = [out_lib],
mnemonic = "GoCompile",
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=/usr/bin && {} {}".format(go.root, go.go.path, " ".join(args)),
)
2 changes: 2 additions & 0 deletions go/private/actions/link.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ def _bootstrap_link(go, archive, executable, gc_linkopts):
inputs = inputs,
outputs = [executable],
mnemonic = "GoLink",
# 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 && {} {}".format(go.root, go.go.path, " ".join(args)),
)

Expand Down

0 comments on commit ac849b1

Please sign in to comment.