public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: Michael Kubacki <mikuback@linux.microsoft.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Sean Brogan <sean.brogan@microsoft.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [edk2-stable202402][Patch V3 2/7] UnitTestFrameworkPkg: MSFT CC_FLAGS add /MT to for host builds
Date: Sat, 10 Feb 2024 04:03:08 +0000	[thread overview]
Message-ID: <CO1PR11MB492920B8E007B9F05CFC2616D24A2@CO1PR11MB4929.namprd11.prod.outlook.com> (raw)
In-Reply-To: <9eea86e6-f105-4383-9f00-3826f7400162@linux.microsoft.com>

The goal was to get everything to /EHs.  I can't recall if using /MT
required it or if this could be moved to the next patch.

Mike

> -----Original Message-----
> From: Michael Kubacki <mikuback@linux.microsoft.com>
> Sent: Friday, February 9, 2024 6:26 PM
> To: devel@edk2.groups.io; Kinney, Michael D
> <michael.d.kinney@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Subject: Re: [edk2-devel] [edk2-stable202402][Patch V3 2/7]
> UnitTestFrameworkPkg: MSFT CC_FLAGS add /MT to for host builds
> 
> Did this patch intend to swap /EHsc with /EHs? It looks like that was
> planned for patch 3/7.
> 
> 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.
> >
> > 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.
> >
> > Cc: Michael Kubacki <mikuback@linux.microsoft.com>
> > Cc: Sean Brogan <sean.brogan@microsoft.com>
> > Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> > ---
> >   UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf | 2 +-
> >   UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc        | 3
> ++-
> >   2 files changed, 3 insertions(+), 2 deletions(-)
> >
> > 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
> >
> >   [BuildOptions]
> > -  MSFT:*_*_*_CC_FLAGS   == /c /EHsc /Zi /Od
> > +  MSFT:*_*_*_CC_FLAGS   == /c /EHs /Zi /Od /MT
> >     GCC:*_*_IA32_CC_FLAGS == -g -c -fshort-wchar -O0 -m32
> >     GCC:*_*_X64_CC_FLAGS  == -g -c -fshort-wchar -O0 -m64
> > diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
> b/UnitTestFrameworkPkg/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/UnitTestPeiServ
> icesTablePointerLib/UnitTestPeiServicesTablePointerLib.inf
> >
> >   [BuildOptions]
> > +  MSFT:*_*_*_CC_FLAGS = /MT
> >     GCC:*_*_*_CC_FLAGS = -fno-pie
> >   !ifdef $(UNIT_TESTING_DEBUG)
> > -  MSFT:*_*_*_CC_FLAGS  = -D UNIT_TESTING_DEBUG=1
> > +  MSFT:*_*_*_CC_FLAGS  = /MTd -D UNIT_TESTING_DEBUG=1
> >     GCC:*_*_*_CC_FLAGS   = -D UNIT_TESTING_DEBUG=1
> >     XCODE:*_*_*_CC_FLAGS = -D UNIT_TESTING_DEBUG=1
> >   !endif


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115343): https://edk2.groups.io/g/devel/message/115343
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]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-02-10  4:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-09 20:32 [edk2-devel] [edk2-stable202402][Patch V3 0/7] EDK II CI misses UnitTestFrameworkPkg failures Michael D Kinney
2024-02-09 20:32 ` [edk2-devel] [edk2-stable202402][Patch V3 1/7] MdePkg/Include: Rename _DEBUG() to address name collision Michael D Kinney
2024-02-13 11:57   ` Leif Lindholm
2024-02-09 20:32 ` [edk2-devel] [edk2-stable202402][Patch V3 2/7] UnitTestFrameworkPkg: MSFT CC_FLAGS add /MT to for host builds Michael D Kinney
2024-02-10  2:26   ` Michael Kubacki
2024-02-10  4:03     ` Michael D Kinney [this message]
2024-02-12 16:25   ` Michael Kubacki
2024-02-09 20:32 ` [edk2-devel] [edk2-stable202402][Patch V3 3/7] UnitTestFrameworkPkg: Expand host-based exception handling and gcov Michael D Kinney
2024-02-12 16:25   ` Michael Kubacki
2024-02-09 20:32 ` [edk2-devel] [edk2-stable202402][Patch V3 4/7] UnitTestFrameworkPkg/UnitTestLib: GetActiveFrameworkHandle() no ASSERT() Michael D Kinney
2024-02-12 16:25   ` Michael Kubacki
2024-02-09 20:32 ` [edk2-devel] [edk2-stable202402][Patch V3 5/7] UnitTestFrameworkPkg/UnitTestDebugAssertLib: Add GoogleTest support Michael D Kinney
2024-02-12 16:25   ` Michael Kubacki
2024-02-09 20:32 ` [edk2-devel] [edk2-stable202402][Patch V3 6/7] UnitTestFrameworkPkg/SampleGoogleTest: Use EXPECT_ANY_THROW() Michael D Kinney
2024-02-12 16:25   ` Michael Kubacki
2024-02-09 20:32 ` [edk2-devel] [edk2-stable202402][Patch V3 7/7] UnitTestFrameworkPkg: Add DSC and host tests that always fail Michael D Kinney
2024-02-12 16:26   ` Michael Kubacki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CO1PR11MB492920B8E007B9F05CFC2616D24A2@CO1PR11MB4929.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox