From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 4E402940855 for ; Wed, 14 Feb 2024 00:32:22 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=sXreQ9PtHO1xQbahMeeIFzzFxJuBUfP6ELb/cmD/WwU=; c=relaxed/simple; d=groups.io; h=DKIM-Filter:Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1707870741; v=1; b=t181GXOx1/ZqxvNge0tEdhkOGcSV1EK3iOJh2aMRh6DVZsXV5qyOVpuLQl4k445ZMR+ncq3s Nrm8qE6LApRUcU5Oa0i5V/ifzafUyyj+5XbU8QrGi7xtan75phkro3WqVC+PUJMf67CuEmIwDH1 fjP9gF28DVk8Iz2xfIcvLfkU= X-Received: by 127.0.0.2 with SMTP id r5WMYY7687511xW8G0T4bvLK; Tue, 13 Feb 2024 16:32:21 -0800 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web11.30999.1707870740280635065 for ; Tue, 13 Feb 2024 16:32:20 -0800 X-Received: from [10.0.0.154] (unknown [20.39.63.11]) by linux.microsoft.com (Postfix) with ESMTPSA id 8B4AA207ECBD; Tue, 13 Feb 2024 16:32:19 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8B4AA207ECBD Message-ID: <4cef018b-32a9-432e-86f6-17ca5ffd5646@linux.microsoft.com> Date: Tue, 13 Feb 2024 19:32:19 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [edk2-stable202402][Patch v4 2/7] UnitTestFrameworkPkg: MSFT CC_FLAGS add /MT to for host builds To: Michael D Kinney , devel@edk2.groups.io Cc: Sean Brogan , Michael Kubacki References: <20240213172612.636-1-michael.d.kinney@intel.com> <20240213172612.636-3-michael.d.kinney@intel.com> From: "Michael Kubacki" In-Reply-To: <20240213172612.636-3-michael.d.kinney@intel.com> Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mikuback@linux.microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: iwTjJn5fkNGc5MBonSU2AVxAx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=t181GXOx; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linux.microsoft.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io After further explanation from Mike: Reviewed-by: Michael Kubacki On 2/13/2024 12:26 PM, Michael D Kinney wrote: > Add /MT to MSFT CC_FLAGS to always use release libraries > when building host-based unit tests so any exceptions > generated during host-based test execution generate an > error message in stderr instead of a popup window. >=20 > Use /MTd when -D UNIT_TESTING_DEBUG is to use debug > libraries when building host-based unit tests so any > exceptions generated during host-based test execution > generate a popup window with option to attach a debugger. >=20 > Cc: Michael Kubacki > Cc: Sean Brogan > Signed-off-by: Michael D Kinney > Acked-by: Michael Kubacki > --- > UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf | 2 +- > UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf= b/UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf > index 0104384953c3..83ab9f9b2af8 100644 > --- a/UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf > +++ b/UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf > @@ -28,6 +28,6 @@ [Packages] > UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec > =20 > [BuildOptions] > - MSFT:*_*_*_CC_FLAGS =3D=3D /c /EHsc /Zi /Od > + MSFT:*_*_*_CC_FLAGS =3D=3D /c /EHsc /Zi /Od /MT > GCC:*_*_IA32_CC_FLAGS =3D=3D -g -c -fshort-wchar -O0 -m32 > GCC:*_*_X64_CC_FLAGS =3D=3D -g -c -fshort-wchar -O0 -m64 > diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc b/Unit= TestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc > index b8068fd91c98..00f8d9a895be 100644 > --- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc > +++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc > @@ -24,9 +24,10 @@ [LibraryClasses.common.HOST_APPLICATION] > PeiServicesTablePointerLib|UnitTestFrameworkPkg/Library/UnitTestPeiSe= rvicesTablePointerLib/UnitTestPeiServicesTablePointerLib.inf > =20 > [BuildOptions] > + MSFT:*_*_*_CC_FLAGS =3D /MT > GCC:*_*_*_CC_FLAGS =3D -fno-pie > !ifdef $(UNIT_TESTING_DEBUG) > - MSFT:*_*_*_CC_FLAGS =3D -D UNIT_TESTING_DEBUG=3D1 > + MSFT:*_*_*_CC_FLAGS =3D /MTd -D UNIT_TESTING_DEBUG=3D1 > GCC:*_*_*_CC_FLAGS =3D -D UNIT_TESTING_DEBUG=3D1 > XCODE:*_*_*_CC_FLAGS =3D -D UNIT_TESTING_DEBUG=3D1 > !endif -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115422): https://edk2.groups.io/g/devel/message/115422 Mute This Topic: https://groups.io/mt/104336759/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-