; rm -r $WORK/b001/
> ```
>
> The modified part of script is using llvm-goc `-c` option to compile
> `utils.go, main.go` to object files with option `-emit-llvm` added for
> llvm-link's final linking of all object files.
>
> After I get `$WORK/b001/_go_.o`, I us
c `-c` option to compile
> `utils.go, main.go` to object files with option `-emit-llvm` added for
> llvm-link's final linking of all object files.
>
> After I get `$WORK/b001/_go_.o`, I use llvm-link to link all _go_.o to get
> a whole program llvm IR. But errors occur when
'
```
I succeeded to generate a whole program llvm IR last weekend, but I forgot
what I did to get it. The key point might not be the soft link.
What can I do?
在2022年10月28日星期五 UTC+8 14:17:46 写道:
> Thanks. What I meant was that you showed us the errors from the generated
>
962446f5337585f526e576b335a45
/data/mygo/gollvm_workarea/install/tools/buildid -w $WORK/b001/exe/a.out #
internal
cp $WORK/b001/exe/a.out easyPkg
rm -r $WORK/b001/
```
在2022年10月28日星期五 UTC+8 14:17:46 写道:
> Thanks. What I meant was that you showed us the errors from the generated
> sh
r supports that option. The
> errors about -fgo-importcfg and -ffile-prefix-map can be ignored.
>
> Not sure what is happening elsewhere, though. You showed the output
> but not the commands.
>
> Ian
>
>
>
> > On Thu, Oct 27, 2022 at 12:05 PM 'Qing
ion '-fgo-importcfg=/dev/null'
>
> The Go command only passes this option to the compiler if it thinks that
> the compiler is the main go compiler ("gc") as opposed to gollvm. What
> output do you get when you run "go version" ?
>
> Thanks, Tha
the GoLLVM is based on LLVM 15.0.0
Example to reproduce:
The structure of project is as follows:
```
easyPkg/
├── go.mod
├── main.go
└── Pkg
└── utils.go
```
main.go
```
package main
import "easyPkg/Pkg"
func main() {
Pkg.PkgFunc()
}
```
utils.go
```
package Pkg
func PkgFunc() {