[mlgo] fix build rules
authorMircea Trofin <mtrofin@google.com>
Sat, 3 Apr 2021 06:45:35 +0000 (23:45 -0700)
committerMircea Trofin <mtrofin@google.com>
Sat, 3 Apr 2021 19:49:03 +0000 (12:49 -0700)
commitb32e76c6d507361b3cf2f1bed6756cd228588236
treee1664279c280e97d9f4dde49cefdada41348b904
parent7727cc242db77f2767509e1802e63c2b25de429c
[mlgo] fix build rules

This was prompted by D95727, which had the side-effect to break the
'release' mode build bot for ML-driven policies. The problem is that now
the pre-compiled object files don't get transitively carried through as
'source' anymore; that being said, the previous way of consuming them
was problematic, because it was only working for static builds; in
dynamic builds, the whole tf_xla_runtime was linked, which is
undesirable.

The alternative is to treat tf_xla_runtime as an archive, which then
leads to the desired effect.

Differential Revision: https://reviews.llvm.org/D99829
llvm/CMakeLists.txt
llvm/lib/Analysis/CMakeLists.txt