[LoongArch] Add Scalar link component
authorXiaodong Liu <liuxiaodong@loongson.cn>
Fri, 24 Mar 2023 14:57:22 +0000 (09:57 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Fri, 24 Mar 2023 14:58:26 +0000 (09:58 -0500)
Fix the lld link error on ppc64le builders:
```
ld.lld: error: undefined symbol: llvm::createLoopDataPrefetchPass()
>>> referenced by LoongArchTargetMachine.cpp
>>>               lib/Target/LoongArch/CMakeFiles/LLVMLoongArchCodeGen.dir/LoongArchTargetMachine.cpp.o:((anonymous namespace)::LoongArchPassConfig::addIRPasses())
collect2: error: ld returned 1 exit status`
```

Reviewed By: sdesmalen

Differential Revision: https://reviews.llvm.org/D146806

llvm/lib/Target/LoongArch/CMakeLists.txt

index 3239dd7776ebaf10e83464aa17197c1a3d891cef..58709f5fe7dafb6209a2a8aaaaa839a3f555a194 100644 (file)
@@ -35,6 +35,7 @@ add_llvm_target(LoongArchCodeGen
   MC
   LoongArchDesc
   LoongArchInfo
+  Scalar
   SelectionDAG
   Support
   Target