[COMMITTED 39/41] gccrs: Add no_std to builtin attributes

arthur.cohen@embecosm.com arthur.cohen@embecosm.com
Fri Mar 20 17:30:28 GMT 2026


From: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

no_std is a builtin attribute required for rust-for-linux but was
missing from the builtin attribute list and instead considered an unknown
attribute macro invocation.

gcc/rust/ChangeLog:

	* util/rust-attributes.cc: Add no_std to list of builtin attributes.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
---
 gcc/rust/util/rust-attributes.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/rust/util/rust-attributes.cc b/gcc/rust/util/rust-attributes.cc
index d246cc67211..93d71a490d2 100644
--- a/gcc/rust/util/rust-attributes.cc
+++ b/gcc/rust/util/rust-attributes.cc
@@ -98,6 +98,7 @@ static const BuiltinAttrDefinition __definitions[]
      // #![feature(rustc_attrs)]
      {Attrs::FEATURE, STATIC_ANALYSIS},
      {Attrs::NO_CORE, CODE_GENERATION},
+     {Attrs::NO_STD, CODE_GENERATION},
      {Attrs::DOC, EXTERNAL},
      {Attrs::CRATE_NAME, CODE_GENERATION},
      {Attrs::CRATE_TYPE, CODE_GENERATION},
-- 
2.50.1



More information about the Gcc-rust mailing list