[BOLT][NFC] Reduce Target/{AArch64,X86} dependencies

We don't actually depend on entire X86/AArch64 components that pull in CodeGen,
SelectionDAG etc., just the Desc part with opcode and other definitions.

Note that it doesn't decouple BOLT from these components - we still pull in X86
and AArch64 from top-level llvm-bolt dependencies as we use assembler and
disassembler. It's difficult to reduce these as this requires non-trivial
changes to X86/AArch64 components themselves (e.g. moving out AsmPrinter).

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D124206
This commit is contained in:
Amir Ayupov 2022-04-29 20:37:32 -07:00 committed by Amir Ayupov
parent 41b951c929
commit 64421e191b
2 changed files with 10 additions and 8 deletions

View File

@ -1,17 +1,18 @@
set(LLVM_LINK_COMPONENTS
BOLTCore
MC
Object
Support
${LLVM_TARGETS_TO_BUILD}
AArch64Desc
)
add_llvm_library(LLVMBOLTTargetAArch64
AArch64MCPlusBuilder.cpp
DEPENDS
intrinsics_gen
AArch64CommonTableGen
)
include_directories(${LLVM_MAIN_SRC_DIR}/lib/Target/AArch64 ${LLVM_BINARY_DIR}/lib/Target/AArch64)
include_directories(
${LLVM_MAIN_SRC_DIR}/lib/Target/AArch64
${LLVM_BINARY_DIR}/lib/Target/AArch64
)

View File

@ -2,17 +2,18 @@ set(LLVM_LINK_COMPONENTS
BOLTCore
BOLTUtils
MC
Object
Support
${LLVM_TARGETS_TO_BUILD}
X86Desc
)
add_llvm_library(LLVMBOLTTargetX86
X86MCPlusBuilder.cpp
DEPENDS
intrinsics_gen
X86CommonTableGen
)
include_directories(${LLVM_MAIN_SRC_DIR}/lib/Target/X86 ${LLVM_BINARY_DIR}/lib/Target/X86)
include_directories(
${LLVM_MAIN_SRC_DIR}/lib/Target/X86
${LLVM_BINARY_DIR}/lib/Target/X86
)