Andrew,

A minor correction on DEBUG and RELEASE.

DEBUG - Size optimized with symbolic debug information included.  

There are some platforms DSC files that overload the build target DEBUG to also 
enable the libraries and PCD settings to generate log messages.  Some other 
platforms use a define name (e.g. LOGGING) to enable/disable log messages.

RELEASE - Size optimized with symbolic debug information stripped.

Best regards,

Mike

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Andrew 
> Fish
> Sent: Friday, November 20, 2015 3:01 PM
> To: Shubha Ramani <shubharam...@yahoo.com>
> Cc: edk2-devel@lists.01.org
> Subject: Re: [edk2] How to add /O1 (min size) compile option to edk2 apps ?
> 
> 
> > On Nov 20, 2015, at 2:42 PM, Shubha Ramani <shubharam...@yahoo.com> wrote:
> >
> > Forgot to mention....under[BuildOptions] in the *.inf file  Shubha D.
> > ramanishubharam...@gmail.com shubharam...@yahoo.com
> >
> >
> >    On Friday, November 20, 2015 2:41 PM, Shubha Ramani 
> > <shubharam...@yahoo.com> wrote:
> >
> >
> > For instance, if I already have this:MSFT:NOOPT_*_*_CC_FLAGS   = /D 
> > ENABLE_PRINT
> >
> 
> *_*_*_CC_FLAGS are the compiler flags so you add them. For most compilers the 
> last flag wins.
> 
> But you should not need to add anything as the there are already three sets 
> of flags.
> NOOPT       - Optimizations disabled for debugging.
> DEBUG       - Size optimized, but with DEBUG prints
> RELEASE   - Size optimized.
> 
> So all you need to do is change the -b, --buildtarget=BUILDTARGET, flag to 
> the build command to change which of the build targets are
> being used.
> So: build -b RELEASE
> 
> The optimization flags for VC++ are more complex than /O1, as it is uses a 
> very specific /O1 variant and also uses other flags to turn on
> link time optimization.
> 
> Thanks,
> 
> Andrew Fish
> 
> > How do I also add /O1 (that's capitol letter "O" 1).
> > Thanks,
> > Shubha Shubha D. ramanishubharam...@gmail.com shubharam...@yahoo.com
> >
> >
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to