Skip to content

Commit c126016

Browse files
committed
rust: avoid evaluating command when Rust is not installed
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent 1648677 commit c126016

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

init/Kconfig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,14 +2078,14 @@ config RUST
20782078
If unsure, say N.
20792079

20802080
config RUSTC_VERSION_TEXT
2081-
depends on RUST
20822081
string
2083-
default $(shell,$(RUSTC) --version)
2082+
depends on RUST
2083+
default $(shell,command -v $(RUSTC) >/dev/null 2>&1 && $(RUSTC) --version || echo n)
20842084

20852085
config BINDGEN_VERSION_TEXT
2086-
depends on RUST
20872086
string
2088-
default $(shell,$(BINDGEN) --version)
2087+
depends on RUST
2088+
default $(shell,command -v $(BINDGEN) >/dev/null 2>&1 && $(BINDGEN) --version || echo n)
20892089

20902090
#
20912091
# Place an empty function call at each tracepoint site. Can be

0 commit comments

Comments
 (0)