summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2024-05-03 12:53:57 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2024-05-03 19:27:11 +0200
commitf3125052cf16022d906163ffe1ba1513d4a026a0 (patch)
tree824d4b0f13b775a15b988fa4211e7a951c482e8d
parentdb6989f4e1eab525a8387594dfee628ddddca0d3 (diff)
downloadjustbuild-static-binaries-f3125052cf16022d906163ffe1ba1513d4a026a0.tar.gz
Remove local toolchain definition
... as Justbuild (>= 1.3.0~beta1) supports static linking for all intermediate binaries (protoc etc.) via setting TOOLCHAIN_CONFIG[BUILD_STATIC].
-rw-r--r--TARGETS1
-rwxr-xr-xetc/generate-repos.sh5
-rw-r--r--etc/repos.json18
-rw-r--r--etc/repos.template.json7
-rw-r--r--etc/toolchain/CC/TARGETS6
-rw-r--r--etc/toolchain/patch/TARGETS5
6 files changed, 5 insertions, 37 deletions
diff --git a/TARGETS b/TARGETS
index ace854f..1fc9898 100644
--- a/TARGETS
+++ b/TARGETS
@@ -25,6 +25,7 @@
, { "type": "map_union"
, "$1":
[ {"type": "singleton_map", "key": "FAMILY", "value": "gnu"}
+ , {"type": "singleton_map", "key": "BUILD_STATIC", "value": true}
, {"type": "singleton_map", "key": "STATIC_RUNLIBS", "value": true}
, { "type": "var"
, "name": "TOOLCHAIN_CONFIG"
diff --git a/etc/generate-repos.sh b/etc/generate-repos.sh
index 161210e..13b98e4 100755
--- a/etc/generate-repos.sh
+++ b/etc/generate-repos.sh
@@ -20,15 +20,12 @@ set -eu
: ${TC_REPO:=https://github.com/just-buildsystem/bootstrappable-toolchain}
: ${TC_BRANCH:=master}
: ${TC_NAME:=gcc-13.2.0-musl+tools}
-: ${RULES_REPO:=https://github.com/just-buildsystem/rules-cc}
-: ${RULES_BRANCH:=master}
cd $(dirname $0)
cat repos.template.json \
- | just-import-git -C - --as rules-cc -b ${RULES_BRANCH} ${RULES_REPO} rules \
| just-import-git -C - --as imported-toolchain -b ${TC_BRANCH} ${TC_REPO} "${TC_NAME}" \
- | just-import-git -C - --as just -b ${JUST_BRANCH} ${JUST_REPO} just --map toolchain static-toolchain \
+ | just-import-git -C - --as just -b ${JUST_BRANCH} ${JUST_REPO} just --map toolchain imported-toolchain \
| ./json-format.py \
> repos.json
diff --git a/etc/repos.json b/etc/repos.json
index 57ba5a1..c013a05 100644
--- a/etc/repos.json
+++ b/etc/repos.json
@@ -1,21 +1,7 @@
{ "main": "static-just"
, "repositories":
- { "static-toolchain":
- { "repository":
- {"type": "file", "path": "etc/toolchain", "pragma": {"to_git": true}}
- , "bindings": {"rules": "rules-cc", "base": "imported-toolchain"}
- }
- , "static-just":
+ { "static-just":
{"repository": {"type": "file", "path": "."}, "bindings": {"just": "just"}}
- , "rules-cc":
- { "repository":
- { "type": "git"
- , "repository": "https://github.com/just-buildsystem/rules-cc"
- , "branch": "master"
- , "commit": "7acb2bbcc28dfc4c01967b65678c93b1e5dd7d85"
- , "subdir": "rules"
- }
- }
, "imported-toolchain":
{ "repository": "imported-toolchain/toolchains"
, "target_file_name": "compiler+tools.TARGETS"
@@ -820,7 +806,7 @@
}
, "target_root": "just/defaults"
, "rule_root": "just/rules"
- , "bindings": {"toolchain": "static-toolchain"}
+ , "bindings": {"toolchain": "imported-toolchain"}
}
, "just/rules-absl":
{ "repository": "just/rules"
diff --git a/etc/repos.template.json b/etc/repos.template.json
index cc5e76e..53778b2 100644
--- a/etc/repos.template.json
+++ b/etc/repos.template.json
@@ -1,11 +1,6 @@
{ "main": "static-just"
, "repositories":
- { "static-toolchain":
- { "repository":
- {"type": "file", "path": "etc/toolchain", "pragma": {"to_git": true}}
- , "bindings": {"rules": "rules-cc", "base": "imported-toolchain"}
- }
- , "static-just":
+ { "static-just":
{"repository": {"type": "file", "path": "."}, "bindings": {"just": "just"}}
}
}
diff --git a/etc/toolchain/CC/TARGETS b/etc/toolchain/CC/TARGETS
deleted file mode 100644
index cfbb1ae..0000000
--- a/etc/toolchain/CC/TARGETS
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "defaults":
- { "type": ["@", "rules", "CC", "defaults"]
- , "base": [["@", "base", "CC", "defaults"]]
- , "LDFLAGS": ["-static"]
- }
-}
diff --git a/etc/toolchain/patch/TARGETS b/etc/toolchain/patch/TARGETS
deleted file mode 100644
index c8a2ad9..0000000
--- a/etc/toolchain/patch/TARGETS
+++ /dev/null
@@ -1,5 +0,0 @@
-{ "defaults":
- { "type": ["@", "rules", "patch", "defaults"]
- , "base": [["@", "base", "patch", "defaults"]]
- }
-}