disassembler-four-args \
disassembler-init-styled \
file-handle \
- libopenssl
+ libopenssl \
+ rust
# FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list
# of all feature tests
bpf \
libaio \
libzstd \
- libopenssl
+ libopenssl \
+ rust
#
# Declare group members of a feature to display the logical OR of the detection
__BUILDXX = $(CXX) $(CXXFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(@F)) $(LDFLAGS)
BUILDXX = $(__BUILDXX) > $(@:.bin=.make.output) 2>&1
+__BUILDRS = $(RUSTC) $(RUSTC_FLAGS) -o $@ $(patsubst %.bin,%.rs,$(@F))
+ BUILDRS = $(__BUILDRS) > $(@:.bin=.make.output) 2>&1
+
###############################
$(OUTPUT)test-all.bin:
$(OUTPUT)test-bpftool-skeletons.bin:
$(SYSTEM_BPFTOOL) version | grep '^features:.*skeletons' \
> $(@:.bin=.make.output) 2>&1
+
+$(OUTPUT)test-rust.bin:
+ $(BUILDRS) > $(@:.bin=.make.output) 2>&1
+
###############################
clean:
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+fn main() {
+ println!("hi")
+}
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
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, _)