Tim,

I was thinking maybe you could pre-process the .uni file, but I'm not sure that 
is possible given what the build_rule.template looks like. I'm not sure if no 
<Command> means hard coded in Python? So maybe you need to hack the Python? 

https://svn.code.sf.net/p/edk2/code/trunk/edk2/BaseTools/Conf/build_rule.template

[Unicode-Text-File]
    <InputFile>
        *.uni, *.Uni, *.UNI

    <OutputFile>
        $(DEBUG_DIR)(+)AutoGen.c
        $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
        $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk

    <Command>

[Efi-Image.UEFI_OPTIONROM]
    <InputFile>
        ?.efi, ?.EFI, ?.Efi

    <OutputFile>
        $(BIN_DIR)(+)$(MODULE_NAME).rom

    <Command>
        $(OPTROM) -i $(PCI_DEVICE_ID) -f $(PCI_VENDOR_ID) -l $(PCI_CLASS_CODE) 
-r $(PCI_REVISION) -o $dst $(OPTROM_FLAGS) $src

[Unicode-Text-File.UEFI_HII]
    <InputFile>
        *.uni, *.Uni, *.UNI

    <OutputFile>
        $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
        $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h

    <Command>

Andrew Fish



On Aug 21, 2013, at 10:07 AM, Tim Lewis <tim.le...@insyde.com> wrote:

> Anyone have advice on removing string references/text from a build based on 
> build switches?
>  
> 1.       As far as I can tell, conditionals are not allowed in .uni files.
> 2.       As far as I can tell, conditionals are ignored when StrGather.py 
> looks for STRING_TOKEN (STRING_TOKEN in // or #if 0 are still recognized)
> 3.       FeatureFlag PCDs can’t control source files in an INF, so you can’t 
> exclude the .uni from the build.
>  
> So, even though strings are never used, they are always included. Yes, I 
> realize that there are cases need to force the strings into the build by 
> placing references in comments (a better way must be available surely, 
> perhaps in the .uni file itself)
>  
> The best I’ve been able to come up with is to create two separate INF files: 
> one with the .uni files and one without.
>  
> Thoughts?
>  
> Tim
>  
> ------------------------------------------------------------------------------
> Introducing Performance Central, a new site from SourceForge and 
> AppDynamics. Performance Central is your source for news, insights, 
> analysis and resources for efficient Application Performance Management. 
> Visit us today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk_______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to