[flang-dev] Out of tree buildbot

Andrzej Warzynski via flang-dev flang-dev at lists.llvm.org
Wed Sep 16 04:28:35 PDT 2020


Replacing LLVM_DIR/MLIR_DIR/CLANG_DIR with something more generic would 
be nice.

AFAIK, both CMAKE_PREFIX_PATH and CMAKE_MODULE_PATH are used by CMake 
when searching directories. But I always get slightly confused by the 
exact relation between these variables and various CMake commands.

I'm not a CMake expert, but IIUC we need to make sure that:

* CMake's `find_package` finds LLVM/MLIR/CLANG (e.g. 
https://github.com/llvm/llvm-project/blob/master/flang/CMakeLists.txt#L59)
* CMake's `include` finds, among others, AddLLVM.cmake 
(https://github.com/llvm/llvm-project/blob/master/flang/CMakeLists.txt#L82)

Just my 2p.

-Andrzej

On 15/09/2020 11:42, Diana Picus via flang-dev wrote:
> On Mon, 14 Sep 2020 at 18:06, Timothy Keith <tkeith at nvidia.com> wrote:
>>
>> FYI, you can use CMAKE_PREFIX_PATH rather than LLVM_DIR and MLIR_DIR to make your out-of-tree cmake command a little simpler.
>>
>> With your setup I think it would be: -DCMAKE_PREFIX_PATH=../../build_llvm
> 
> Interesting point! I was using LLVM_DIR and MLIR_DIR since that's what
> the docs say and that's what people are most likely to use in real
> life. Is setting CMAKE_PREFIX_PATH preferred? If so, I can update both
> the buildbot and the readme to use that.
> 
> Thanks,
> Diana
> 
>> Tim
>>
>> On 9/14/20, 1:50 AM, "flang-dev on behalf of Diana Picus via flang-dev" <flang-dev-bounces at lists.llvm.org on behalf of flang-dev at lists.llvm.org> wrote:
>>
>>      External email: Use caution opening links or attachments
>>
>>
>>      On Mon, 14 Sep 2020 at 10:48, Diana Picus <diana.picus at linaro.org> wrote:
>>      >
>>      > Hi everyone,
>>      >
>>      > The out of tree buildbot is staging here [1] and the corresponding
>>      > patch to zorg is in review here [2]. Please leave a comment or reply
>>      > to this email if you think anything looks wrong about what it's doing
>>      > or if there are any additional CMake flags that we should be passing.
>>      >
>>      > Thanks,
>>      > Diana
>>      >
>>      > TL;DR, here are the commands it runs:
>>      >
>>      > build_llvm> cmake -DLLVM_TARGETS_TO_BUILD=AArch64
>>      > -DCMAKE_CXX_STANDARD=17 -DLLVM_ENABLE_WERROR=OFF
>>      > -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_BUILD_TYPE=Release -GNinja
>>      > '-DLLVM_ENABLE_PROJECTS=llvm;mlir' '-DLLVM_LIT_ARGS=-v -vv'
>>      > ../llvm-project/llvm
>>
>>      Just noticed I should probably move the LLVM_LIT_ARGS to the second
>>      cmake command, since that's the one running any tests :D But do point
>>      out anything else!
>>
>>      > build_llvm> ninja
>>      >
>>      > build_flang> cmake -DFLANG_ENABLE_WERROR=ON -DCMAKE_BUILD_TYPE=Release
>>      > -GNinja -DLLVM_DIR:PATH=../../build_llvm/lib/cmake/llvm
>>      > -DMLIR_DIR:PATH=../../build_llvm/lib/cmake/mlir ../llvm-project/flang
>>      >
>>      > build_flang> ninja check-all
>>      >
>>      > [1] http://ex40-01.tcwglab.linaro.org:8012/builders/flang-aarch64-ubuntu-out-of-tree
>>      > [2] https://reviews.llvm.org/D87085
>>      _______________________________________________
>>      flang-dev mailing list
>>      flang-dev at lists.llvm.org
>>      https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev
>>
> _______________________________________________
> flang-dev mailing list
> flang-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev
> 


More information about the flang-dev mailing list