[bazel] Remove the dependency on CodeGen from MCTargetDesc & Utils

This means llvm-mc should now build without depending on the target
CodeGen libraries.

Fix up a few includes in RISCV, AMDGPU, and X86 MCA to avoid transitive
deps on CodeGen.

Fixes #64166
This commit is contained in:
Reid Kleckner 2023-07-26 14:17:35 -07:00
parent 4bb6bbb9bf
commit 5bc514b74e
4 changed files with 2 additions and 6 deletions

View File

@ -13,7 +13,7 @@
#include "AMDGPUCustomBehaviour.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "SIInstrInfo.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "TargetInfo/AMDGPUTargetInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/WithColor.h"

View File

@ -14,7 +14,6 @@
#include "RISCVCustomBehaviour.h"
#include "MCTargetDesc/RISCVMCTargetDesc.h"
#include "RISCV.h"
#include "RISCVInstrInfo.h"
#include "TargetInfo/RISCVTargetInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/Debug.h"

View File

@ -13,7 +13,7 @@
#include "X86CustomBehaviour.h"
#include "TargetInfo/X86TargetInfo.h"
#include "X86InstrInfo.h"
#include "MCTargetDesc/X86BaseInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/WithColor.h"

View File

@ -2271,9 +2271,6 @@ gentbl(
strip_include_prefix = "lib/Target/" + target["name"],
deps = [
":BinaryFormat",
# Depending on `:CodeGen` headers in this library is almost
# certainly a layering problem in numerous targets.
":CodeGen",
":CodeGenTypes",
":DebugInfoCodeView",
":MC",