From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 219F7143724 for ; Thu, 30 May 2024 05:05:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717045528; cv=none; b=iTJyXMQ79NjBos049I2sI3wDu+fkzatRfv2+B4jqYBvl1hRlNM5ItfXpqq5N0Dfgx1UTYQgUoEGH7r+OK85a3QiUqTBPb4XeZCIJugH/HGghMbIbF1AmUjdrZivb/DTCcJLh5JoW43j/ItVLN086+2GgqxGpIErgLyXwnsTuWgE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717045528; c=relaxed/simple; bh=s9qXRDE3kVrAi41iJlR/Y5hBZergFEJWL5Qw7DmJZ7U=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=kRfpQsRJDDa1/3UROyxL6yRDROuTcjyZMVcO/gsRVyc7Wc6NABX8rPsDSbxJa94n6anKey3mdB/Gg89ZGY7eUH78OQUd9ESXrs6g1ZSyur36eL+zJ60km6SNlaW4ogu5wtUIrwopNAb98wkh2xI1knptE0AdjxT65qZO/Skgs/k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=uRn7mB89; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="uRn7mB89" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1717045523; bh=s9qXRDE3kVrAi41iJlR/Y5hBZergFEJWL5Qw7DmJZ7U=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=uRn7mB89I2VpD/4rjIY1xGx+r6xJfQejHjCuoOWO4c/11bqz6E8UDyH8oCtRy8De5 +u9cNLQ7jSV+UjaBF5LbzSSx+I2UuXiO45/rk1i4nxYrAs/gqIFg/M4o53AOfwxB2b yDf/uArjFtwVZu7P+zFsjZAe0EDDiMTgcQkE0iSR5b4ONJLHZtl1zLUgXMw0omEXkM GR5pSuxMjjNLp8Jv2xSuM1DXliLmW+YMlOiRnzhf8DQakzTI460aVtC5I6fpucz8n5 HD6H8SfxLy/V3nYvyAJrLlvprQyqPpy5l+03hLdEQlY0S6l2R1op6IFB+VCsgUD+C8 EIC1PfLBwUgfg== Received: from [100.113.15.66] (ec2-34-240-57-77.eu-west-1.compute.amazonaws.com [34.240.57.77]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id CC77A3782173; Thu, 30 May 2024 05:05:13 +0000 (UTC) Message-ID: <20323e06-e2f6-4991-8b63-4471b6567932@collabora.com> Date: Thu, 30 May 2024 10:04:43 +0500 Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: Muhammad Usama Anjum , Beau Belgrave , Steven Rostedt , Mark Brown , Naresh Kamboju , Nick Desaulniers , Justin Stitt , Bill Wendling , sunliming , Masami Hiramatsu , Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev, Nathan Chancellor , Ryan Roberts Subject: Re: [PATCH 1/2] selftests/lib.mk: handle both LLVM=1 and CC=clang builds To: John Hubbard , Shuah Khan References: <20240529020842.127275-1-jhubbard@nvidia.com> <20240529020842.127275-2-jhubbard@nvidia.com> Content-Language: en-US From: Muhammad Usama Anjum In-Reply-To: <20240529020842.127275-2-jhubbard@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/29/24 7:08 AM, John Hubbard wrote: > The kselftests may be built in a couple different ways: > make LLVM=1 > make CC=clang > > In order to handle both cases, set LLVM=1 if CC=clang. That way,the rest > of lib.mk, and any Makefiles that include lib.mk, can base decisions > solely on whether or not LLVM is set. > > Cc: Nathan Chancellor > Cc: Ryan Roberts > > Signed-off-by: John Hubbard LGTM Reviewed-by: Muhammad Usama Anjum > --- > tools/testing/selftests/lib.mk | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk > index 429535816dbd..2902787b89b2 100644 > --- a/tools/testing/selftests/lib.mk > +++ b/tools/testing/selftests/lib.mk > @@ -1,5 +1,17 @@ > # This mimics the top-level Makefile. We do it explicitly here so that this > # Makefile can operate with or without the kbuild infrastructure. > + > +# The kselftests may be built in a couple different ways: > +# make LLVM=1 > +# make CC=clang > +# > +# In order to handle both cases, set LLVM=1 if CC=clang. That way,the rest of > +# lib.mk, and any Makefiles that include lib.mk, can base decisions solely on > +# whether or not LLVM is set. > +ifeq ($(CC),clang) > + LLVM := 1 > +endif > + > ifneq ($(LLVM),) > ifneq ($(filter %/,$(LLVM)),) > LLVM_PREFIX := $(LLVM) -- BR, Muhammad Usama Anjum