From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id CFF15385734B; Wed, 14 Sep 2022 13:40:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CFF15385734B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x631.google.com with SMTP id u9so34857059ejy.5; Wed, 14 Sep 2022 06:40:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=jcpL9hPmZyfS5FGWEoC3TxYPkq8VvGlJXUQvj/cRN/8=; b=Iy+zrlFf2wWfjFSMwIEZM97gPiut7v+zARIIKGM2dmeKddhyey9YZ3D5NRJRnvyHXU 4JD0XBOx+Sc1pPG2kROIb3GipDbjo94VQOHYWFZgfYQmz+qxEh3g4Kx+BUs3cMTRIYGx SdC4rjb53IhCTSV99cU+uLiT31Oox9kNSC2P47Tnznygl+qP7/wVmzEfABgejzajA7tq nj/kECoud5hkS0fFFDiZSsgTDaSHI6J8kLFcZSYUskqS/aMJh40ETlQAe75vfVObhEas pUak5YR+Dg9czbJWP6dml70mZceQcTm7IoU5nDmA0RK7qnYltRM76sYLYj/UtYs5NZja ZQig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=jcpL9hPmZyfS5FGWEoC3TxYPkq8VvGlJXUQvj/cRN/8=; b=6ZPT3jFRAnZrcnXu2dTCrw4ysAdx+5jJp8AO+zregKr+OY5D6wxO97Rnw9Dc554/Ft 2RcaCJ4RmbArO1W7qwPqRzxUpCV77YuUc2e0LZXtQdvpPuKExC+hnXIwrKNqwbmAI2A0 igdvqCM0sVgTUgbkzt7IM2d9TX6XbJsJrlOB87onDjL3SXwS7poFf4iULMq8KqWaOS9i HOlJ626Mh6R3upCbGFb9DKvLXR9gsBUQb/T35NbKUzrTGA2bI1BhaKmD4BNQ5yejF1Xd Zhhbn3pF/vkpczmg0IRj82TS+2UpxWakfo91DhvCUvWVwWAaAxIq4BfxPNbheFN0hbym Cjkw== X-Gm-Message-State: ACgBeo2I8yZeJ8a5P08Sc+/uWhIp2KZT//OauwZC9l4UpRrhe3t1Wc98 YsmFwwesH0ast0IH3ZJT2FbLb5Ot9BJvWHUOL3M= X-Google-Smtp-Source: AA6agR5ouxJ86hg38uci314Yc704X+8rJ0/h6IESeFRwT5o8BX++JdZ8+JMES1jNxmISiSZoYt1HDtqjpgTlzCWOx30= X-Received: by 2002:a17:906:8a6c:b0:772:fe67:f5ea with SMTP id hy12-20020a1709068a6c00b00772fe67f5eamr22827127ejc.488.1663162799534; Wed, 14 Sep 2022 06:39:59 -0700 (PDT) MIME-Version: 1.0 References: <20220824115956.737931-1-philip.herron@embecosm.com> <20220824115956.737931-35-philip.herron@embecosm.com> In-Reply-To: <20220824115956.737931-35-philip.herron@embecosm.com> From: Richard Biener Date: Wed, 14 Sep 2022 15:39:47 +0200 Message-ID: Subject: Re: [PATCH Rust front-end v2 34/37] gccrs: add lang.opt To: philip.herron@embecosm.com Cc: gcc-patches@gcc.gnu.org, gcc-rust@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,KAM_SHORT,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 List-Id: On Wed, Aug 24, 2022 at 2:13 PM wrote: > > From: Philip Herron > > We have some rust specific langugage options note -fwrapv is enabled by > default in the code. We are trying to respect options such as > -Wunused-result which we get by porting over c++ no-discard for rust's > must-use attribute, so we have enabled these by default directly here. LGTM Richard. > --- > gcc/rust/lang.opt | 118 ++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 118 insertions(+) > create mode 100644 gcc/rust/lang.opt > > diff --git a/gcc/rust/lang.opt b/gcc/rust/lang.opt > new file mode 100644 > index 00000000000..1f6855ede1d > --- /dev/null > +++ b/gcc/rust/lang.opt > @@ -0,0 +1,118 @@ > +; Options for the Rust front end. > +; Copyright (C) 2003-2022 Free Software Foundation, Inc. > +; > +; This file is part of GCC. > +; > +; GCC is free software; you can redistribute it and/or modify it under > +; the terms of the GNU General Public License as published by the Free > +; Software Foundation; either version 3, or (at your option) any later > +; version. > +; > +; GCC is distributed in the hope that it will be useful, but WITHOUT ANY > +; WARRANTY; without even the implied warranty of MERCHANTABILITY or > +; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > +; for more details. > +; > +; You should have received a copy of the GNU General Public License > +; along with GCC; see the file COPYING3. If not see > +; . > + > +; See the GCC internals manual for a description of this file's format. > + > +; Please try to keep this file in ASCII collating order. > + > +; Describes command-line options used by this frontend > + > +Language > +Rust > + > +I > +Rust Joined Separate > +; Documented in c.opt > + > +L > +Rust Joined Separate > +; Not documented > + > +Wall > +Rust > +; Documented in c.opt > + > +Wunused-variable > +Rust Var(warn_unused_variable) Init(1) Warning > +; documented in common.opt > + > +Wunused-const-variable > +Rust Warning Alias(Wunused-const-variable=, 2, 0) > +Warn when a const variable is unused. > + > +Wunused-const-variable= > +Rust Joined RejectNegative UInteger Var(warn_unused_const_variable) Init(1) Warning LangEnabledBy(Rust,Wunused-variable, 1, 0) IntegerRange(0, 2) > +Warn when a const variable is unused. > + > +Wunused-result > +Rust Var(warn_unused_result) Init(1) Warning > +Warn if a caller of a function, marked with attribute warn_unused_result, does not use its return value. > + > +frust-crate= > +Rust Joined RejectNegative > +-frust-crate= Set the crate name for the compilation > + > +frust-debug > +Rust Var(flag_rust_debug) > +Dump various Rust front end internals. > + > +frust-dump- > +Rust Joined RejectNegative > +-frust-dump- Dump Rust frontend internal information. > + > +frust-max-recursion-depth= > +Rust RejectNegative Type(int) Var(rust_max_recursion_depth) Init(64) > +-frust-max-recursion-depth=integer > + > +frust-mangling= > +Rust Joined RejectNegative Enum(frust_mangling) Var(flag_rust_mangling) > +-frust-mangling=[legacy|v0] Choose which version to use for name mangling > + > +Enum > +Name(frust_mangling) Type(int) UnknownError(unknown rust mangling option %qs) > + > +EnumValue > +Enum(frust_mangling) String(legacy) Value(0) > + > +EnumValue > +Enum(frust_mangling) String(v0) Value(1) > + > +frust-cfg= > +Rust Joined RejectNegative > +-frust-cfg= Set a config expansion option > + > +frust-edition= > +Rust Joined RejectNegative Enum(frust_edition) Var(flag_rust_edition) > +-frust-edition=[2015|2018|2021] Choose which edition to use when compiling rust code > + > +Enum > +Name(frust_edition) Type(int) UnknownError(unknown rust edition %qs) > + > +EnumValue > +Enum(frust_edition) String(2015) Value(0) > + > +EnumValue > +Enum(frust_edition) String(2018) Value(1) > + > +EnumValue > +Enum(frust_edition) String(2021) Value(2) > + > +frust-embed-metadata > +Rust Var(flag_rust_embed_metadata) > +Flag to enable embeding metadata directly into object files > + > +frust-metadata-output= > +Rust Joined RejectNegative > +-frust-metadata-output= Path to output crate metadata > + > +o > +Rust Joined Separate > +; Documented in common.opt > + > +; This comment is to ensure we retain the blank line above. > -- > 2.25.1 >