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 6C82BAC1696 for ; Fri, 9 Feb 2024 20:33:04 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=bCnzqMPuJEnaYhd1Ymq9JFcdf5d/pEP7V9TW7BGF9rM=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1707510783; v=1; b=walDeFhMZtIy5kpxiRlVx+rH2YCdDML/EuK3bF5SX6cwr1nVud7xb1Pst2Z073fiQJbH61NG nyqH4ao9R4quDvdOAAalbvG9CK/gwMgRl3mVBXoG4hMcwIa9PnHgd9KhNnP1lvtPjr4X/Rz6EgT O2BAPFljGR/eCnEDmnik7o9I= X-Received: by 127.0.0.2 with SMTP id 5GcZYY7687511xk34bLrmxAC; Fri, 09 Feb 2024 12:33:03 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mx.groups.io with SMTP id smtpd.web11.23458.1707510780426267029 for ; Fri, 09 Feb 2024 12:33:00 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10979"; a="1392549" X-IronPort-AV: E=Sophos;i="6.05,257,1701158400"; d="scan'208";a="1392549" X-Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2024 12:33:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,257,1701158400"; d="scan'208";a="6670657" X-Received: from mdkinney-mobl.amr.corp.intel.com ([10.209.59.192]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2024 12:33:00 -0800 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Michael Kubacki , Sean Brogan Subject: [edk2-devel] [edk2-stable202402][Patch V3 2/7] UnitTestFrameworkPkg: MSFT CC_FLAGS add /MT to for host builds Date: Fri, 9 Feb 2024 12:32:48 -0800 Message-Id: <20240209203253.488-3-michael.d.kinney@intel.com> In-Reply-To: <20240209203253.488-1-michael.d.kinney@intel.com> References: <20240209203253.488-1-michael.d.kinney@intel.com> MIME-Version: 1.0 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,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 0XI1UTD376YXNmo70LNDTL8Ax7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=walDeFhM; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.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 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 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(-) 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/UnitTestPeiServicesTablePointerLib/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 -- 2.40.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115325): https://edk2.groups.io/g/devel/message/115325 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] -=-=-=-=-=-=-=-=-=-=-=-