If the go program compiled by a completely static compiled version of go binary compiler will also be static automatically? To be more specific, on Ubuntu 20.04, I've compiled the latest git master version of go compiler in a completely static manner as shown below:
$ which go | xargs file /home/werner/Public/repo/github.com/golang/go.git/bin/go: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=5jq4NVhOUQBZ9qoSzZZP/ZGpiMeW1vV69o1mL-B9A/6YaUKXNOw58uUviv4EeO/4sUw0l9CinylaK_Pov59, not stripped Then I try to build the dnsproxy by the following steps: $ git clone https://github.com/AdguardTeam/dnsproxy.git dnsproxy.git $ cd dnsproxy.git $ go build $ file dnsproxy dnsproxy: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=6mIriY-h59Wwm2_gwbk2/rXhgRt_o3oIf_KSuKKtt/BYmwRfWtoqym2xPocRBT/Z2CIkEn5HaeVqVhdwxYu, not stripped As you can see, the compiled dnsproxy with the completely static go compiler binary will also generate a static go program. I'm not sure if this is always true. Any hints will be highly appreciated. Regards, HY -- 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/6045f084-6e6b-4d12-a487-8434a6a65723n%40googlegroups.com.