On 11/08/17 03:25, Heyi Guo wrote:
> Hi folks,
> 
> From gcc manual, -g option seems to produce debugging information. In
> tools_def.template, -g is included in GCC_ALL_CC_FLAGS, so it will also
> be enabled for RELEASE build with gcc tool chain. Any special reason to
> do that?

In the edk2 tree, -g was added to GCC_ALL_CC_FLAGS and
GCC44_ALL_CC_FLAGS in commit 52302d4dee58 ("Sync EDKII BaseTools to
BaseTools project r1903.", 2010-02-28).

If you check the history of the now-historical separate BaseTools
project <https://github.com/tianocore/buildtools-BaseTools.git>, "-g"
was introduced in commit 46c1e64305d4 ("Upgrade the binutil 2.18.50.0.5
to 2.20.51.0.5 for UNIXGCC tool chain", 2010-02-25).

I guess that the same <Command.GCC> for [Dynamic-Library-File] must be
able to work for both DEBUG/NOOPT and RELEASE builds. So -g is included
for all of those build targets, in the C flags. Ultimately the debug
symbols are not copied into the .efi binaries, for RELEASE, I believe.

Thanks
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to