From patchwork Fri Jun 14 14:21:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 1947894 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.a=rsa-sha256 header.s=google header.b=OueC0ohY; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0z3T63pXz20Pb for ; Fri, 14 Jun 2024 22:24:05 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 152AB3882657 for ; Fri, 14 Jun 2024 12:24:04 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id 3BC293882671 for ; Fri, 14 Jun 2024 12:23:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3BC293882671 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3BC293882671 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::52a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718367809; cv=none; b=nqmhEtKXy+IGxgJfYFylJLnEjF/+MnpIw6rS+eKX+DYi+0MnNnf96N9R7POjL6H+F67bJgnQYPgwcODEHIBFBnUJz/LXPwMM2u1JTmxMSUh8iVaccBxG+yYlpASY2PeNKJi6pKXYWN0E2ibP2l2hn7yotcLvRon5hl8GeUGkbXI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718367809; c=relaxed/simple; bh=m0SA6imFAGjKj/nhIDchAKfdygv3I+4Aq3o9hUxnIvI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=uTC6ORf6byQX+7/taCzXWqr07uS60bO9rNejzu2dFXt3cJgjYX/pmeVsO8AVtGMHkg76o/X8dZjN0o0YZ/EISbNmpoR5+NsN+hgjwsLZZ3Qtu3kaytxFPWdY9/E7v67+zwxxJn5Qb53Zu+OqBx2uOoS8HYOrF7J4d7PLLOs4YFk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-57cc1c00b97so699834a12.0 for ; Fri, 14 Jun 2024 05:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1718367803; x=1718972603; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LEmWnclKolA6aeNA6MxhsjJSlOtF14/S4b7N4BCqK/k=; b=OueC0ohYuqujRM8CrGzWpznxDIG5RebpiLBtC2wc3X45QfPajlimAIvru31MYssZbr ABmKEe+DUJo7B4cMtWYcvQU6c4H/8ty+ClhGTocvT5pKH4PLCr4ZdB2zMAJ5l32m6Vt+ 3DkuONTanFTUaMTaCXrIYMibIcy7KPS1vVt6AIJaS+n4+Hx5bW1AOv5dmXSVjZRlC2qJ wZHrE3Q5x4ycV8E3VqFG9tAs6HjKS7amPhJBeprT5n2LUSpU2B/WqqNVS1gqsppDJNG3 t9kiSJCKvA7o2iiAunMQ9h+vIdmFDMFJJsY0xRjlI61lXP2K4ga7jMlrrFtdVug5O4nm pwLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718367803; x=1718972603; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LEmWnclKolA6aeNA6MxhsjJSlOtF14/S4b7N4BCqK/k=; b=n8DH4qBLWmb3f2BPWc9PmGsWXYPO3PfFqVNELifzIJ3OWRiijSVy6BZXokexCHm5BD +3pJMobKQ/mPsUNQaR532rN7qmmwQisVtgEIL3T8MyBrcvT0TPXJel+kX1nMvr+VetBo UldVNnI3ArrHM0wbfGQ7bBapzAIMBB3+9msRr1BqxjDwnJ7k3DpFvRwEl/DDEIMHUdv3 7i6fCbqsecZ8MHJ6hRAPbnWn+s09U2u1munZCLo632Giy+XUlQmVb2qwaTN0qvDk91PS yNQDlDE8ByQiIcvvrH0MJnw3EFotJTfprUltB4hmUqAcG3PC9sUB89IMWE8Y/4C6cPA3 LJMw== X-Gm-Message-State: AOJu0Yxz/qunL0b7zj0Ib8srmYxV6z457qBiCFdJyN9aEKx/xZL/0gb3 ii5WBg4/jw77w3LfwlEcQkBwxS7b0kBe/u/KljwQOzQt5nEkba/puSykxdUpit6KL9CPwVt0py1 NYim3 X-Google-Smtp-Source: AGHT+IGPlsYl0JUrDhCVUgiur6nAZsVNsjkYj3LKI3ICKbbqmyDasV5z2J6vA4nPw8e61mtOkHPBhw== X-Received: by 2002:a17:906:4690:b0:a6f:52e0:f1ea with SMTP id a640c23a62f3a-a6f60bcc9abmr170951966b.0.1718367802753; Fri, 14 Jun 2024 05:23:22 -0700 (PDT) Received: from localhost.localdomain ([2a04:cec2:26:2e08:be74:f961:1e88:9892]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56da3fe5sm183703866b.18.2024.06.14.05.23.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 05:23:22 -0700 (PDT) From: Arthur Cohen To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Arthur Cohen Subject: [PATCH 14.2 1/3] gccrs: Add base documentation for using the Rust frontend. Date: Fri, 14 Jun 2024 16:21:13 +0200 Message-ID: <20240614142300.31778-4-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240614142300.31778-2-arthur.cohen@embecosm.com> References: <20240614142300.31778-2-arthur.cohen@embecosm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org gcc/rust/ChangeLog: * Make-lang.in: Add documentation targets. * gccrs.texi: New file. --- gcc/rust/Make-lang.in | 25 +++-- gcc/rust/gccrs.texi | 207 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 225 insertions(+), 7 deletions(-) create mode 100644 gcc/rust/gccrs.texi diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in index dd94c9b5eab..f0fc582bd26 100644 --- a/gcc/rust/Make-lang.in +++ b/gcc/rust/Make-lang.in @@ -283,27 +283,38 @@ rust.tags: force # Build documentation hooks. +RUST_TEXI = \ + rust/rust.texi + # Build info documentation for the front end, in the build directory. This target is only called by # ‘make bootstrap’ if a suitable version of makeinfo is available, so does not need to check for this, # and should fail if an error occurs. rust.info: + if [ x$(BUILD_INFO) = xinfo ]; then \ + $(MAKEINFO) $(MAKEINFOFLAGS) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<; \ + else \ + true; \ + fi rust.srcinfo: # Build DVI documentation for the front end, in the build directory. This should be done using # $(TEXI2DVI), with appropriate -I arguments pointing to directories of included files. -rust.dvi: +rust.dvi: $(RUST_TEXI) + $(TEXI2DVI) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $< # Build PDF documentation for the front end, in the build directory. This should be done using # $(TEXI2PDF), with appropriate -I arguments pointing to directories of included files. -rust.pdf: - -doc/rust.info: -doc/rust.dvi: -doc/rust.pdf: +rust.pdf: $(RUST_TEXI) + $(TEXI2PDF) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $< # Build HTML documentation for the front end, in the build directory. -rust.html: +rust.html: $(RUST_TEXI) + $(TEXI2HTML) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $< + +doc/rust.info: rust.info +doc/rust.dvi: rust.dvi +doc/rust.pdf: rust.pdf # Install hooks. diff --git a/gcc/rust/gccrs.texi b/gcc/rust/gccrs.texi new file mode 100644 index 00000000000..52f055eaad8 --- /dev/null +++ b/gcc/rust/gccrs.texi @@ -0,0 +1,207 @@ +\input texinfo @c -*-texinfo-*- +@setfilename gccrs.info +@settitle The GNU Rust Compiler + +@c Merge the standard indexes into a single one. +@syncodeindex fn cp +@syncodeindex vr cp +@syncodeindex ky cp +@syncodeindex pg cp +@syncodeindex tp cp + +@include gcc-common.texi + +@c Copyright years for this manual. +@set copyrights-gccrs 2024 + +@copying +@c man begin COPYRIGHT +Copyright @copyright{} @value{copyrights-gccrs} Free Software Foundation, Inc. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, the Front-Cover Texts being (a) (see below), and +with the Back-Cover Texts being (b) (see below). +A copy of the license is included in the +@c man end +section entitled ``GNU Free Documentation License''. +@ignore +@c man begin COPYRIGHT +man page gfdl(7). +@c man end +@end ignore + +@c man begin COPYRIGHT + +(a) The FSF's Front-Cover Text is: + + A GNU Manual + +(b) The FSF's Back-Cover Text is: + + You have freedom to copy and modify this GNU Manual, like GNU + software. Copies published by the Free Software Foundation raise + funds for GNU development. +@c man end +@end copying + +@ifinfo +@format +@dircategory Software development +@direntry +* gccrs: (gccrs). A GCC-based compiler for the Rust programming language +@end direntry +@end format + +@insertcopying +@end ifinfo + +@titlepage +@title The GNU Rust Compiler +@versionsubtitle +@author The gccrs team + +@page +@vskip 0pt plus 1filll +Published by the Free Software Foundation @* +51 Franklin Street, Fifth Floor@* +Boston, MA 02110-1301, USA@* +@sp 1 +@insertcopying +@end titlepage +@contents +@page + +@node Top +@top Introduction + +This manual describes how to use @command{gccrs}, the GNU compiler for +the Rust programming language. This manual is specifically about +@command{gccrs}. For more information about the Rust programming +language, see @uref{https//rust-lang.org}. + +@menu +* Copying:: The GNU General Public License. +* GNU Free Documentation License:: + How you can share and copy this manual. +* Invoking gccrs:: How to run gccrs. +* Index:: Index. +@end menu + + +@include gpl_v3.texi + +@include fdl.texi + +@node Invoking gccrs +@chapter Invoking gccrs + +@c man title gccrs A GCC-based compiler for the Rust programming language + +@c man begin DESCRIPTION gccrs + +The @command{gccrs} command is a frontend to @command{gcc} and +supports many of the same options, @xref{Option Summary, , Option +Summary, gcc, Using the GNU Compiler Collection (GCC)}, as well +as some @command{gccrs} specific ones. This manual only documents +the options that are specific to @command{gccrs}. + +@c man end + +@c man begin OPTIONS gccrust + +@table @gcctabopt + +@cindex @option{-frust-incomplete-and-experimental-compiler-do-not-use} +@item -frust-incomplete-and-experimental-compiler-do-not-use +This flag enables the compilation of Rust code with the GCC Rust compiler. +It is used to indicate the unstability of the compiler, and reminds the user +about the expected incoming breakage. @command{gccrs} is not yet able to +compile real Rust code, or to report valid errors when seeing incorrect Rust. +It also does not compile and link to the Rust standard library, meaning you +are not able to access most existing Rust types, macros and functions. + +@cindex @option{-frust-mini-std} +@item -frust-mini-std +Add the @code{mini_std} module to the crate you are currently compiling. This miniature +standard library is experimental, and does not represent a strict subset of Rust's +standard library. It is there so that you can have access to basic Rust functionality, +such as common arithmetic operations on natural numbers or printing basic strings to +the standard output streams. + +@cindex @option{-frust-borrowcheck} +@item -frust-borrowcheck +Enable the experimental borrow-checking pass in the @command{gccrs} pipeline. This pass +feeds information to @command{polonius}, a next-generation borrow-checking algorithm for +Rust. It is incomplete and cannot be used to safely analyze Rust borrowing rules with +@command{gccrs} yet. + +@cindex @option{-frust-cfg} +@item -frust-cfg=@var{input} +Specify a @code{#[cfg]} directive for the Rust compiler. This is used in Rust code +to perform conditional compilation. The input can be of the form @code{key} or @code{key=value}. + +@cindex @option{-frust-compile-until} +@item -frust-compile-until=@var{step} +Stop the compilation at a certain stage in the @command{gccrs} pipeline. The available steps are: +@code{ast}, @code{attributecheck}, @code{expansion}, @code{astvalidation}, @code{featuregating}, @code{nameresolution}, @code{lowering}, @code{typecheck}, @code{privacy}, @code{unsafety}, @code{const}, @code{borrowcheck}, @code{compilation}, @code{end}. + +@cindex @option{-frust-crate-type} +@item -frust-crate-type=@var{type} +What type of crate to produce using @command{gccrs}. While the official Rust compiler supports +multiple options such as @code{staticlib} or @code{rlib}, the Rust compiler for GCC does not. +The complete list of accepted @code{type}s is as follows: @code{bin}, @code{lib}, @code{rlib}, @code{dylib}, @code{cdylib}, @code{staticlib}, @code{proc_macro}. +The list of supported @code{type}s is: @code{bin}, @code{proc_macro}. + +@cindex @option{-frust-crate} +@item -frust-crate=@var{name} +Specify the name to use for the crate we are producing. + +@cindex @option{-frust-edition} +@item -frust-edition=@var{year} +Rust edition to use when compiling the code. Available editions are @code{2015}, @code{2018} and @code{2021}. + +@cindex @option{-frust-embed-metadata} +@item -frust-embed-metadata +Enable embedding metadata directly into object files. + +@cindex @option{-frust-metadata-output} +@item -frust-metadata-output=@var{path} +Path where crate metadata should be written. + +@cindex @option{-frust-extern} +@item -frust-extern=@var{path} +Specify a path from which an external crate should be loaded. + +@cindex @option{-frust-mangling} +@item -frust-mangling=@var{version} +Mangling algorithm to use: @code{legacy} or @code{v0}. + +@cindex @option{-frust-max-recursion-depth} +@item -frust-max-recursion-depth=@var{max_value} +Set the maximum recursion depth for macro expansion. The default is 128. + +@cindex @option{-frust-name-resolution-2.0} +@item -frust-name-resolution-2.0 +Switch to the experimental name resolution algorithm which is currently being rewritten. + +@cindex @option{-frust-debug} +@item -frust-debug +Turn on debug printing from the Rust compiler frontend. This does not turn on debug +information for the produced binaries, and will create a lot of noise on the output. +This option is aimed for the developers of @command{gccrs}. + +@cindex @option{-frust-dump-} +@item -frust-dump-@var{to_dump} +Create debug dump files from various passes of the @command{gccrs} pipeline. +Available dumps are: @code{lex}, @code{ast-pretty}, @code{register_plugins}, @code{injection}, @code{expansion}, @code{resolution}, @code{target_options}, @code{hir}, @code{hir-pretty}, @code{all} + +@end table + +@node Index +@unnumbered Index + +@printindex cp + +@bye From patchwork Fri Jun 14 14:21:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 1947895 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.a=rsa-sha256 header.s=google header.b=MNUrImuw; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0z3X4vZNz20Pb for ; Fri, 14 Jun 2024 22:24:08 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F30D2388267F for ; Fri, 14 Jun 2024 12:24:06 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id 30C703882100 for ; Fri, 14 Jun 2024 12:23:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 30C703882100 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 30C703882100 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::62d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718367813; cv=none; b=hSyASVN+14zkEz6a5s4GNulBT1AaWAAzwNvusTQ2FXjPZLDYKV4ZlESGEPje3c/r0jpSU8qsLIKXjHUUAH+zSBzgpZHPKObtNgiKwmuOfvxypjgwnPfOBW5jS29eVHrrrOb9q6XanfThA9XOD82ZsTean5sCjMJuz4YDW8qD1gg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718367813; c=relaxed/simple; bh=+Lpq+J/4+ZZTneFRgZMxhN4euNhYc2PangLrmBReJqE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=plfChrCfKzRv2ZPKmVd5brvzVsBxEwC8GvRuPcFfsyddd32nZ4wRRExH2UK+OydkCXusx4yzKCgP2Lz+PgKfMu1Nwp7ubz9zjvRuU8JH25OPBZxGf2s4V5z1A/ZpMSjyGnrwRwKWQfc9PBuk5spKQLPrdSt9iZpfZj7sTQPi25I= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a6f176c5c10so256793766b.2 for ; Fri, 14 Jun 2024 05:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1718367810; x=1718972610; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rYOQzgEB+tqOkSvbjCQym1uEjqC1pGwNwQvu637jaQ8=; b=MNUrImuwXfTZ7LKuZcoERrMEd6jZaOzdEMzCMefXTIgMy7cis9bP7esKrgV4pr88Dc zvggpAibdHWglLLJXenyHVDoiYEmcCitO/yNtLTht383xmNtx944MWDbRfu/pQi+pFLX xr81SjdfX7xyZm1IgiMwryzEv/NW4fI9Nh04+u1aqCHtSyMjDEH7oRb7nwcT3yAK4swI 7BgoF3MM84NMJfO+IRMukMkkey6plJCC6fIgEqBmuLm/C2PLckeaksYQLAXtTGKi2/r6 oEtXyiOb3F0odwjPQf/xmnTjyeyxGv8IdVLvt9TpCTSSsKhU5Cy0XlyqTZQMHATkINQf woig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718367810; x=1718972610; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rYOQzgEB+tqOkSvbjCQym1uEjqC1pGwNwQvu637jaQ8=; b=u3Bnb3IeBqYW/RDSZcMPaylOS9c0o2kNv+38FFobFhzzD+1iCLQaHELyE5syuvI/jc eKuVuX9A3WDOiodBhODOsT+VtEYiUkTP7X8jF6oiCJqSbB7g/KINYqZYm7rg8vqiVDid eIHJjDBBZIrKIMPyVcM40+fi9qnzMtjEufadofvs1A5TVm2tTanzu3tGTwUsfKxd4a9Y xnVZ3KM2vSAJGbB8ASXwS+Ntt9oUSbdCxBN6ZIu+n++/fnTiEEqSkA6d2SXPoGXmWw5D REiVgtrkH/Lviq/t2YeFCVHE9bBTor2dS3hzkLJDLvYx32yTkWYutR9kmfeU5V3E0LHT /FgA== X-Gm-Message-State: AOJu0Yx/OL8WAW7Y7jUxryD88HTSNCZnkLy6UyEcEwrQdiYnIjFzhsCj xwngC32kfCiacbwu+aUHh1sP1EBvrihX0L6oFnTkZXBka2stg7OyulKDv6YPWXfsGlAWYLV7Y+j 9Ldac X-Google-Smtp-Source: AGHT+IE1XwwtGwRkA4rq7sRcdOCyabLhfUzBfpVuclDVSOwpEHxQkza72V7FSBxvTAPo6g/8MZDE4A== X-Received: by 2002:a17:906:b890:b0:a6f:1166:1b86 with SMTP id a640c23a62f3a-a6f60dc7fccmr157949066b.53.1718367809704; Fri, 14 Jun 2024 05:23:29 -0700 (PDT) Received: from localhost.localdomain ([2a04:cec2:26:2e08:be74:f961:1e88:9892]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56da3fe5sm183703866b.18.2024.06.14.05.23.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 05:23:29 -0700 (PDT) From: Arthur Cohen To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Christophe Lyon Subject: [PATCH 14.2 2/3] rust: Add rust.install-dvi and rust.install-html rules Date: Fri, 14 Jun 2024 16:21:15 +0200 Message-ID: <20240614142300.31778-6-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240614142300.31778-2-arthur.cohen@embecosm.com> References: <20240614142300.31778-2-arthur.cohen@embecosm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Christophe Lyon rust has the (empty) rust.dvi and rust.html rules, but lacks the (empty) rust.install-dvi and rust.install-html ones. 2024-04-04 Christophe Lyon gcc/rust/ * Make-lang.in (rust.install-dvi, rust.install-html): New rules. --- gcc/rust/Make-lang.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in index f0fc582bd26..2395541425f 100644 --- a/gcc/rust/Make-lang.in +++ b/gcc/rust/Make-lang.in @@ -374,6 +374,8 @@ selftest-rust-valgrind: $(RUST_SELFTEST_DEPS) # should have dependencies on info files that should be installed. rust.install-info: +rust.install-dvi: +rust.install-html: rust.install-pdf: # Install man pages for the front end. This target should ignore errors. From patchwork Fri Jun 14 14:21:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 1947898 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.a=rsa-sha256 header.s=google header.b=cnCUlOL6; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W0z4V45wDz20Pb for ; Fri, 14 Jun 2024 22:24:58 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D3727388266D for ; Fri, 14 Jun 2024 12:24:56 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by sourceware.org (Postfix) with ESMTPS id ED24C3882123 for ; Fri, 14 Jun 2024 12:23:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ED24C3882123 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ED24C3882123 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::534 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718367823; cv=none; b=PBhV3nTtoXmCuRPuKeCGvA3LTkhT97NjA5EdZ6n6jTHgfqrF0zbiHBcH+Qy0ShR5pETZ15JG7W0LWBe0e2YiBAl2zP/qEb9fHBGf35fOd9Vn/k+C1H7UEnAmYSi2h12C7M2UnTeckuLejsiJB1nAXWTiLeESVKEkXrjWkYWLtBQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718367823; c=relaxed/simple; bh=xnawUVam+BOIcKd0znWpYZ/+7sJrR9wYSPNw7J4vkJo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Ok5xhfpZvRYqdnYZWlofCgxaJ14/USC4Vvtsz4SZJwbjC2ushNGU3KqVvMCXwpFQ7cm/yypXvREtWOlkK7mhemNU6dnvAp2ibjorO1kr/bxF06+OcEkOYIfn4prO6xexj+MtKvQ2jwI1hu1dP/J0XRA4UNAzkCkWd8I+KcCTYSA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-57c681dd692so2248918a12.3 for ; Fri, 14 Jun 2024 05:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1718367818; x=1718972618; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9ite9UVi8RnyUYw+AhB5TK4cBORcaz/GAxHc+NPr2L8=; b=cnCUlOL6AACS1aSjcqnL4Gq3ZwxP3zmkmE1++WVWOp4cNG+FqFd98duauV3/W7+D37 vyV8Fa55xj2ZsnF7zkwhsJoth7qbbIUewokqd4ncuM/vWBE8KSnuAzsiLEtlgqQSVZY9 4ETy12e3KxjmWrVzz/1k/0MKkYm1ZZlIdFzr4pD8M4lwo+18wRyU2uAgAWLMfCt13Xid UFKYlKrSo2YBYHtI66xB7cgNhW9r9ypdLuBS1MAe9sjMjAsPqwTMOIBnoLrNWe5L1uvt k4EWW3ylwitqZEYulcOXl3MXafUbhoR3B/YswQfZ4FNrdjua+bVl+4HBKHdLD7aqaxAy azGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718367818; x=1718972618; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9ite9UVi8RnyUYw+AhB5TK4cBORcaz/GAxHc+NPr2L8=; b=A0BGAaInoNYWyrjatxzl2yVZsthicH3rU9k2LEPibfYq2bVTk5rFKhPuu6iZ+itfFH ktwUBSImCNoZHmtZM2/O1snJlUeoYuMbV7FU5+e4QE/nR8LADhvNWt1e+7seLG3Bf6pF WuIxy4z9X8p8DKrZFCxJlcHbiLCsvrjy2P8s+suXGqYjkJM6BrOs69b9pU+Ii3ckLjfD 1hsWL1lq6oOcTeAaGeuCXxyApBf3ZxylHNv53vqXINnMO9Pten8d8gqaZKFHgqkYVWBB ajYFykMwoM133HeFhQp9ecTuU9uqHYQljeYYLGmnexB6ShmS5QhW7hu1nH3iEG79Hm1K g+vQ== X-Gm-Message-State: AOJu0YyEF3LcpqGBLqI0k0oiTsDDvNvdqgD8O1A09M0ZKGZZBeAI+/7L uf+0XgXnH4A87LOfnbJarb0BMDBCwmxXHLxkXbLMV59RbGyHITtkxQgv7yxKOvnF/3OpbZ5FTFX T+ij6 X-Google-Smtp-Source: AGHT+IHCvoHTNXm3ScjX9GZdBJLyu+TUpOqoQCH2h6bhDuGtxztE87rELOUF9pnV5NIQyg4pvlZQNg== X-Received: by 2002:a17:906:c291:b0:a6d:ee51:793b with SMTP id a640c23a62f3a-a6f60de1cc1mr146143466b.73.1718367817716; Fri, 14 Jun 2024 05:23:37 -0700 (PDT) Received: from localhost.localdomain ([2a04:cec2:26:2e08:be74:f961:1e88:9892]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56da3fe5sm183703866b.18.2024.06.14.05.23.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 05:23:37 -0700 (PDT) From: Arthur Cohen To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Arthur Cohen Subject: [PATCH 14.2 3/3] rust: Copy install-html rule from Ada frontend Date: Fri, 14 Jun 2024 16:21:17 +0200 Message-ID: <20240614142300.31778-8-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240614142300.31778-2-arthur.cohen@embecosm.com> References: <20240614142300.31778-2-arthur.cohen@embecosm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org gcc/rust/ChangeLog: * Make-lang.in: Add proper rust.install-html rule. --- gcc/rust/Make-lang.in | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in index 2395541425f..815a8b315c0 100644 --- a/gcc/rust/Make-lang.in +++ b/gcc/rust/Make-lang.in @@ -375,7 +375,24 @@ selftest-rust-valgrind: $(RUST_SELFTEST_DEPS) rust.install-info: rust.install-dvi: -rust.install-html: + +rust.install-html: $(build_htmldir)/rust + @$(NORMAL_INSTALL) + test -z "$(htmldir)" || $(mkinstalldirs) "$(DESTDIR)$(htmldir)" + @for p in $(build_htmldir)/rust; do \ + if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \ + f=$(html__strip_dir) \ + if test -d "$$d$$p"; then \ + echo " $(mkinstalldirs) '$(DESTDIR)$(htmldir)/$$f'"; \ + $(mkinstalldirs) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ + echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \ + else \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \ + fi; \ + done + rust.install-pdf: # Install man pages for the front end. This target should ignore errors.