Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp531095rwb; Sat, 14 Jan 2023 04:30:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXtoZkyYXMw9syawDwQsDf1D8piYLLClDBbQ3/LdOiOsSveLT3StaGttR9erKmUVFPth1rB2 X-Received: by 2002:a17:90a:f2d4:b0:228:d0d4:a061 with SMTP id gt20-20020a17090af2d400b00228d0d4a061mr17566252pjb.32.1673699433635; Sat, 14 Jan 2023 04:30:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673699433; cv=none; d=google.com; s=arc-20160816; b=D8twMbdktXmFI0hc7hXv2eV0g9axhOfKpp4VlyLNNO+ZwRX3Pi6AydusW2SdlaeLhE /qWamrlnByk4W35xgHf97X2OyR4B8vxNPU/5FYBd+UbMafR3+crt9xDjYy6rzEoC9TdU HKECTFaZgEEa3uImuZV1m9BErd3+KDuMySGKRFt9ML+SPiKbu8VyyvcjtpaTW3hxc5Fk GGk3prp/1++ZYJyfUwxEc+XwOBIhMucyLRerLJ+5Dyur/HgEJyu38iEP5VpuPgRrMiMN eYUUFrsjgxR/4RqS+ii5ATZDHQNTdKXBvkU/ojHJmbIHTH5uzj//1URSiSpOY2JN3bhz eLkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=qadApUskd1cmnf3V0uX5pB2OviK6XICzMAvYb4D0ACk=; b=tEO1kcLaePH2LErlhqEA//LwrPZASx4T8BcaGe+4JrIHPJMxhXi0oh7oFJkUkSag17 C5wOMsVuJfD4kDXNZ0RTzvWb4Idb5V2RT3s9J4/mBdf0abDq7mGTHa3BTe4dwfAeLBKD +s/LdPJuCksX89HcmBwn16DSGQVSlLCYEuXOojqzd5j65K5wUUcW6tnrEpPWVfsEcqo/ y9Vf7z2i6ADvSjXMdx+9Huu14y9w+80t2ZXadL1N+J6ZDfNvIy3ckET2DxKRpl/c4tx/ YPydTXQhujObpseyltp+YVZj/IibXSJYJS4y9XUufyEGY1UnLhS1F9hBD+UCNyqERuMk Gu+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=M8tRVcsn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lw5-20020a17090b180500b0021924a18b39si2724619pjb.96.2023.01.14.04.30.26; Sat, 14 Jan 2023 04:30:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=M8tRVcsn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229918AbjANMMB (ORCPT + 51 others); Sat, 14 Jan 2023 07:12:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229682AbjANML6 (ORCPT ); Sat, 14 Jan 2023 07:11:58 -0500 Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DA80658F; Sat, 14 Jan 2023 04:11:58 -0800 (PST) Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-4b718cab0e4so319895957b3.9; Sat, 14 Jan 2023 04:11:58 -0800 (PST) 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:message-id:reply-to; bh=qadApUskd1cmnf3V0uX5pB2OviK6XICzMAvYb4D0ACk=; b=M8tRVcsnUUjmGQBAPSt+T9H0jGs8nH+t+8hiN5SYI2LHcyzNswtdQQ3Drv8cMPyUcn s3SdC+JPZxQcKd5mydvVkEkDbgfo0cTws8Scju/gyWs9Wd0+LmOCck8RcnxWjMrwE6Cu mDG0S2BIeJeIqf6GZNQSePK3t3WBSBNwcHwWLrtfIVzxqOQyraX22PcHV9LYzkGryp5x rL8LqYKtiykkaFXA4+YAO2vhYfxcro0+05XqqE4lxiaIty551MI6nmoxrpzSebqp0Q9z IGJNWmVnlf9QQdEOY93ENXZserVaLj7rDN5jYsLE03q1cALsG/gqbpH2i+WLeOhJAhXn 2G0A== 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:message-id :reply-to; bh=qadApUskd1cmnf3V0uX5pB2OviK6XICzMAvYb4D0ACk=; b=VUXHqB4w1ur1hLRLqu1bpSfl3rxdIvJgUeHsUt0/a7DYKD56PHfQxAKnMsHIlx6aBp KMcIFEWLmP6oWrWIBYrqarSuk2/rkhGn4ehc7qse6157EfwmxAdyU884AdPpwoPSZaM1 C8RI6XYfNcBDQlu6B+vrtAsfC/UDJmv0vn3fiHPq/fmnenbPdhfeOKsP7BhdacKOl14c wtvEY+2J+p2U6lFR4L3c33rw+kDu2TTL7YPott9rKZz7HL+QLkjzwBeZa1KA/n+kVu1I dn9ulIrqd3ag/EB99n1iCgEGgG58gW6iV81/2bskmN2dlYdvKAxTEQAEOv+0HiptQECx GXlQ== X-Gm-Message-State: AFqh2kpLNElJspdbGBZTHENfwC30x2LBQwB7q3j2DS+eK+Z/EE5c6GJg 7SyLYz/oXTm07YQRCwiDT4CXivq735Vs3iF7V9w= X-Received: by 2002:a81:a110:0:b0:484:a94f:210 with SMTP id y16-20020a81a110000000b00484a94f0210mr1543433ywg.129.1673698317372; Sat, 14 Jan 2023 04:11:57 -0800 (PST) MIME-Version: 1.0 References: <20230109204520.539080-1-ojeda@kernel.org> <20230109204520.539080-3-ojeda@kernel.org> In-Reply-To: From: Miguel Ojeda Date: Sat, 14 Jan 2023 13:11:46 +0100 Message-ID: Subject: Re: [PATCH 3/6] kbuild: rust_is_available: add check for `bindgen` invocation To: Masahiro Yamada Cc: Miguel Ojeda , linux-kbuild@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Nicolas Schier , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Alexandru Radovici , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 14, 2023 at 10:44 AM Masahiro Yamada wrote: > > Ah, I see. > > How about this? > > bindgen_libclang_output=$(LC_ALL=C "$BINDGEN" $(dirname > $0)/rust_is_available_bindgen_libclang.h 2>&1 >/dev/null) \ > || bindgen_libclang_code=$? > > You can get the error code of bindgen without toggling -e. As you prefer -- personally I tend to avoid assigning two variables in a single "statement" (like in C), but I am also happy avoiding to toggle `-e` since it is global state and therefore ugly too anyway. Cheers, Miguel