Pedro, There is an assumption that you have Link Time Optimization (LTO) turned on to dead strip. There are 3 PCD flags that let you control what ends up in the ROM. Assuming LTO you should be able to use PcdFixedDebugPrintErrorLevel to strip sets of strings out of the file. You can also turn all DEBUG prints off via PcdDebugPropertyMask. https://github.com/tianocore/edk2/blob/master/MdePkg/MdePkg.dec ## This flag is used to control build time optimization based on debug print level. # Its default value is 0xFFFFFFFF to expose all debug print level. # BIT0 - Initialization message.
# BIT1 - Warning message.
# BIT2 - Load Event message.
# BIT3 - File System message.
# BIT4 - Allocate or Free Pool message.
# BIT5 - Allocate or Free Page message.
# BIT6 - Information message.
# BIT7 - Dispatcher message.
# BIT8 - Variable message.
# BIT10 - Boot Manager message.
# BIT12 - BlockIo Driver message.
# BIT14 - Network Driver message.
# BIT16 - UNDI Driver message.
# BIT17 - LoadFile message.
# BIT19 - Event message.
# BIT20 - Global Coherency Database changes message.
# BIT21 - Memory range cachability changes message.
# BIT22 - Detailed debug message.
# BIT31 - Error message.
# @Prompt Fixed Debug Message Print Level. gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel|0xFFFFFFFF|UINT32|0x30001016 ## The mask is used to control DebugLib behavior.

# BIT0 - Enable Debug Assert.
# BIT1 - Enable Debug Print.
# BIT2 - Enable Debug Code.
# BIT3 - Enable Clear Memory.
# BIT4 - Enable BreakPoint as ASSERT.
# BIT5 - Enable DeadLoop as ASSERT.
# @Prompt Debug Property. # @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask & 0xC0) == 0 gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0|UINT8|0x00000005 ## This flag is used to control the print out Debug message.

# BIT0 - Initialization message.
# BIT1 - Warning message.
# BIT2 - Load Event message.
# BIT3 - File System message.
# BIT4 - Allocate or Free Pool message.
# BIT5 - Allocate or Free Page message.
# BIT6 - Information message.
# BIT7 - Dispatcher message.
# BIT8 - Variable message.
# BIT10 - Boot Manager message.
# BIT12 - BlockIo Driver message.
# BIT14 - Network Driver message.
# BIT16 - UNDI Driver message.
# BIT17 - LoadFile message.
# BIT19 - Event message.
# BIT20 - Global Coherency Database changes message.
# BIT21 - Memory range cachability changes message.
# BIT22 - Detailed debug message.
# BIT31 - Error message.
# @Prompt Debug Message Print Level. # @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel & 0x7F84AA00) == 0 gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000000|UINT32|0x00000006 Thanks, Andrew Fish > On Apr 16, 2019, at 8:46 AM, Pedro Barbosa wrote: > > Hi EDK2 developers, > > I'm trying to build OVMF without debug symbols but even building as RELEASE, I still can see some strings on the PE files, such as: > /Build/OvmfX64/RELEASE_GCC5/X64/MdeModulePkg/Application/UiApp/UiApp/DEBUG/UiApp.dll > and many others in the format */DEBUG/*.dll > > Is there a way to build without these strings? > > Thanks! > > -- > []s > > Pedro YĆ³ssis Silva Barbosa > Security Engineer, Google > PhD in Computer Science, UFCG, Brazil > sites.google.com/site/pedroysb >