diff options
| author | Dmitrii Dolgov <9erthalion6@gmail.com> | 2026-02-08 13:22:23 +0100 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-02-08 11:30:45 -0300 |
| commit | 6a32fa5ccd33da5d187ec6e78f3b45683399ab66 (patch) | |
| tree | 6b7d5a8521528c8aac81cf9a51be1581617425c8 /tools/perf | |
| parent | ff9aeb6bd14dbc70651971c81e81fa8269c3101a (diff) | |
tools build: Add a feature test for rust compiler
Add a feature test to identify if the rust compiler is available, so
that perf could build rust based worloads based on that.
Signed-off-by: Dmitrii Dolgov <9erthalion6@gmail.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
| -rw-r--r-- | tools/perf/Makefile.config | 11 | ||||
| -rw-r--r-- | tools/perf/builtin-check.c | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index b683aab3ab97..94aecfe38b95 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -1153,6 +1153,17 @@ ifneq ($(NO_LIBTRACEEVENT),1) endif endif +ifndef NO_RUST + ifneq ($(feature-rust), 1) + $(warning Rust is not found. Test workloads with rust are disabled.) + NO_RUST := 1 + else + NO_RUST := 0 + CFLAGS += -DHAVE_RUST_SUPPORT + $(call detected,CONFIG_RUST_SUPPORT) + endif +endif + # Among the variables below, these: # perfexecdir # libbpf_include_dir diff --git a/tools/perf/builtin-check.c b/tools/perf/builtin-check.c index d19769a8f689..27a41beeaddf 100644 --- a/tools/perf/builtin-check.c +++ b/tools/perf/builtin-check.c @@ -60,6 +60,7 @@ struct feature_status supported_features[] = { FEATURE_STATUS("numa_num_possible_cpus", HAVE_LIBNUMA_SUPPORT), FEATURE_STATUS("zlib", HAVE_ZLIB_SUPPORT), FEATURE_STATUS("zstd", HAVE_ZSTD_SUPPORT), + FEATURE_STATUS("rust", HAVE_RUST_SUPPORT), /* this should remain at end, to know the array end */ FEATURE_STATUS(NULL, _) |
