diff options
author | Nate DeSimone <nathaniel.l.desimone@intel.com> | 2025-06-25 15:48:35 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2025-07-09 22:06:53 +0000 |
commit | e2a30df32e523ec19abd980f9665dee4ab620917 (patch) | |
tree | de4bf75b88a5e6aa08bd2bd1bef655e76d548549 /MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptExecute.c | |
parent | 965a754f19e7f9434e598af6e99f012d462a91bc (diff) | |
download | edk2-e2a30df32e523ec19abd980f9665dee4ab620917.zip edk2-e2a30df32e523ec19abd980f9665dee4ab620917.tar.gz edk2-e2a30df32e523ec19abd980f9665dee4ab620917.tar.bz2 |
BaseTools/tools_def: Use MSVC ABI for CLANGPDB Targets
Update the CLANGPDB toolchain configuration to use MSVC ABI targets and
retain frame pointers in generated code. This improves compatibility with
the Microsoft Debug Interface Access (DIA) SDK and improves debuggability
with any debugger that uses the Microsoft PDB parser, for example the Visual
Studio debugger or windbg.
Without these changes, code generated by the Clang compiler will have a mix
of calling conventions. With the current configuration, any function declared
with EFIAPI will use the Microsoft x64 calling convention. However, the default
calling convention will be the SysV x64 calling convention. This mixing of
calling conventions prevents debuggers from decoding the call stack.
With these changes, only the Microsoft x64 calling convention will be used.
These modifications enable debuggers to properly parse and
display call stacks on binaries built with the CLANGPDB toolchain.
The changes include:
- Switch from GNU ABI target (*-unknown-windowsl-gnu) to MSVC ABI targets
(*-pc-windows-msvc) for both IA32 and X64 architectures.
- Remove -fseh-exceptions as not supported.
- Add -fno-omit-frame-pointer as required for call stack.
- Undefine the _MSC_VER macro, and define the __GNUC__ macro, so that
pre-processor conditionals will continue to function as expected.
Co-authored-by: Muhammad Mustafa <muhammad.mustafa@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Diffstat (limited to 'MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptExecute.c')
0 files changed, 0 insertions, 0 deletions