[flang-commits] [flang] 8de6cb1 - [flang] Fix DYLIB builds

Andrzej Warzynski via flang-commits flang-commits at lists.llvm.org
Thu Apr 14 01:59:41 PDT 2022


Author: Andrzej Warzynski
Date: 2022-04-14T08:58:34Z
New Revision: 8de6cb129736bdb47c8d6305a8bf5033fbac9f2f

URL: https://github.com/llvm/llvm-project/commit/8de6cb129736bdb47c8d6305a8bf5033fbac9f2f
DIFF: https://github.com/llvm/llvm-project/commit/8de6cb129736bdb47c8d6305a8bf5033fbac9f2f.diff

LOG: [flang] Fix DYLIB builds

https://reviews.llvm.org/D123211 broke builds that set both
`LLVM_BUILD_LLVM_DYLIB` and `LLVM_LINK_LLVM_DYLIB` (see [1]). This patch
fixes that.

The build failure was caused by the fact that the LLVMPasses library,
which is an LLVM "component", was listed directly as link-time
dependency. Instead, one should use `LINK_COMPONENTS` in CMake files. I
made an identical mistake recently and then subsequently fixed it in
https://reviews.llvm.org/D121461 - please visit that revision for more
detail.

I'm merging this without a review. The change is straightforward, we
recently discussed it and I was able to confirm locally that it fixes
the build issue.

[1] https://lab.llvm.org/buildbot/#/builders/177/builds/4619

Added: 
    

Modified: 
    flang/lib/Frontend/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/flang/lib/Frontend/CMakeLists.txt b/flang/lib/Frontend/CMakeLists.txt
index 45692a5342094..8e186616fb818 100644
--- a/flang/lib/Frontend/CMakeLists.txt
+++ b/flang/lib/Frontend/CMakeLists.txt
@@ -32,13 +32,13 @@ add_flang_library(flangFrontend
   FIRBuilder
   FIRCodeGen
   FIRTransforms
-  LLVMPasses
   MLIRTransforms
   MLIRLLVMToLLVMIRTranslation
   MLIRSCFToControlFlow
   ${dialect_libs}
 
   LINK_COMPONENTS
+  Passes
   Analysis
   Option
   Support


        


More information about the flang-commits mailing list