Bug #18805
closedmake it easy to compile our go binaries statically
Updated by Ward Vandewege almost 3 years ago
- Status changed from New to In Progress
Updated by Ward Vandewege almost 3 years ago
Ready for review at 9ffdf93f954bfe7bfe2269d361961d653caea146 on branch 18805-easy-static-compilation
This makes
cd cmd/arvados-server CGO_ENABLED=0 GOOS=linux go build -ldflags='-s -w -extldflags=-static' -tags static
work without issues.
Updated by Ward Vandewege almost 3 years ago
- Subject changed from remove unnecessary C from our codebase to make it easy to compile our go binaries statically
Updated by Tom Clegg almost 3 years ago
LGTM.
For posterity, we determined C.sysconf(C._SC_CLK_TCK) always returns 100. The reason USER_HZ exists in the first place is to scale measurements based on the kernel-configurable HZ value to the units expected by lots of existing userland code that assumed HZ was always 100. IOW, USER_HZ is non-configurable constant by design. It is 100 on all platforms except alpha and ia64, i.e., on all platforms that have Go runtimes. Another data point: there's a Go sysconf library (https://github.com/tklauser/go-sysconf) whose _SC_CLK_TCK func just returns 100 instead of doing a syscall.
Updated by Ward Vandewege almost 3 years ago
- % Done changed from 0 to 100
- Status changed from In Progress to Resolved
Applied in changeset arvados|522c0f861c2a4bda6d74c25399ea1154f331f152.