[llgo] Force exporting __morestack from llgoi

Summary:
Force exporting __morestack from llgoi, so that
the symbol is available to the execution engine
when linking with libLLVM.so. The engine does
not reference __morestack explicitly, so must
be provided by the host program.

Reviewers: pcc

Subscribers: axw, llvm-commits

Differential Revision: http://reviews.llvm.org/D12625

llvm-svn: 254188
This commit is contained in:
Andrew Wilkins 2015-11-27 04:46:46 +00:00
parent caa3b51ad2
commit b7394b22fd
1 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,12 @@ import (
"llvm.org/llvm/bindings/go/llvm"
)
// /* Force exporting __morestack if it's available, so that it is
// available to the engine when linking with libLLVM.so. */
//
// void *__morestack __attribute__((weak));
import "C"
func getInstPrefix() (string, error) {
path, err := exec.LookPath(os.Args[0])
if err != nil {