fix(Makefile): delay
I noticed a pretty significant delay (of ~5s on my machine) after executing `make`. This was because TARGET was currently defined as a recursively expanded variable. This means that the command: rustc -Z unstable-options --print target-spec-json | grep llvm-target | cut -d '"' -f4 ..will get run everytime TARGET is mentioned. This patch fixes the above by defining the variable as an immediately expanded value. This will ensure the command only get run once and still skips if predefined. Signed-off-by: Anhad Singh <andypython@protonmail.com>
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
export TARGET?=$(shell rustc -Z unstable-options --print target-spec-json | grep llvm-target | cut -d '"' -f4)
|
||||
ifndef TARGET
|
||||
export TARGET:=$(shell rustc -Z unstable-options --print target-spec-json | grep llvm-target | cut -d '"' -f4)
|
||||
endif
|
||||
|
||||
CARGO?=cargo
|
||||
CARGO_TEST?=$(CARGO)
|
||||
|
||||
Reference in New Issue
Block a user