Skip to content

Commit 0de9aee

Browse files
committed
Make: fix host tuple detection with older Rust versions.
rustc --print host-tuple appeared in 1.84, and the common approach before that was to parse cargo or rustc -vV output. As a bonus, we no longer need to specify the rustc executable name.
1 parent aff8a6c commit 0de9aee

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ MODULE = nginx_acme
33
BUILD ?= debug
44
TESTS ?= t/
55
NGX_CARGO ?= cargo
6-
# will be used to print host-tuple
7-
NGX_RUSTC ?= rustc
86

97
NGINX_CONFIGURE_BASE = \
108
auto/configure \

build/compat-gnu.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
HOST_TUPLE := $(shell $(NGX_RUSTC) --print=host-tuple)
1+
HOST_TUPLE := $(shell $(NGX_CARGO) -vV | awk '/^host: / { print $$2; }')
22

33
# extension for Rust cdylib targets
44
ifeq ($(shell uname), Darwin)

build/compat-posix.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
HOST_TUPLE != $(NGX_RUSTC) --print=host-tuple
1+
HOST_TUPLE != $(NGX_CARGO) -vV | awk '/^host: / { print $$2; }'
22

33
# bsd make compatibility
44
CURDIR ?= $(.CURDIR)

0 commit comments

Comments
 (0)