Build as PIE

This commit is contained in:
RandyTheSilly committed 2026-10-26 23:59:04 -04:00
1 parent 0aa9fc0bda
commit c8abca2912
4 files changed
+9 -9

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
## Building
Official binaries are stripped of debug info for size and built without CGO (except for distribution packages) for portability, as follows:
Official binaries are built without CGO (for portability), built position-independent (for security, allows [ASLR](https://en.wikipedia.org/wiki/Address_space_layout_randomization)), and stripped of debug info (for size reduction), as follows:
```
CGO_ENABLED=0 go build -ldflags="-s -w" -trimpath -tags=stxAll ./mutn.go
CGO_ENABLED=0 go build -buildmode=pie -ldflags="-s -w" -trimpath -tags=stxAll ./mutn.go
```
Additionally, some custom build tags can be used to create different binaries. The following tags are not used in official builds: