]> gcc.gnu.org Git - gcc.git/commit
gccrs: rust: Add -frust-compile-until option
authorArthur Cohen <arthur.cohen@embecosm.com>
Wed, 31 Aug 2022 11:53:28 +0000 (13:53 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 31 Jan 2023 13:16:52 +0000 (14:16 +0100)
commit9d6b434e1fda4aaf853728967a6c0f65e7d20d3d
treeaf3c4c5b5baa1c69366dcb4238842b70dbdd3f2c
parentf92f8ee75bf0f4a653218a52698263b559c463a4
gccrs: rust: Add -frust-compile-until option

This option helps ensure that we do not introduce regressions on various
parts of the compilation pipeline. For example, a testcase (or testsuite
from the `testing` project) might pass attribute checking, expansion and
lowering, but fail during typechecking. Should a change suddenly make
that testcase fail expansion, we would not be able to notice it. By
generating tests that run up until expansion, typechecking, compilation
and so forth we ensure that no regressions are added accidentally to
already failing tests/testsuites.

gcc/rust/ChangeLog:

* lang.opt: Add new ``-frust-compile-until` option.
* rust-session-manager.cc (Session::compile_crate): Add stops around
various compilation steps in the pipeline.
* rust-session-manager.h (struct CompileOptions): Add `CompileStep` enum
and field.

gcc/testsuite/ChangeLog:

* rust/compile/frust-compile-until.rs: New test.
gcc/rust/lang.opt
gcc/rust/rust-session-manager.cc
gcc/rust/rust-session-manager.h
gcc/testsuite/rust/compile/frust-compile-until.rs [new file with mode: 0644]
This page took 0.074111 seconds and 6 git commands to generate.