Skip to content

Commit

Permalink
Add BaseBinSecurityLibRng support to FatPkg, ShellPkg, and SourceLeve…
Browse files Browse the repository at this point in the history
…lDebugPkg
  • Loading branch information
Matthew Carlson authored and kenlautner committed Dec 18, 2023
1 parent c6e7963 commit 363ff16
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
16 changes: 16 additions & 0 deletions FatPkg/FatPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#
BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf

UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
Expand All @@ -49,6 +50,21 @@
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf

## MU_CHANGE Begin
[LibraryClasses.common]
BaseBinSecurityLib|MdePkg/Library/BaseBinSecurityLibNull/BaseBinSecurityLibNull.inf
!if $(TOOL_CHAIN_TAG) == VS2017 or $(TOOL_CHAIN_TAG) == VS2015 or $(TOOL_CHAIN_TAG) == VS2019
!if $(TARGET) == DEBUG
[LibraryClasses.X64, LibraryClasses.IA32]
#if debug is enabled provide StackCookie support lib so that we can link to /GS exports on MSVC
RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
[LibraryClasses.X64]
BaseBinSecurityLib|MdePkg/Library/BaseBinSecurityLibRng/BaseBinSecurityLibRng.inf
NULL|MdePkg/Library/BaseBinSecurityLibRng/BaseBinSecurityLibRng.inf
!endif
!endif
## MU_CHANGE End

[LibraryClasses.common.PEIM]
PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
Expand Down
15 changes: 15 additions & 0 deletions FmpDevicePkg/FmpDevicePkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@
FmpDependencyDeviceLib|FmpDevicePkg/Library/FmpDependencyDeviceLibNull/FmpDependencyDeviceLibNull.inf
TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf

## MU_CHANGE Begin
[LibraryClasses.common]
BaseBinSecurityLib|MdePkg/Library/BaseBinSecurityLibNull/BaseBinSecurityLibNull.inf
!if $(TOOL_CHAIN_TAG) == VS2017 or $(TOOL_CHAIN_TAG) == VS2015 or $(TOOL_CHAIN_TAG) == VS2019
!if $(TARGET) == DEBUG
[LibraryClasses.X64, LibraryClasses.IA32]
#if debug is enabled provide StackCookie support lib so that we can link to /GS exports on MSVC
RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
[LibraryClasses.X64]
BaseBinSecurityLib|MdePkg/Library/BaseBinSecurityLibRng/BaseBinSecurityLibRng.inf
NULL|MdePkg/Library/BaseBinSecurityLibRng/BaseBinSecurityLibRng.inf
!endif
!endif
## MU_CHANGE End

[LibraryClasses.ARM, LibraryClasses.AARCH64]
#
# It is not possible to prevent the ARM compiler for generic intrinsic functions.
Expand Down
10 changes: 10 additions & 0 deletions SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@
!endif
!endif

##MSCHANGE Begin
!if $(TARGET) == DEBUG
!if $(TOOL_CHAIN_TAG) == VS2017 or $(TOOL_CHAIN_TAG) == VS2015 or $(TOOL_CHAIN_TAG) == VS2019
#if debug is enabled provide StackCookie support lib so that we can link to /GS exports
RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
NULL|MdePkg/Library/BaseBinSecurityLibRng/BaseBinSecurityLibRng.inf
!endif
!endif
##MSCHANGE End

[LibraryClasses.common.PEIM]
PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
Expand Down

0 comments on commit 363ff16

Please sign in to comment.