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 9ABBED81195 for ; Mon, 12 Feb 2024 16:25:22 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=n8/5RYyxGsYxe3NwaWafQoV1gX61My9AVNdr9yxf0mk=; 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=1707755121; v=1; b=ailHEHG7bOdoum/nZ4VcGKJnMC7rU0k1V6xOdEcAJNq3OdeVYuWTjceVH5UQa40fQKHILaiN 7ajlgrbSFlsc1OK5XOpfA0Fg+oidgEi7M3dBqLce0ZPGB63HKHtGLYXk1UT27TIT2PG+nxfX2Ih DkRCWD/vWxqXSrUt1L3oS6a0= X-Received: by 127.0.0.2 with SMTP id d6lgYY7687511xTksxR4xAb1; Mon, 12 Feb 2024 08:25:21 -0800 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.10579.1707755120648339552 for ; Mon, 12 Feb 2024 08:25:20 -0800 X-Received: from [10.0.0.154] (unknown [20.39.63.12]) by linux.microsoft.com (Postfix) with ESMTPSA id E5359207ECA2; Mon, 12 Feb 2024 08:25:19 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E5359207ECA2 Message-ID: Date: Mon, 12 Feb 2024 11:25:19 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [edk2-stable202402][Patch V3 2/7] UnitTestFrameworkPkg: MSFT CC_FLAGS add /MT to for host builds To: devel@edk2.groups.io, michael.d.kinney@intel.com Cc: Sean Brogan References: <20240209203253.488-1-michael.d.kinney@intel.com> <20240209203253.488-3-michael.d.kinney@intel.com> From: "Michael Kubacki" In-Reply-To: <20240209203253.488-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: yeTRUJyVEh6G8vPktXXdbxnox7686176AA= 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=ailHEHG7; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linux.microsoft.com (policy=none) Acked-by: Michael Kubacki On 2/9/2024 3:32 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 > --- > 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..bdab98a54f0e 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 /EHs /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 (#115354): https://edk2.groups.io/g/devel/message/115354 Mute This Topic: https://groups.io/mt/104267257/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-