From 5e07b970940ec1bdbcbec01e733b20532c0b547c Mon Sep 17 00:00:00 2001 From: Oliver Smith-Denny Date: Fri, 14 Jun 2024 14:05:14 -0700 Subject: UnitTestFrameworkPkg: Add StackCheckLib Add StackCheckLib for Target and Host based unit tests. Host based unit tests are treated specially, because MSVC built host based unit tests use the MSVC C runtime lib to provide the stack cookie definitions, but GCC built host based unit tests use our implementation, as we do not link against a C runtime lib that provides the definitions. Signed-off-by: Oliver Smith-Denny --- UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc | 1 + UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'UnitTestFrameworkPkg') diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc index 0747229d05..c56db1819c 100644 --- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc +++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc @@ -23,6 +23,7 @@ UefiBootServicesTableLib|UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.inf PeiServicesTablePointerLib|UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.inf NULL|UnitTestFrameworkPkg/Library/UnitTestDebugAssertLib/UnitTestDebugAssertLibHost.inf + NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNullHostApplication.inf [BuildOptions] MSFT:*_*_*_CC_FLAGS = /MT diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc b/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc index fdec9c6e00..c0c546db53 100644 --- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc +++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc @@ -28,6 +28,7 @@ UnitTestLib|UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.inf UnitTestPersistenceLib|UnitTestFrameworkPkg/Library/UnitTestPersistenceLibNull/UnitTestPersistenceLibNull.inf UnitTestResultReportLib|UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.inf + NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf [LibraryClasses.common.SEC, LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM] NULL|UnitTestFrameworkPkg/Library/UnitTestDebugAssertLib/UnitTestDebugAssertLib.inf @@ -44,13 +45,6 @@ [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION] NULL|UnitTestFrameworkPkg/Library/UnitTestDebugAssertLib/UnitTestDebugAssertLib.inf -[LibraryClasses.ARM, LibraryClasses.AARCH64] - # - # Since software stack checking may be heuristically enabled by the compiler - # include BaseStackCheckLib unconditionally. - # - NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf - [LibraryClasses.common.PEIM] HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf -- cgit v1.2.3