2020-01-22 19:12:56 +01:00
|
|
|
## @file
|
|
|
|
# UnitTestFrameworkPkg DSC include file for host based test DSC
|
|
|
|
#
|
|
|
|
# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.<BR>
|
|
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
#
|
|
|
|
##
|
|
|
|
|
|
|
|
!include UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc
|
|
|
|
|
|
|
|
[LibraryClasses.common.HOST_APPLICATION]
|
2020-06-05 20:22:30 +02:00
|
|
|
BaseLib|MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf
|
|
|
|
UnitTestHostBaseLib|MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf
|
|
|
|
CpuLib|MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.inf
|
|
|
|
CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLibNull/BaseCacheMaintenanceLibNull.inf
|
2020-01-22 19:12:56 +01:00
|
|
|
CmockaLib|UnitTestFrameworkPkg/Library/CmockaLib/CmockaLib.inf
|
2022-06-21 04:52:03 +02:00
|
|
|
GoogleTestLib|UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf
|
2020-01-22 19:12:56 +01:00
|
|
|
UnitTestLib|UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLibCmocka.inf
|
|
|
|
DebugLib|UnitTestFrameworkPkg/Library/Posix/DebugLibPosix/DebugLibPosix.inf
|
|
|
|
MemoryAllocationLib|UnitTestFrameworkPkg/Library/Posix/MemoryAllocationLibPosix/MemoryAllocationLibPosix.inf
|
2022-11-04 01:07:49 +01:00
|
|
|
UefiBootServicesTableLib|UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.inf
|
2020-01-22 19:12:56 +01:00
|
|
|
|
|
|
|
[BuildOptions]
|
|
|
|
GCC:*_*_*_CC_FLAGS = -fno-pie
|
2020-05-28 04:49:33 +02:00
|
|
|
!ifdef $(UNIT_TESTING_DEBUG)
|
|
|
|
MSFT:*_*_*_CC_FLAGS = -D UNIT_TESTING_DEBUG=1
|
|
|
|
GCC:*_*_*_CC_FLAGS = -D UNIT_TESTING_DEBUG=1
|
|
|
|
XCODE:*_*_*_CC_FLAGS = -D UNIT_TESTING_DEBUG=1
|
|
|
|
!endif
|
2022-09-27 06:24:18 +02:00
|
|
|
GCC:*_GCC5_*_CC_FLAGS = --coverage
|
|
|
|
GCC:*_GCC5_*_DLINK_FLAGS = --coverage
|
2020-01-22 19:12:56 +01:00
|
|
|
[BuildOptions.common.EDKII.HOST_APPLICATION]
|
|
|
|
#
|
|
|
|
# MSFT
|
|
|
|
#
|
2022-06-21 04:52:03 +02:00
|
|
|
MSFT:*_*_*_CC_FLAGS = /EHsc
|
2022-10-28 17:41:34 +02:00
|
|
|
MSFT:*_*_*_DLINK_FLAGS == /out:"$(BIN_DIR)\$(MODULE_NAME_GUID).exe" /pdb:"$(BIN_DIR)\$(MODULE_NAME_GUID).pdb" /IGNORE:4001 /NOLOGO /SUBSYSTEM:CONSOLE /DEBUG /STACK:0x40000,0x40000 /NODEFAULTLIB:libcmt.lib libcmtd.lib
|
2020-01-22 19:12:56 +01:00
|
|
|
MSFT:*_*_IA32_DLINK_FLAGS = /MACHINE:I386
|
|
|
|
MSFT:*_*_X64_DLINK_FLAGS = /MACHINE:AMD64
|
|
|
|
|
|
|
|
MSFT:*_VS2015_IA32_DLINK_FLAGS = /LIBPATH:"%VS2015_PREFIX%Lib" /LIBPATH:"%VS2015_PREFIX%VC\Lib" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x86" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x86"
|
|
|
|
MSFT:*_VS2015x86_IA32_DLINK_FLAGS = /LIBPATH:"%VS2015_PREFIX%Lib" /LIBPATH:"%VS2015_PREFIX%VC\Lib" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x86" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x86"
|
|
|
|
MSFT:*_VS2017_IA32_DLINK_FLAGS = /LIBPATH:"%VCToolsInstallDir%lib\x86" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x86" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x86"
|
|
|
|
MSFT:*_VS2019_IA32_DLINK_FLAGS = /LIBPATH:"%VCToolsInstallDir%lib\x86" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x86" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x86"
|
|
|
|
|
|
|
|
MSFT:*_VS2015_X64_DLINK_FLAGS = /LIBPATH:"%VS2015_PREFIX%VC\Lib\AMD64" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x64" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x64"
|
|
|
|
MSFT:*_VS2015x86_X64_DLINK_FLAGS = /LIBPATH:"%VS2015_PREFIX%VC\Lib\AMD64" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x64" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x64"
|
|
|
|
MSFT:*_VS2017_X64_DLINK_FLAGS = /LIBPATH:"%VCToolsInstallDir%lib\x64" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x64" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x64"
|
|
|
|
MSFT:*_VS2019_X64_DLINK_FLAGS = /LIBPATH:"%VCToolsInstallDir%lib\x64" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x64" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x64"
|
|
|
|
|
|
|
|
#
|
|
|
|
# GCC
|
|
|
|
#
|
2022-10-28 17:41:34 +02:00
|
|
|
GCC:*_*_IA32_DLINK_FLAGS == -o $(BIN_DIR)/$(MODULE_NAME_GUID) -m32 -no-pie
|
|
|
|
GCC:*_*_X64_DLINK_FLAGS == -o $(BIN_DIR)/$(MODULE_NAME_GUID) -m64 -no-pie
|
2022-06-21 04:52:03 +02:00
|
|
|
GCC:*_*_*_DLINK2_FLAGS == -lgcov -lpthread -lstdc++ -lm
|
2020-01-22 19:12:56 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# Need to do this link via gcc and not ld as the pathing to libraries changes from OS version to OS version
|
|
|
|
#
|
|
|
|
XCODE:*_*_IA32_DLINK_PATH == gcc
|
|
|
|
XCODE:*_*_IA32_CC_FLAGS = -I$(WORKSPACE)/EmulatorPkg/Unix/Host/X11IncludeHack
|
2022-10-28 17:41:34 +02:00
|
|
|
XCODE:*_*_IA32_DLINK_FLAGS == -arch i386 -o $(BIN_DIR)/$(MODULE_NAME_GUID) -L/usr/X11R6/lib -lXext -lX11 -framework Carbon
|
2020-01-22 19:12:56 +01:00
|
|
|
XCODE:*_*_IA32_ASM_FLAGS == -arch i386 -g
|
|
|
|
|
|
|
|
XCODE:*_*_X64_DLINK_PATH == gcc
|
2022-10-28 17:41:34 +02:00
|
|
|
XCODE:*_*_X64_DLINK_FLAGS == -o $(BIN_DIR)/$(MODULE_NAME_GUID) -L/usr/X11R6/lib -lXext -lX11 -framework Carbon -Wl,-no_pie
|
2020-01-22 19:12:56 +01:00
|
|
|
XCODE:*_*_X64_ASM_FLAGS == -g
|
|
|
|
XCODE:*_*_X64_CC_FLAGS = -O0 -target x86_64-apple-darwin -I$(WORKSPACE)/EmulatorPkg/Unix/Host/X11IncludeHack "-DEFIAPI=__attribute__((ms_abi))"
|