From ecbc394365f50f3c301aa0adeab7e2ce0518b911 Mon Sep 17 00:00:00 2001 From: Rebecca Cran Date: Tue, 9 May 2023 16:33:00 -0600 Subject: [PATCH] BaseTools: Set CLANGDWARF RC path to llvm-objcopy in tools_def.template The llvm-rc tool is for Windows PE resources. Since the CLANGDWARF toolchain creates ELF binaries, update the RC path to be llvm-objcopy. This follows the GCC toolchain which uses objcopy for the RC path. Signed-off-by: Rebecca Cran Reviewed-by: Michael D Kinney Tested-by: Michael D Kinney --- BaseTools/Conf/tools_def.template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 96a413c4ca..b3c822f0bc 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -1874,7 +1874,7 @@ DEFINE CLANGDWARF_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGDWARF_ *_CLANGDWARF_IA32_VFRPP_PATH = DEF(CLANGDWARF_IA32_PREFIX)clang *_CLANGDWARF_IA32_ASLCC_PATH = DEF(CLANGDWARF_IA32_PREFIX)clang *_CLANGDWARF_IA32_ASLPP_PATH = DEF(CLANGDWARF_IA32_PREFIX)clang -*_CLANGDWARF_IA32_RC_PATH = DEF(CLANGDWARF_IA32_PREFIX)llvm-rc +*_CLANGDWARF_IA32_RC_PATH = DEF(CLANGDWARF_IA32_PREFIX)llvm-objcopy *_CLANGDWARF_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto DEF(CLANGDWARF_IA32_TARGET) *_CLANGDWARF_IA32_ASLDLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 -fuse-ld=lld -no-pie @@ -1911,7 +1911,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 - *_CLANGDWARF_X64_VFRPP_PATH = DEF(CLANGDWARF_X64_PREFIX)clang *_CLANGDWARF_X64_ASLCC_PATH = DEF(CLANGDWARF_X64_PREFIX)clang *_CLANGDWARF_X64_ASLPP_PATH = DEF(CLANGDWARF_X64_PREFIX)clang -*_CLANGDWARF_X64_RC_PATH = DEF(CLANGDWARF_X64_PREFIX)llvm-rc +*_CLANGDWARF_X64_RC_PATH = DEF(CLANGDWARF_X64_PREFIX)llvm-objcopy *_CLANGDWARF_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto DEF(CLANGDWARF_X64_TARGET) *_CLANGDWARF_X64_ASLDLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64 -fuse-ld=lld @@ -1960,7 +1960,7 @@ DEFINE CLANGDWARF_ARM_DLINK_FLAGS = DEF(CLANGDWARF_ARM_TARGET) DEF(GCC_ARM_DLI *_CLANGDWARF_ARM_ASLDLINK_PATH = ENV(CLANGDWARF_BIN)clang *_CLANGDWARF_ARM_SLINK_PATH = ENV(CLANGDWARF_BIN)llvm-ar -*_CLANGDWARF_ARM_RC_PATH = ENV(CLANGDWARF_ARM_PREFIX)objcopy +*_CLANGDWARF_ARM_RC_PATH = ENV(CLANGDWARF_ARM_PREFIX)llvm-objcopy *_CLANGDWARF_ARM_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -fno-lto *_CLANGDWARF_ARM_ASLDLINK_FLAGS = DEF(CLANGDWARF_ARM_TARGET) DEF(GCC_ARM_ASLDLINK_FLAGS) @@ -2005,7 +2005,7 @@ DEFINE CLANGDWARF_AARCH64_DLINK_FLAGS = DEF(CLANGDWARF_AARCH64_TARGET) DEF(GCC_ *_CLANGDWARF_AARCH64_ASLDLINK_PATH = ENV(CLANGDWARF_BIN)clang *_CLANGDWARF_AARCH64_SLINK_PATH = ENV(CLANGDWARF_BIN)llvm-ar -*_CLANGDWARF_AARCH64_RC_PATH = ENV(CLANGDWARF_AARCH64_PREFIX)objcopy +*_CLANGDWARF_AARCH64_RC_PATH = ENV(CLANGDWARF_BIN)llvm-objcopy *_CLANGDWARF_AARCH64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -fno-lto *_CLANGDWARF_AARCH64_ASLDLINK_FLAGS = DEF(CLANGDWARF_AARCH64_TARGET) DEF(GCC_AARCH64_ASLDLINK_FLAGS)