public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] rename variable which holds bootstrap flag
@ 2022-12-08 7:59 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-12-08 7:59 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:9b6cd2601d69bade02b150d24567596dc3e2d2c7
commit 9b6cd2601d69bade02b150d24567596dc3e2d2c7
Author: Arthur Cohen <arthur.cohen@embecosm.com>
Date: Wed Nov 30 09:27:23 2022 +0100
rename variable which holds bootstrap flag
Diff:
---
gcc/rust/Make-lang.in | 8 ++++----
gcc/rust/rust-session-manager.cc | 3 ++-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in
index c9a8d23e32f..f2234e3c6c1 100644
--- a/gcc/rust/Make-lang.in
+++ b/gcc/rust/Make-lang.in
@@ -51,9 +51,9 @@ GCCRS_D_OBJS = \
RUST_CXXFLAGS = $(CXXFLAGS)
-# If the file exists, we're bootstrapping
+# If the file exists, we're bootstrapping. Set a specific flag for the session manager.
ifneq ($(wildcard ../stage_current)),)
-RUST_CXXFLAGS += -DRUST_RELEASE
+SESSION_FLAGS = -DRUST_BOOTSTRAP_BUILD
endif
gccrs$(exeext): $(GCCRS_D_OBJS) $(EXTRA_GCC_OBJS) libcommon-target.a $(LIBDEPS)
@@ -173,7 +173,7 @@ rust_OBJS = $(RUST_ALL_OBJS) rust/rustspec.o
# The compiler itself is called rust1 (formerly grs1)
rust1$(exeext): $(RUST_ALL_OBJS) attribs.o $(BACKEND) $(LIBDEPS)
- +$(LLINKER) $(RUST_CXXFLAGS) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
+ +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(RUST_ALL_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
# Build hooks.
@@ -336,7 +336,7 @@ RUST_INCLUDES = -I $(srcdir)/rust \
CFLAGS-rust/rust-lang.o += $(RUST_INCLUDES)
CFLAGS-rust/rust-lex.o += $(RUST_INCLUDES)
CFLAGS-rust/rust-parse.o += $(RUST_INCLUDES)
-CFLAGS-rust/rust-session-manager.o += $(RUST_INCLUDES) $(RUST_CXXFLAGS)
+CFLAGS-rust/rust-session-manager.o += $(RUST_INCLUDES) $(SESSION_FLAGS)
# build all rust/lex files in rust folder, add cross-folder includes
rust/%.o: rust/lex/%.cc
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
index d9e4ce06fe7..78dc3a01ccb 100644
--- a/gcc/rust/rust-session-manager.cc
+++ b/gcc/rust/rust-session-manager.cc
@@ -427,7 +427,8 @@ Session::handle_crate_name (const AST::Crate &parsed_crate)
void
Session::compile_crate (const char *filename)
{
-#ifdef RUST_RELEASE
+#ifdef RUST_BOOTSTRAP_BUILD
+ // Do not emit the fatal error or require the flag for dev builds
if (!flag_rust_experimental)
rust_fatal_error (
Location (), "%s",
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-08 7:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-08 7:59 [gcc/devel/rust/master] rename variable which holds bootstrap flag Thomas Schwinge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).