mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
CLANGPDB does not support the same asm syntax as GCC/CLANGDWARF. As a result, the autogenerated ASM files in CryptoPkg need a new flavor for CLANGPDB, which is supported by OpenSSL. This adds support to the autogeneration script to support the new flavor, as well as running the script and checking in the generated asm files. To reflect the intention better than toolchain name (as AARCH64-GCC is already out of date), the directories are renamed to AARCH64-ELF (the former AARCH64-GCC) and AARCH64-PE (what CLANGPDB uses). In order to support this, a new PCD is introduced in CryptoPkg, gEfiCryptoPkgTokenSpaceGuid.PcdOpensslLibAssemblySourceStylePe which instructs the build system to include the PE target asm files or the ELF target asm files. GCC and CLANGDWARF will use the ELF target files and CLANGPDB uses the PE target files. This matches the X64 behavior to toggle between the asm files. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
34 lines
1.3 KiB
PHP
34 lines
1.3 KiB
PHP
## @file
|
|
# Cryptographic Library Package for UEFI Security Implementation.
|
|
# DSC include file with Feature Flag PCD settings.
|
|
#
|
|
# Copyright (c) 2025, Intel Corporation. All rights reserved.<BR>
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
##
|
|
|
|
[PcdsFeatureFlag.IA32, PcdsFeatureFlag.X64]
|
|
#
|
|
# Use Openssl NASM assembly source files that assume Windows calling convention
|
|
# if the family is MSFT or the toolchain is CLANGPDB for Windows or Linux.
|
|
# Also use Openssl NASM assembly source files that assume Windows calling
|
|
# convention if host-based unit tests are being build for Windows.
|
|
# Otherwise, the Openssl .S assembly source files that assume the Linux calling
|
|
# convention.
|
|
#
|
|
!if "$(FAMILY)" == "MSFT" || "$(TOOL_CHAIN_TAG)" == "CLANGPDB"
|
|
gEfiCryptoPkgTokenSpaceGuid.PcdOpensslLibAssemblySourceStyleNasm|TRUE
|
|
!endif
|
|
!if $(HOST_BASED_UNIT_TESTING_ENABLED) AND $(WIN_HOST_BUILD)
|
|
gEfiCryptoPkgTokenSpaceGuid.PcdOpensslLibAssemblySourceStyleNasm|TRUE
|
|
!endif
|
|
|
|
[PcdsFeatureFlag.AARCH64]
|
|
#
|
|
# Use the PE target assembly source files when building with the CLANGPDB
|
|
# toolchain.
|
|
# GCC and CLANGDWARF use the default PCD value of ELF target assembly source files.
|
|
#
|
|
!if "$(TOOL_CHAIN_TAG)" == "CLANGPDB"
|
|
gEfiCryptoPkgTokenSpaceGuid.PcdOpensslLibAssemblySourceStylePe|TRUE
|
|
!endif
|