From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.4219.1678875090710345032 for ; Wed, 15 Mar 2023 03:11:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=M66QSe9F; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678875089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TpuUQjgA2Zh+RoYuq6WAAGgmfEHh7w5kolLAt9U4ks8=; b=M66QSe9Fyg6Tj28vCT1uQBVxc+88bOmYsbM+FqngzwSubLCl60QaYcIe4lQpLQK7PEJn5g SW876m/9s+pwqVV7ZCSrcos1NElP7l9E0Q3aOjmWjXOrGdmUci5cBNdh7kyThXOULB/vOm NV6e0vpcBqxeR19YcyytzKh9WQP9CTs= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-606-vB1w_onRNROy4C9m0NAGgA-1; Wed, 15 Mar 2023 06:11:26 -0400 X-MC-Unique: vB1w_onRNROy4C9m0NAGgA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 23A1829ABA16; Wed, 15 Mar 2023 10:11:26 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.211]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ED6C440C6E68; Wed, 15 Mar 2023 10:11:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C58101800393; Wed, 15 Mar 2023 11:11:24 +0100 (CET) Date: Wed, 15 Mar 2023 11:11:24 +0100 From: "Gerd Hoffmann" To: devel@edk2.groups.io, quic_rcran@quicinc.com Cc: Andrew Fish , Leif Lindholm , Michael D Kinney , Bob Feng , Liming Gao , Yuwei Chen , Rebecca Cran Subject: Re: [edk2-devel] [PATCH 2/3] BaseTools: Improve detection of users wanting to build using clang Message-ID: <20230315101124.d2v7b2d6x25hh7mg@sirius.home.kraxel.org> References: <20230217035101.880854-1-rebecca@quicinc.com> <20230217035101.880854-3-rebecca@quicinc.com> MIME-Version: 1.0 In-Reply-To: <20230217035101.880854-3-rebecca@quicinc.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Feb 16, 2023 at 08:51:00PM -0700, Rebecca Cran wrote: > In https://bugzilla.tianocore.org/show_bug.cgi?id=2842 clang support was > added by having users specify "make CXX=llvm" when building BaseTools. > > Improve the detection of when a user wants to use the clang toolchain: > instead of checking if CXX=llvm (which in most cases doesn't make sense, > because the C++ compiler won't be run via an 'llvm' command), run > '$(CC) --version | grep clang' to see if the compiler's version string > contains 'clang', and if so configure the environment. > > This provides flexibility to specify for example CC=clang-17 > CXX=clang++-17 if multiple versions are installed. That totally makes sense. And maybe simply use 'cc' by default then? take care, Gerd