You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2022/02/17 18:35:34 UTC
[incubator-nuttx] branch master updated: Default macro to compile one Rust file
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 8828a43 Default macro to compile one Rust file
8828a43 is described below
commit 8828a43219ab3813e534927dad6d69072628e4f0
Author: Piet <pt...@mailbox.org>
AuthorDate: Thu Feb 17 16:57:12 2022 +0100
Default macro to compile one Rust file
---
tools/Config.mk | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/tools/Config.mk b/tools/Config.mk
index 7a0700b..aacce6c 100644
--- a/tools/Config.mk
+++ b/tools/Config.mk
@@ -291,6 +291,24 @@ define COMPILEXX
$(Q) $(CXX) -c $(CXXFLAGS) $($(strip $1)_CXXFLAGS) $1 -o $2
endef
+# COMPILERUST - Default macro to compile one Rust file
+# Example: $(call COMPILERUST, in-file, out-file)
+#
+# Depends on these settings defined in board-specific Make.defs file
+# installed at $(TOPDIR)/Make.defs:
+#
+# RUST - The command to invoke the Rust compiler
+# RUSTFLAGS - Options to pass to the Rust compiler
+#
+# '<filename>.rs_RUSTFLAGS += <options>' may also be used, as an example, to
+# change the options used with the single file <filename>.rs. The same
+# applies mutatis mutandis.
+
+define COMPILERUST
+ @echo "RUSTC: $1"
+ $(Q) $(RUSTC) --emit obj $(RUSTFLAGS) $($(strip $1)_RUSTFLAGS) $1 -o $2
+endef
+
# ASSEMBLE - Default macro to assemble one assembly language file
# Example: $(call ASSEMBLE, in-file, out-file)
#