[flang] Fix issues with -DBUILD_SHARED_LIBS=On
authorJean Perier <jperier@nvidia.com>
Wed, 19 Feb 2020 13:19:08 +0000 (05:19 -0800)
committerJean Perier <jperier@nvidia.com>
Wed, 19 Feb 2020 13:25:35 +0000 (05:25 -0800)
This re-ordering allows building f18 with shared library using and LLVM build
with static libraries.

This reordering (that also made sens form an alphabetical point of view)
works here to do such "shared+archive" compiling because the current
dependency on LLVM is simple (only one f18 lib + an executable depends on LLVM).
As soon as two f18 libraries will depend on LLVM, one will have to use an LLVM
version built with -DBUILD_SHARED_LIBS=On if one wants to use this option
to compile f18.

Original-commit: flang-compiler/f18@bbbbe9c1aa2fd38dc2164a6440290dbbea1518e2
Reviewed-on: https://github.com/flang-compiler/f18/pull/994

flang/tools/f18/CMakeLists.txt

index 79f5c52..b2f8e12 100644 (file)
@@ -18,8 +18,8 @@ target_link_libraries(f18
   FortranParser
   FortranEvaluate
   FortranSemantics
-  LLVMSupport
   FortranLower
+  LLVMSupport
 )
 
 add_executable(f18-parse-demo