Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ TOYBOX_SRC := $(TOYBOX_ROOT)/toybox-$(TOYBOX_VER)

# Detect the target system
# See https://doc.rust-lang.org/beta/rustc/platform-support.html
# todo: support building wasm
OS := $(or $(CARGO_BUILD_TARGET),$(shell rustc --print host-tuple))

# hardlinks are better default since
Expand All @@ -79,11 +78,18 @@ SELINUX_PROGS := \

$(info Detected OS = $(OS))

ifeq (,$(findstring windows,$(OS)))
FEATURE_EXTRACT_UTILS := feat_os_unix
else
ifneq (,$(findstring windows,$(OS)))
FEATURE_EXTRACT_UTILS := windows
else ifneq (,$(findstring openbsd,$(OS)))
FEATURE_EXTRACT_UTILS := feat_Tier1,feat_require_unix
else ifneq (,$(findstring redox,$(OS)))
FEATURE_EXTRACT_UTILS := feat_os_unix_redox
else ifneq (,$(findstring wasip,$(OS)))
FEATURE_EXTRACT_UTILS := feat_wasm
else
FEATURE_EXTRACT_UTILS := feat_os_unix
endif

PROGS := $(shell cargo tree --depth 1 --features $(FEATURE_EXTRACT_UTILS) --format "{lib}" --prefix none | sed -n 's/^uu_//p')

ifeq ($(SELINUX_ENABLED),1)
Expand Down
3 changes: 3 additions & 0 deletions util/show-utils.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# This script was deprecated. Thus, new scripts should not use this.

set -eo pipefail

Expand All @@ -9,6 +10,8 @@ if test "$*";then
else
CARGO_BUILD_TARGET="${CARGO_BUILD_TARGET:-$(rustc --print host-tuple)}"
case "$CARGO_BUILD_TARGET" in
*openbsd*) _args=("--features=feat_Tier1,feat_require_unix");;
*redox*) _args=("--features=feat_os_unix_redox");;
*windows*) _args=("--features=windows");;
*wasip*) _args=("--features=feat_wasm");;
*android*) _args=("--features=feat_os_unix_android,feat_require_selinux");;
Expand Down
Loading