Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2112301lqo; Sun, 19 May 2024 14:13:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXt8KIjcdP0AjySqPdQjW9gh9J6KCeA+dWEuJrSsaOfozHppHykU6bWJxBktko1pS7nnjBad+2a8uvKZcgqGu3rD34RZOHDic/fYpk7ig== X-Google-Smtp-Source: AGHT+IHZrKAym9mDjgTYw04/nfCHI4E2MzjYAJ+yzCskY0G54FxOz5nKWOVYW4VTqmBgVaYILO5d X-Received: by 2002:a50:bacf:0:b0:571:bd88:e84b with SMTP id 4fb4d7f45d1cf-5734d5cec30mr18940969a12.18.1716153211815; Sun, 19 May 2024 14:13:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716153211; cv=pass; d=google.com; s=arc-20160816; b=Q/kyR/r/p/oS/E2s3BFFjelIAs6NO1QZkM1Q2Qr9ubTOax+ns547D3+2zdPdMeKJeN ZO2ho3WzxC1fHtsoirzHjNlbzkrcN3ufNp/ldB9Sr8TwJ+YB4eF8pdmUm0f5wWeMSqQj MS4AJOsORd+akd75NMwdt4oWTOMI3M2V/IEKOENsgw32qc4RO/mJJPfcyqFnn5QFXHBF ftCdZCEgyg9nK7+7dhVqK0W5Nsc/zkcFLg4YhdYqXtShZ4z0Aqf58YEEiIhKQfN/9S8S WSVIbp3ITXIOFbtQpiH3JcZusqBo61KQJ2f5uR7AXs4+9AgV4Hbf/JxKoqyIdnXXebF4 Y83A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=/ir3qsA7iljjJe4+W3o/pea/EsTP+jGA0Wu/q4KgMtU=; fh=vcjGgKSUik/X1GsNSn56TQcLwkCuwmEQ7RhHZNt1/eM=; b=krjWE1Fw2/YcMUzc92rgNUGdvNLm1oLXvT3hHEx1RLzw0SXq+2xVcL/d0Uz8AO8+Cu HmahAr5fl4AP7nxF/OoC/s307/lAedEKTxg/LcaoUin7DG6B8gakYCk8eMYx7osgkr2C Z/NlfwFCTpKMGRKEbIH2BhkZ6E8U8CzB/xbgBeHnF0mE/vd59qb2PWvJ8R4KjmaLu9UG w48TKNkv2kUM9szzzt4N6q3eXGChBdD9P/jLNSoschoPc4aTu9wOgl6QENgmwBagpsxG jUFWScWgBiQyPQv5fP7eBUcaEn4gc5Xdl1H8b21yv39L0gSWQ1V/D2mB7P/gLTvHlweW 1daA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RB5Hff15; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-183272-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183272-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-574ec5bf8b2si6634894a12.434.2024.05.19.14.13.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 14:13:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183272-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RB5Hff15; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-183272-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183272-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8D0E51F21039 for ; Sun, 19 May 2024 21:13:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 517E27317C; Sun, 19 May 2024 21:12:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RB5Hff15" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 736CA26AEC; Sun, 19 May 2024 21:12:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716153176; cv=none; b=Xj6Y2Znx7Y9QSwp07e36yIr/twIxYOZDMEWGK/wg3+TxKzCslTjdDQ/GmTakl2PDtN27PmR1FqH3dZGQvehW8jUx27/3e5SITI55yEDZurmV3ySKvFrqoNXe26cgcqUN/6F2PF1q5ehKDI48NfYwmGLhckRQ/D8qHWTl2AnDGfI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716153176; c=relaxed/simple; bh=ycHchcNNkPJYHuh6grxXiGPIJUsXEsvkI6+Ndfvc6L0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UKBW3G7TsT4SawD8CtvbFfBhmajcjfs8Vleg/wggEdYsGE1+p9K0ggPfJNtGagKnb1kPFHC7omP3fqJUdp7YItXLu1i4L+ttu/nLrZTrfcSgUZVDO9LlMYlUDLbKqAVrhyMd6Z0KTrxQVAIcTyGypBEA0ZHTngEpenIcq/PVksQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RB5Hff15; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6EC64C32781; Sun, 19 May 2024 21:12:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716153176; bh=ycHchcNNkPJYHuh6grxXiGPIJUsXEsvkI6+Ndfvc6L0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RB5Hff15TXv+xZ+4FoMJHqq91r+V9dYXpxdjHbBAOPgvPgIlH5dhy5OifIA9U6LQO uec6kb2dypXp42GiUWluk7mqoo+a+7PSNIFhxzb6tOlxjhSkp4Amcwm0KG7WfFXaJG DQbuETZs/Qvxxf4KI95TjX5CqMms8aN+RAla9DoH83c8A5HDU3H26qF2eGBCCFmHe1 e6RcXIWt7hZ2099tnpps2TYnbFyXZ9Zk3C1l8x2rkAKQ2XacQO8LiLDDNVQr0+QLJX w60rOaMK0THM1SvctabMwFtvCV/C9FyQfEApmQewgq0N/w/z+gSv1E0zQYGXjnAlhx OdTijlbyczy+A== From: Miguel Ojeda To: Masahiro Yamada , Miguel Ojeda , Wedson Almeida Filho , Alex Gaynor Cc: Nathan Chancellor , Nicolas Schier , Boqun Feng , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , linux-kbuild@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: [PATCH 3/3] kbuild: rust: support `W=e` for Rust Date: Sun, 19 May 2024 23:12:35 +0200 Message-ID: <20240519211235.589325-3-ojeda@kernel.org> In-Reply-To: <20240519211235.589325-1-ojeda@kernel.org> References: <20240519211235.589325-1-ojeda@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit With `W=e`, kernel C targets error out on warnings. Add support for the same feature for Rust code, but take the opportunity to apply it for every Rust target (i.e. not just kernel code), so that it behaves like having set `CONFIG_WERROR`. Signed-off-by: Miguel Ojeda --- scripts/Makefile.extrawarn | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index 990890821889..214b5edce4f2 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn @@ -206,5 +206,6 @@ endif ifneq ($(findstring e, $(KBUILD_EXTRA_WARN)),) KBUILD_CFLAGS += -Werror +rust_common_flags += -Dwarnings endif -- 2.45.1