Branch: refs/heads/UnitTestFrameworkPkg_Add_Clang_Support
Home: https://github.com/tianocore/edk2
Commit: 97623fd244b074b2d43cacdf10b1fc363a806e4e
https://github.com/tianocore/edk2/commit/97623fd244b074b2d43cacdf10b1fc363a806e4e
Author: Michael D Kinney <[email protected]>
Date: 2025-09-23 (Tue, 23 Sep 2025)
Changed paths:
M UnitTestFrameworkPkg/UnitTestFrameworkPkgCommon.dsc.inc
Log Message:
-----------
UnitTestFrameworkPkg: Set defines for CLANGPDB builds
Set same defines for CLANGPDB tool chain family as all
tool chain other families.
Signed-off-by: Michael D Kinney <[email protected]>
Commit: 0c267232f30b9c502f1a56c9f8f11fd884d9839b
https://github.com/tianocore/edk2/commit/0c267232f30b9c502f1a56c9f8f11fd884d9839b
Author: Michael D Kinney <[email protected]>
Date: 2025-09-23 (Tue, 23 Sep 2025)
Changed paths:
M UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
Log Message:
-----------
UnitTestFrameworkPkg: Add CLANGDWARF and CLANGPDB support
Update host-based unit test [BuildOptions] to support
CLANGDWARF and CLANGPDB.
* Use CLANG specific code coverage options
* Map CLANG trap function to abort() to resolve link issues
when building Google Test based unit tests. The default
mapping from tools_def.txt is to an unresolved function
to generate a build failure. Mapping to abort() overrides
the default mapping. If a unit test introduces undefined
behavior in a code path that is executed, then abort() is
called and the unit test application exits with an error
and fails the unit test.
* Update GCC to pass --coverage in link command so the
linker automatically includes -lgcov. The explicit
linking of -lgcov is removed.
* Add /EHs to all MSFT components instead of only components
of type HOST_APPLICATION.
* Add CXX_FLAGS for all tool chain families. Use c++ 20 for
MSFT and GCC and c++ 17 for clang. Clang generates errors
compiling Google Test with c++ 20.
* Add -z noexecstack to all GCC builds to reduce warnings.
* Add UNIT_TESTING_CODE_COVERAGE_ENABLE that is enabled by
default. Can be used to temporarily disable code coverage
when debugging interactions between unit testing features.
Signed-off-by: Michael D Kinney <[email protected]>
Commit: 0825a7a4200bf597f3130d9a79f0128f4af6093b
https://github.com/tianocore/edk2/commit/0825a7a4200bf597f3130d9a79f0128f4af6093b
Author: Michael D Kinney <[email protected]>
Date: 2025-09-23 (Tue, 23 Sep 2025)
Changed paths:
M UnitTestFrameworkPkg/Include/Library/GoogleTestLib.h
Log Message:
-----------
UnitTestFrameworkPkg/Include: Update GoogleTestLib for CLANG
Update GoogleTestLib.h to support Windows/CLANGPDB build.
When using Windows/CLANGPDB, _MSC_VER is not defined. If
it is not defined, then set to 1900 for Visual Studio 2015
or newer compatibility when using windows include files for
host based unit test application builds. If _MSC_VER is not
set, then those application fail to build.
Also address a Windows/CLANG issue when ASAN is enabled
by providing an alternate implementation of the
EXPECT_THROW_MESSAGE() and ASSERT_THROW_MESSAGE() macros.
Without this alternate implementation, an exception is
generated due to the description of the ASSERT() condition
being NULL.
Update all implementations of EXPECT_THROW_MESSAGE() and
ASSERT_THROW_MESSAGE() to support parameters to the
statement executed to return values.
Signed-off-by: Michael D Kinney <[email protected]>
Commit: 2ab05960df753861133242239bc1b3a930fb4c32
https://github.com/tianocore/edk2/commit/2ab05960df753861133242239bc1b3a930fb4c32
Author: Michael D Kinney <[email protected]>
Date: 2025-09-24 (Wed, 24 Sep 2025)
Changed paths:
M UnitTestFrameworkPkg/Library/CmockaLib/CmockaLib.inf
Log Message:
-----------
UnitTestFrameworkPkg/CmockaLib: Add CLANGPDB support
Add CLANGPDB family defines to match MSFT family defines.
Also add -Wno-deprecated-declarations to CLANGPDB family
to ignore warnings detected when building cmocka sources
with clang compiler.
Signed-off-by: Michael D Kinney <[email protected]>
Commit: 087397bc3278d3cdcdbb8d593139362d79fe78fa
https://github.com/tianocore/edk2/commit/087397bc3278d3cdcdbb8d593139362d79fe78fa
Author: Michael D Kinney <[email protected]>
Date: 2025-09-24 (Wed, 24 Sep 2025)
Changed paths:
M UnitTestFrameworkPkg/Library/SubhookLib/SubhookLib.inf
Log Message:
-----------
UnitTestFrameworkPkg/SubhookLib: Update GCC defines
Add -DSUBHOOK_STATIC to all GCC family builds to match
defines in MSFT family builds.
Also remove /EHsc from MSFT CC_FLAGS. /EHs is added to
CC_FLAGS in UnitTestFrameworkPkgHost.dsc.inc for all
components.
Signed-off-by: Michael D Kinney <[email protected]>
Commit: 75421ad08cc821d49476a35729e27855b1b658eb
https://github.com/tianocore/edk2/commit/75421ad08cc821d49476a35729e27855b1b658eb
Author: Michael D Kinney <[email protected]>
Date: 2025-09-24 (Wed, 24 Sep 2025)
Changed paths:
M UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf
Log Message:
-----------
UnitTestFrameworkPkg/GoogleTestLib: Remove extra options
Update MSFT CC_FLAGS options to remove /EHs and /MTd that
are added by UnitTestFrameworkPkgHost.dsc.inc for all
components.
Signed-off-by: Michael D Kinney <[email protected]>
Commit: cb146e5a29ed97b5feaf9adaf9810c19aef5a779
https://github.com/tianocore/edk2/commit/cb146e5a29ed97b5feaf9adaf9810c19aef5a779
Author: Michael D Kinney <[email protected]>
Date: 2025-09-24 (Wed, 24 Sep 2025)
Changed paths:
M
UnitTestFrameworkPkg/Library/UnitTestDebugAssertLib/UnitTestDebugAssertLibHost.inf
Log Message:
-----------
UnitTestFrameworkPkg/UnitTestDebugAddressLib: Remove extra options
Remove /EHsc from CC_FLAGS. /EHs is added to CC_FLAGS in
UnitTestFrameworkPkgHost.dsc.inc for all components.
Signed-off-by: Michael D Kinney <[email protected]>
Commit: 4f41711a791e89f7b9936d31683d8ba42baeaef8
https://github.com/tianocore/edk2/commit/4f41711a791e89f7b9936d31683d8ba42baeaef8
Author: Michael D Kinney <[email protected]>
Date: 2025-09-24 (Wed, 24 Sep 2025)
Changed paths:
M BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py
Log Message:
-----------
BaseTools/Plugin/HostBasedUnitTestRunner: Add CLANG support
Update HostBasedUnitTestRunner to generate merged Cobertura
coverage.xml output file using CLANG code coverage data
from -fprofile-instr-generate -fcoverage-mapping options.
Signed-off-by: Michael D Kinney <[email protected]>
Compare:
https://github.com/tianocore/edk2/compare/97623fd244b0%5E...4f41711a791e
To unsubscribe from these emails, change your notification settings at
https://github.com/tianocore/edk2/settings/notifications
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits