HomePhabricator

[flang] Fix CMake bug in the definition of flang-new

Authored by awarzynski on Oct 14 2020, 9:40 AM.

Description

[flang] Fix CMake bug in the definition of flang-new

Recent patch that improved Flang's compatibility with respect to how LLVM
dynamic libraries should be linked (and specified in CMake recipes),
introduced a bug in the definition of flang-new:

More specifically, add_flang_tool does not support the
LINK_COMPONENTS CMake argument. Instead, one should set
LLVM_LINK_COMPONENTS before calling add_flang_tool.

This patch reverts the change for flang-new from
https://reviews.llvm.org/D87893, and instead:

  • sets LLVM_LINK_COMPONENTS
  • calls clang_target_link_libraries to add Clang dependencies

Differential Revision: https://reviews.llvm.org/D89403

Details

Committed
awarzynskiOct 14 2020, 11:24 AM
Differential Revision
D89403: [flang] Fix CMake bug in the definition of flang-new
Parents
rGe9ac1869a82a: Preserve param alignment in NVPTXLowerArgs pass.
Branches
Unknown
Tags
Unknown