Hi! On 2023-10-25T23:40:40+0200, I wrote: > On 2023-10-25T13:06:48+0200, Arthur Cohen <arthur.co...@embecosm.com> wrote: >> From: Pierre-Emmanuel Patry <pierre-emmanuel.pa...@embecosm.com> >> >> Define the libgrust directory as a host compilation module as well as >> for targets. > > I don't see a response to Richard's comments: > <https://inbox.sourceware.org/cafiyyc0pcqfbknt06fammsnrf7ww4kbor6qvetwj++kmup1...@mail.gmail.com>. > Re "doesn't build libgrust if [Rust is not enabled]", I suppose (but have > not checked) this works for the *target* libgrust module via > 'gcc/rust/config-lang.in:target_libs' requesting 'target-libgrust' only > if the Rust language is enabled?
That aspect appears to work: testing a GCC configuration without the Rust language enabled, target libgrust doesn't get built, but... > I don't know what enables/disables the > *host* libgrust build? ... indeed, host libgrust still does get built. The attached "Only build host libgrust if the Rust language is enabled" ought to address this. Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
>From 403e6bf5349f8a22e4dc7b74ea80acb55e4f5133 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tho...@codesourcery.com> Date: Fri, 27 Oct 2023 11:59:19 +0200 Subject: [PATCH] Only build host libgrust if the Rust language is enabled gcc/ * rust/config-lang.in (lang_dirs): Set to 'libgrust'. --- gcc/rust/config-lang.in | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/rust/config-lang.in b/gcc/rust/config-lang.in index 8f071dcb0bf0..aee6f0eb468f 100644 --- a/gcc/rust/config-lang.in +++ b/gcc/rust/config-lang.in @@ -30,5 +30,6 @@ compilers="rust1\$(exeext)" build_by_default="no" target_libs="target-libffi target-libbacktrace target-libgrust" +lang_dirs=libgrust gtfiles="\$(srcdir)/rust/rust-lang.cc" -- 2.40.1