Re: [Edk2 Dev] No mechanism to replace build option flags?

Subject: Re: [Edk2 Dev] No mechanism to replace build option flags?

From: "Andrew J. Fish" <afish@apple.com>

To: dev@edk2.tianocore.org

Date: 2008-12-02 23:32:11

Mike,

I don't see how removing the flag from tools_def.txt solves the  
problem. It seems like that could break the common usage case?

It looks like the only way around this is to create new rules for a  
new tool type to represent the different usage. Seems like that may  
entail adding a new file type and its associated rules in  
build_rule.txt.

Andrew Fish
afish@apple.com
Work iPhone: 360-259-7562




On Dec 2, 2008, at 3:24 PM, Mike Kinney wrote:

> Cameron,
>
> There is currently no mechanism to replace the flags specified by  
> tools_def.txt.  The EDK II build only appends/
>
> Many compilers support options to disable flags set earlier in the  
> command line or the compilers only pay attention to the last flag  
> specified in a family of flag settings.
>
> One common operation is to reduce the optimization level on a single  
> module in the module INF.  For example, if the default in  
> tools_def.txt is /Ox and you want to reduce to /O1, you have to put  
> both /Od and /O1 in the INF file, because /Od disables optimizations  
> which overrides /Ox, and /O1 override /Od.  Specifying /O1 without / 
> Od does not work.
>
> If the compiler you are using does not allow the specific flag you  
> want to override to be overridden, then you will have to remove that  
> flag from tools_def.txt.
>
> Mike
>
> -----Original Message-----
> From: Cameron Esfahani [mailto:dirty@apple.com]
> Sent: Tuesday, December 02, 2008 3:16 PM
> To: dev@edk2.tianocore.org
> Subject: [Edk2 Dev] No mechanism to replace build option flags?
>
> I can have a [BuildOptions] section in an INF to try and customize the
> build flags for that specific target.
>
> The problem is that the flags supplied in the BuildOptions section are
> only appended to the flags from tools_def.txt.
>
> There is no way to replace them.
>
> I realize that this might not be as common as adding/appending, but in
> my case, that's what I need to do.
>
> Cameron Esfahani
> dirty@apple.com
>
> "You only live once, and the way I live, once is enough"
>
> Frank Sinatra
>
> ------------------------------------------------------
> https://edk2.tianocore.org/ds/viewMessage.do?dsForumId=135&dsMessageId=33122
>
> To unsubscribe from this discussion, please e-mail [unsubscribeURL]
>
> ------------------------------------------------------
> https://edk2.tianocore.org/ds/viewMessage.do?dsForumId=135&dsMessageId=33123
>
> To unsubscribe from this discussion, please e-mail [unsubscribeURL]

------------------------------------------------------
https://edk2.tianocore.org/ds/viewMessage.do?dsForumId=135&dsMessageId=33125

To unsubscribe from this discussion, please e-mail [unsubscribeURL]