HomePhabricator

Don't link any LLVM/MLIR library to the C API unit-test

Authored by mehdi_amini on Nov 6 2020, 5:34 PM.

Description

Don't link any LLVM/MLIR library to the C API unit-test

The tests are intended to exercise the public C API and will link to a
specific shared library exposing only the C API, this library itself may
link to libMLIR.so.
If we link some LLVM library statically in the test themselves, we end
up with duplicated cl::opt registrations in LLVM. A possible setup if
these libraries were needed could be to link libMLIR.so directly when
available and link statically when it isn't available (in which case the
libary exposing the C API would be statically link and isolated from the
cl::opt registry, hopefully).

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

Details

Committed
mehdi_aminiNov 6 2020, 5:54 PM
Differential Revision
D90993: Don't link any LLVM/MLIR library to the C API unit-test
Parents
rG46a29e9c6e7f: [Inliner] Handle `mustprogress` functions
Branches
Unknown
Tags
Unknown