summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith-Denny <osde@microsoft.com>2024-06-14 14:05:14 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-09-13 03:58:46 +0000
commit5e07b970940ec1bdbcbec01e733b20532c0b547c (patch)
treeecea9815024eaed8be37169d46c2de394f9cd4c3
parent17744fc9ce655e3ffcbaa358c039c38831f385f2 (diff)
downloadedk2-5e07b970940ec1bdbcbec01e733b20532c0b547c.tar.gz
edk2-5e07b970940ec1bdbcbec01e733b20532c0b547c.tar.bz2
edk2-5e07b970940ec1bdbcbec01e733b20532c0b547c.zip
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 <osde@linux.microsoft.com>
-rw-r--r--UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc1
-rw-r--r--UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc8
2 files changed, 2 insertions, 7 deletions
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