public inbox for gcc-rust@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: Arthur Cohen <arthur.cohen@embecosm.com>,
	Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>,
	<gcc-rust@gcc.gnu.org>, <gcc-patches@gcc.gnu.org>
Cc: Richard Biener <richard.guenther@gmail.com>
Subject: Only build host libgrust if the Rust language is enabled (was: [PATCH v2 3/4] build: Add libgrust as compilation modules)
Date: Fri, 27 Oct 2023 12:24:15 +0200	[thread overview]
Message-ID: <87cyx01hyo.fsf@euler.schwinge.homeip.net> (raw)
In-Reply-To: <87sf5y1iuf.fsf@euler.schwinge.homeip.net>

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

Hi!

On 2023-10-25T23:40:40+0200, I wrote:
> On 2023-10-25T13:06:48+0200, Arthur Cohen <arthur.cohen@embecosm.com> wrote:
>> From: Pierre-Emmanuel Patry <pierre-emmanuel.patry@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++KmUP1nOw@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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Only-build-host-libgrust-if-the-Rust-language-is-ena.patch --]
[-- Type: text/x-diff, Size: 734 bytes --]

From 403e6bf5349f8a22e4dc7b74ea80acb55e4f5133 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@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


  parent reply	other threads:[~2023-10-27 10:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25 11:06 [PATCH v2 1/4] libgrust: Add entry for maintainers and stub changelog file Arthur Cohen
2023-10-25 11:06 ` [PATCH v2 2/4] libgrust: Add libproc_macro and build system Arthur Cohen
2023-10-26  8:21   ` Thomas Schwinge
2023-10-27  7:51     ` Iain Sandoe
2023-10-27 14:20       ` Thomas Schwinge
2023-10-27 20:32         ` Disable target libgrust if we're not building target libstdc++ (was: [PATCH v2 2/4] libgrust: Add libproc_macro and build system) Thomas Schwinge
2023-12-18 16:58       ` libgrust: 'AM_ENABLE_MULTILIB' only for target builds [PR113056] " Thomas Schwinge
2024-01-04 15:43         ` libgrust: 'AM_ENABLE_MULTILIB' only for target builds [PR113056] Pierre-Emmanuel Patry
2023-12-15  9:53     ` [PATCH v2 2/4] libgrust: Add libproc_macro and build system Thomas Schwinge
2024-01-16 15:07       ` Jason Merrill
2023-10-25 11:06 ` [PATCH v2 3/4] build: Add libgrust as compilation modules Arthur Cohen
2023-10-25 11:09   ` [PATCH v2 4/4] build: Regenerate build files Arthur Cohen
2023-10-25 21:40   ` [PATCH v2 3/4] build: Add libgrust as compilation modules Thomas Schwinge
2023-10-26 12:07     ` Arthur Cohen
2023-10-27 10:24     ` Thomas Schwinge [this message]
2023-10-25 11:06 ` [PATCH v2 4/4] build: Regenerate build files Arthur Cohen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cyx01hyo.fsf@euler.schwinge.homeip.net \
    --to=thomas@codesourcery.com \
    --cc=arthur.cohen@embecosm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc-rust@gcc.gnu.org \
    --cc=pierre-emmanuel.patry@embecosm.com \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).