From 5d86168a57564d77dd16a0e342d5ba8adb8f2650 Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Fri, 8 Apr 2022 10:29:46 +0200 Subject: just: Add support for building static binary --- src/buildtool/main/TARGETS | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/buildtool/main/TARGETS b/src/buildtool/main/TARGETS index 6582137a..3151d9ae 100644 --- a/src/buildtool/main/TARGETS +++ b/src/buildtool/main/TARGETS @@ -1,5 +1,6 @@ { "just": { "type": ["@", "rules", "CC", "binary"] + , "arguments_config": ["BUILD_STATIC_BINARY"] , "name": ["just"] , "srcs": ["main.cpp"] , "private-hdrs": ["main.hpp"] @@ -18,5 +19,10 @@ , ["src/utils/cpp", "json"] ] , "stage": ["src", "buildtool", "main"] + , "link external": + { "type": "if" + , "cond": {"type": "var", "name": "BUILD_STATIC_BINARY"} + , "then": ["-static"] + } } } -- cgit v1.2.3