d4bc537 BaseTools: Use SEH exceptions in CLANGPDB for IA32

1 file Authored by Vitaly Cheptsov 2 months ago , Committed by mergify[bot] 2 months ago ,
    BaseTools: Use SEH exceptions in CLANGPDB for IA32
    
    REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2628
    
    This patch reduces the size of IA32 binaries by ensuring that
    no .debug_frame / .eh_frame sections are generated through forcing
    SEH exception model, which is already the default in clang for X64.
    
    EDK II does not support exceptions, and in future we should disable
    them instead of switching to some other variant. Currently this
    is not possible due to the following LLVM bugs:
    
    https://bugs.llvm.org/show_bug.cgi?id=45324
    https://bugs.llvm.org/show_bug.cgi?id=45325
    
    Upon applying this patch OvmfPkgIA32.dsc compilation in DEBUG mode
    gets the following size decrease with clang 9.0.1.
    
    Before: FV Space Information
    SECFV [11%Full] 212992 total, 24512 used, 188480 free
    PEIFV [22%Full] 917504 total, 203048 used, 714456 free
    DXEFV [36%Full] 11534336 total, 4215672 used, 7318664 free
    FVMAIN_COMPACT [37%Full] 3440640 total, 1287776 used, 2152864 free
    
    After: FV Space Information
    SECFV [10%Full] 212992 total, 22112 used, 190880 free
    PEIFV [19%Full] 917504 total, 176392 used, 741112 free
    DXEFV [31%Full] 11534336 total, 3657112 used, 7877224 free
    FVMAIN_COMPACT [33%Full] 3440640 total, 1153896 used, 2286744 free
    
    Cc: Liming Gao <liming.gao@intel.com>
    Cc: Marvin H?user <mhaeuser@outlook.de>
    Cc: Zhiguang Liu <zhiguang.liu@intel.com>
    Reviewed-by: Liming Gao <liming.gao@intel.com>
    Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com>
    Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>