aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2022-11-28 18:22:34 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2022-12-05 14:52:09 +0100
commitddd1b481a0b655716b06962053712fad7f8efa7b (patch)
tree777209306376453cbea1919373b3c4f63e977f98 /gcc
parentf3cb834600e7465ac8f5167c45376a534579e2d3 (diff)
downloadgcc-ddd1b481a0b655716b06962053712fad7f8efa7b.zip
gcc-ddd1b481a0b655716b06962053712fad7f8efa7b.tar.gz
gcc-ddd1b481a0b655716b06962053712fad7f8efa7b.tar.bz2
session-manager: Add fatal_error when flag is not present
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/rust-session-manager.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
index 79bf552..d9e4ce0 100644
--- a/gcc/rust/rust-session-manager.cc
+++ b/gcc/rust/rust-session-manager.cc
@@ -429,7 +429,23 @@ Session::compile_crate (const char *filename)
{
#ifdef RUST_RELEASE
if (!flag_rust_experimental)
- gcc_unreachable ();
+ rust_fatal_error (
+ Location (), "%s",
+ "gccrs is not yet able to compile Rust code "
+ "properly. Most of the errors produced will be gccrs' fault and not the "
+ "crate you are trying to compile. Because of this, please reports issues "
+ "to us directly instead of opening issues on said crate's "
+ "repository.\n\nOur github repository: "
+ "https://github.com/rust-gcc/gccrs\nOur bugzilla tracker: "
+ "https://gcc.gnu.org/bugzilla/"
+ "buglist.cgi?bug_status=__open__&component=rust&product=gcc\n\n"
+ "If you understand this, and understand that the binaries produced might "
+ "not behave accordingly, you may attempt to use gccrs in an experimental "
+ "manner by passing the following flag:\n\n"
+ "`-frust-incomplete-and-experimental-compiler-do-not-use`\n\nFor "
+ "cargo-gccrs, this means passing\n\n"
+ "GCCRS_EXTRA_FLAGS=\"-frust-incomplete-and-experimental-compiler-do-not-"
+ "use\"\n\nas an environment variable.");
#endif
RAIIFile file_wrap (filename);