]> xenbits.xensource.com Git - people/aperard/ovmf.git/commitdiff
UnitTestFrameworkPkg: Add StackCheckLib
authorOliver Smith-Denny <osde@microsoft.com>
Fri, 14 Jun 2024 21:05:14 +0000 (14:05 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 13 Sep 2024 03:58:46 +0000 (03:58 +0000)
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 <osde@linux.microsoft.com>
UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc

index 0747229d0597c252d023fc31def4a956ea7ae07e..c56db1819c40d8f2e4daca9ad633b6af3ae1292c 100644 (file)
@@ -23,6 +23,7 @@
   UefiBootServicesTableLib|UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.inf\r
   PeiServicesTablePointerLib|UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.inf\r
   NULL|UnitTestFrameworkPkg/Library/UnitTestDebugAssertLib/UnitTestDebugAssertLibHost.inf\r
+  NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNullHostApplication.inf\r
 \r
 [BuildOptions]\r
   MSFT:*_*_*_CC_FLAGS = /MT\r
index fdec9c6e002650200e9d7f7bceb684625760f872..c0c546db53715c7a5ebcc921555fddcf17805341 100644 (file)
@@ -28,6 +28,7 @@
   UnitTestLib|UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.inf\r
   UnitTestPersistenceLib|UnitTestFrameworkPkg/Library/UnitTestPersistenceLibNull/UnitTestPersistenceLibNull.inf\r
   UnitTestResultReportLib|UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.inf\r
+  NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf\r
 \r
 [LibraryClasses.common.SEC, LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM]\r
   NULL|UnitTestFrameworkPkg/Library/UnitTestDebugAssertLib/UnitTestDebugAssertLib.inf\r
 [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION]\r
   NULL|UnitTestFrameworkPkg/Library/UnitTestDebugAssertLib/UnitTestDebugAssertLib.inf\r
 \r
-[LibraryClasses.ARM, LibraryClasses.AARCH64]\r
-  #\r
-  # Since software stack checking may be heuristically enabled by the compiler\r
-  # include BaseStackCheckLib unconditionally.\r
-  #\r
-  NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf\r
-\r
 [LibraryClasses.common.PEIM]\r
   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf\r
   MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf\r