[PATCH] D116566: [flang] Fix the documentation on how to build flang

Pete Steinfeld via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 5 12:16:58 PST 2022


PeteSteinfeld added inline comments.


================
Comment at: flang/README.md:123-125
+  -DLLVM_DIR=$base/build/lib/cmake/llvm \
+  -DCLANG_DIR=$base/install/lib/cmake/clang \
+  -DMLIR_DIR=$base/install/lib/cmake/mlir \
----------------
awarzynski wrote:
> It's a bit confusing that for LLVM it's `$base/build/` and otherwise it's `$base/install/`. If I recall correctly, you need:
> * build directory for LLVM, because that's the only location where GTest is available (required for unit tests)
> * install directory for Clang, because that's the only location were `AddClang.cmake` script is available (required for Clang configuration)
> 
> Fixing this would be nice, but that's totally out of scope here! Perhaps you could add a note outside this code snippet to highlight this inconsistency, 
> > "Note that for Clang and MLIR you will use the installation directory (`$base/install`) and for LLVM you will need to build directory (`$base/build`). You can use the installation directory for all three sub-projects if you don't require the unit tests (which are configured by LLVM and are only available in the build directory)."
> 
> Otherwise this inconsistency is confusing and people might think that it's a typo. Or just miss it altogether!
You're analysis is correct.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116566/new/

https://reviews.llvm.org/D116566



More information about the llvm-commits mailing list