From: Pierre-Emmanuel Patry <[email protected]>
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 <[email protected]>
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.
Commit on github:
https://github.com/Rust-GCC/gccrs/commit/e3c82fdd89bd044e9ba2a0830de23957932f34fe
The commit has been mentioned in the following pull-request(s):
- https://github.com/Rust-GCC/gccrs/pull/4488
gcc/rust/util/rust-attribute-values.h | 1 +
gcc/rust/util/rust-attributes.cc | 1 +
2 files changed, 2 insertions(+)
diff --git a/gcc/rust/util/rust-attribute-values.h
b/gcc/rust/util/rust-attribute-values.h
index 7743d9091..a9e07bf01 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 cc898971e..7c137d06b 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},
--
2.53.0