[PATCH] D81266: [flang] Fix issue of flang/runtime/config.h not being found in out of tree builds

Tim Keith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 10:01:58 PDT 2020


tskeith added a comment.

In D81266#2076748 <https://reviews.llvm.org/D81266#2076748>, @PeteSteinfeld wrote:

> Thanks for working on this!
>
> I tried your change in my out-of-tree build, and it didn't fix anything.  When I do out-of-tree builds, I create a build directory in the `flang` directory and then call `cmake` using the following script:
>
>   #!/bin/bash
>   cmake -G Ninja \
>     -DCMAKE_CXX_STANDARD=17 \
>     -DLLVM_TARGETS_TO_BUILD=host \
>     -DLLVM_LIT_ARGS=-v \
>     -D LLVM_EXTERNAL_LIT=/mnt/c/GitHub/master/clean/build/bin/llvm-lit \
>     -D LLVM_DIR=/mnt/c/GitHub/master/clean/install/lib/cmake/llvm \
>     -D MLIR_DIR=/mnt/c/GitHub/master/clean/install/lib/cmake/mlir \
>     -DCMAKE_BUILD_TYPE=Release ..
>
>
> How do you do out-of-tree builds to make this work for you?


I'm seeing the same thing as Pete. `CMAKE_CURRENT_BINARY_DIR` is the right place to look for `config.h` and I see that it is added to the `INCLUDE_DIRECTORIES` property of `FortranRuntime`, but it's not getting added as a `-I` option to the compilation command.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81266





More information about the llvm-commits mailing list