[go-nuts] Re: Maybe a Bug? The Go compiler stores a stack pointer into a global object

2023-08-02 Thread Qingwei Li
I notice that Go1.17.7 still allocates the array on heap by calling newobject while Go1.18 allocates the array on stack. I also notice that in the release note of Go1.18 that "The garbage collector now includes non-heap sources of garbage collector work". Does the GC in 1.18 and following

[go-nuts] How to collect information in each package’s source code directory when building a project

2023-03-15 Thread Qingwei Li
I'm trying to collect information dumped in each package's source code directory when building a project. I have tried to ask in How to collect information in each package's source code directory when building a project - Getting Help - Go Forum (golangbridge.org)

Re: [go-nuts] GoLLVM: using the result of `go build -x . ` to rebuild the program got failed

2022-11-01 Thread 'Qingwei Li' via golang-nuts
c -c -emit-llvm -O2 -g -m64 > -fdebug-prefix-map=$WORK=/tmp/go-build -gno-record-gcc-switches > -o $WORK/b001/_go_.o -I $WORK/b001/_importcfgroot_ > ./main.go $WORK/b001/_gomod_.go`. The error is as follows. > > ``` > ./main.go:3:19: error: > /tmp/go-build3930504361

Re: [go-nuts] GoLLVM: using the result of `go build -x . ` to rebuild the program got failed

2022-11-01 Thread 'Qingwei Li' via golang-nuts
d-gcc-switches > -o $WORK/b001/_go_.o -I $WORK/b001/_importcfgroot_ > ./main.go $WORK/b001/_gomod_.go`. The error is as follows. > > ``` > ./main.go:3:19: error: > /tmp/go-build3930504361/b001/_importcfgroot_/easyPkg/libPkg.a exists but > does not contain any Go export dat

Re: [go-nuts] GoLLVM: using the result of `go build -x . ` to rebuild the program got failed

2022-11-01 Thread 'Qingwei Li' via golang-nuts
C+8 00:55:03 写道: >> >>> On Thu, Oct 27, 2022 at 9:11 AM 'Than McIntosh' via golang-nuts >>> wrote: >>> > >>> > >/data/mygo/gollvm_workarea/install/bin/llvm-goc: error: unrecognized >>> command line option '-fgo-importcfg=/dev/null' >&

Re: [go-nuts] GoLLVM: using the result of `go build -x . ` to rebuild the program got failed

2022-10-28 Thread 'Qingwei Li' via golang-nuts
s that you showed us the errors from the generated > shell script, but you didn't show us the commands being run by the shell > script that generated those errors. Trying running the script with the -x > option. > > Ian > > On Thu, Oct 27, 2022, 7:05 PM 'Qingwei Li' vi

Re: [go-nuts] GoLLVM: using the result of `go build -x . ` to rebuild the program got failed

2022-10-27 Thread 'Qingwei Li' via golang-nuts
on. 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 'Qingwei Li' via golang-nuts &

Re: [go-nuts] GoLLVM: using the result of `go build -x . ` to rebuild the program got failed

2022-10-27 Thread 'Qingwei Li' via golang-nuts
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, Than > >

[go-nuts] GoLLVM: using the result of `go build -x . ` to rebuild the program got failed

2022-10-27 Thread 'Qingwei Li' via golang-nuts
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() {