All go code depends on the runtime for memory and go routine management, so 
the runtime will always have to be included.

On Wednesday, November 9, 2022 at 12:31:10 PM UTC-6 aviram...@gmail.com 
wrote:

> Hi,
> I wish to create a c-archive that contains only specific symbols, 
> importing on runtime the needed symbols.
> I managed to create a `.o` file that I believe contains only my functions 
> using
> `go tool compile -shared -dynlink main.go`
> but then when I do
> `go tool link -buildmode=c-archive -extld clang -extldflags='-undefined 
> dynamic_lookup' -installsuffix /tmp -o main.a main.o`
> It tries to find all the runtime stuff I want it to link at runtime.
> Thanks in advance,
> Aviram
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/23e8cde5-728a-431a-9ecb-cb24c73410edn%40googlegroups.com.

Reply via email to