mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-10-28 21:58:16 -04:00
Build as PIE
This commit is contained in:
1 parent
0aa9fc0bda
commit
c8abca2912
4 files changed
+9
-9
No files matched your search
+2
-2
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user