[PATCH] D126291: [flang][Driver] Update link job on windows

Andrzej Warzynski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 3 06:33:28 PDT 2022


awarzynski added a comment.

Thanks for checking @mmuetzel !

In D126291#3555780 <https://reviews.llvm.org/D126291#3555780>, @mmuetzel wrote:

> I ended up using these switches:
>
>   cmake \
>     -Sllvm \
>     -Bbuild \
>     -GNinja \
>     -DCMAKE_INSTALL_PREFIX=pkg \
>     -DCMAKE_C_COMPILER=clang \
>     -DCMAKE_CXX_COMPILER=clang++ \
>     -DCMAKE_C_COMPILER_LAUNCHER=ccache \
>     -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
>     -DLLVM_ENABLE_PROJECTS="clang;mlir;flang;llvm" \
>     -DLLVM_TARGETS_TO_BUILD="X86" \
>     -DCMAKE_BUILD_TYPE=Release \
>     -DLLVM_ENABLE_LIBCXX=ON \
>     -DCLANG_DEFAULT_RTLIB=compiler-rt \
>     -DCLANG_DEFAULT_UNWINDLIB=libunwind \
>     -DCLANG_DEFAULT_LINKER=lld \
>     -DLLVM_BUILD_LLVM_DYLIB=OFF \
>     -DLLVM_BUILD_STATIC=OFF \
>     -DLLVM_ENABLE_ASSERTIONS=OFF \
>     -DLLVM_ENABLE_FFI=ON \
>     -DLLVM_ENABLE_THREADS=ON \
>     -DLLVM_INCLUDE_EXAMPLES=OFF \
>     -DLLVM_INSTALL_UTILS=ON

That's actually quite complex. How about this (that's what I'd normally use):

  cmake \
    -Sllvm \
    -Bbuild \
    -GNinja \
    -DLLVM_ENABLE_PROJECTS="clang;mlir;flang;llvm" \
    -DLLVM_TARGETS_TO_BUILD="X86" \
    -DCMAKE_BUILD_TYPE=Release \

Like @rovka pointed out, skipping `CLANG_DEFAULT_RTLIB` should solve your issue with missing libs, In general, most of the CMake options have "sane" defaults.


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

https://reviews.llvm.org/D126291



More information about the cfe-commits mailing list