From: Pierre-Emmanuel Patry Date: Thu, 12 Mar 2026 16:34:41 +0000 (+0100) Subject: gccrs: Add no_builtins attribute to list of builtins X-Git-Tag: basepoints/gcc-17~177 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=112d9366f752223dfdefc902babfc3a2e5f01460;p=thirdparty%2Fgcc.git gccrs: Add no_builtins attribute to list of builtins gcc/rust/ChangeLog: * util/rust-attribute-values.h: Add "no_builtins" attribute value. * util/rust-attributes.cc: Add "no_builtins" to the list of builtin attributes. Signed-off-by: Pierre-Emmanuel Patry --- diff --git a/gcc/rust/util/rust-attribute-values.h b/gcc/rust/util/rust-attribute-values.h index 7743d9091c8..a9e07bf015e 100644 --- a/gcc/rust/util/rust-attribute-values.h +++ b/gcc/rust/util/rust-attribute-values.h @@ -83,6 +83,7 @@ public: = "rustc_layout_scalar_valid_range_start"; static constexpr auto &COMPILER_BUILTINS = "compiler_builtins"; + static constexpr auto &NO_BUILTINS = "no_builtins"; static constexpr auto &MAY_DANGLE = "may_dangle"; static constexpr auto &PRELUDE_IMPORT = "prelude_import"; diff --git a/gcc/rust/util/rust-attributes.cc b/gcc/rust/util/rust-attributes.cc index cc898971eb9..7c137d06b98 100644 --- a/gcc/rust/util/rust-attributes.cc +++ b/gcc/rust/util/rust-attributes.cc @@ -123,6 +123,7 @@ static const BuiltinAttrDefinition __definitions[] // TODO: be careful about calling functions marked with this? {Attrs::RUSTC_ARGS_REQUIRED_CONST, CODE_GENERATION}, {Attrs::COMPILER_BUILTINS, CODE_GENERATION}, + {Attrs::NO_BUILTINS, CODE_GENERATION}, {Attrs::PRELUDE_IMPORT, NAME_RESOLUTION}, {Attrs::RUSTC_DIAGNOSTIC_ITEM, STATIC_ANALYSIS}, {Attrs::RUSTC_ON_UNIMPLEMENTED, STATIC_ANALYSIS},