mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-07 22:04:27 +02:00
* Update host based unit test VS20xx builds to use /MTd instead of /MT to enable use of debug libraries for host based unit tests. * Enable /fsanitize=address for host based unit test VS2019 builds * Enable /fsanitize=address for host based unit test VS2022 builds * Enable -fsanitize=address for host based unit test GCC builds * Add UNIT_TESTING_ADDRESS_SANITIZER_ENABLE define that is set to TRUE by default so it is always enabled, but can be set to FALSE to temporarily disable during development/debug of unit tests. * Add address sanitizer information to ReadMe.md Enabling the Address Sanitizer can detect double frees, buffer overflow, buffer underflow, access to invalid addresses, and various exceptions. These can be detected in both the unit test case sources as well as the code under test. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
37 lines
1.1 KiB
INI
37 lines
1.1 KiB
INI
## @file
|
|
# Unit Test Debug Assert Library for host-based environments
|
|
#
|
|
# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010005
|
|
BASE_NAME = UnitTestDebugAssertLibHost
|
|
MODULE_UNI_FILE = UnitTestDebugAssertLibHost.uni
|
|
FILE_GUID = F097D67C-0340-49C8-AB30-ABC1B7D1C8D2
|
|
MODULE_TYPE = HOST_APPLICATION
|
|
VERSION_STRING = 1.0
|
|
LIBRARY_CLASS = NULL
|
|
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64
|
|
#
|
|
|
|
[Sources]
|
|
UnitTestDebugAssertLibHost.cpp
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
|
|
|
|
[LibraryClasses]
|
|
BaseLib
|
|
UnitTestLib
|
|
|
|
[BuildOptions]
|
|
MSFT:*_*_*_CC_FLAGS == /c /EHs /Zi /Od /MTd
|
|
GCC:*_*_IA32_CC_FLAGS == -g -c -fshort-wchar -fexceptions -O0 -m32 -malign-double -fno-pie
|
|
GCC:*_*_X64_CC_FLAGS == -g -c -fshort-wchar -fexceptions -O0 -m64 -fno-pie "-DEFIAPI=__attribute__((ms_abi))"
|