aboutsummaryrefslogtreecommitdiff
path: root/libpod/linkmode
diff options
context:
space:
mode:
authorSascha Grunert <sgrunert@suse.com>2020-03-20 10:55:23 +0100
committerSascha Grunert <sgrunert@suse.com>2020-05-11 13:11:07 +0200
commitc21258b70ed91ab5ff8b1d345123fed1011a49c9 (patch)
treed5f74fb3191ee33f8565f18971cf37426e57afa6 /libpod/linkmode
parent18b273b72ba76d485eb1b4d5df48bff1685953ff (diff)
downloadpodman-c21258b70ed91ab5ff8b1d345123fed1011a49c9.tar.gz
podman-c21258b70ed91ab5ff8b1d345123fed1011a49c9.tar.bz2
podman-c21258b70ed91ab5ff8b1d345123fed1011a49c9.zip
Add podman static build
We’re now able to build a static podman binary based on a custom nix derivation. This is integrated in cirrus as well, whereas a later target would be to provide a self-contained static binary bundle which can be installed on any Linux x64-bit system. Fixes: https://github.com/containers/libpod/issues/1399 Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Diffstat (limited to 'libpod/linkmode')
-rw-r--r--libpod/linkmode/linkmode_dynamic.go8
-rw-r--r--libpod/linkmode/linkmode_static.go8
2 files changed, 16 insertions, 0 deletions
diff --git a/libpod/linkmode/linkmode_dynamic.go b/libpod/linkmode/linkmode_dynamic.go
new file mode 100644
index 000000000..6d51d60e0
--- /dev/null
+++ b/libpod/linkmode/linkmode_dynamic.go
@@ -0,0 +1,8 @@
+// +build !static
+
+package linkmode
+
+// Linkmode returns the linking mode (static/dynamic) for the build.
+func Linkmode() string {
+ return "dynamic"
+}
diff --git a/libpod/linkmode/linkmode_static.go b/libpod/linkmode/linkmode_static.go
new file mode 100644
index 000000000..2db083f4a
--- /dev/null
+++ b/libpod/linkmode/linkmode_static.go
@@ -0,0 +1,8 @@
+// +build static
+
+package linkmode
+
+// Linkmode returns the linking mode (static/dynamic) for the build.
+func Linkmode() string {
+ return "static"
+}