This is an archive of the discontinued LLVM Phabricator instance.

Build: Move TF source file inclusion from build system to source files
ClosedPublic

Authored by thakis on Jul 21 2020, 8:49 AM.

Details

Summary

Outside of compiler-rt (where it's arguably an anti-pattern too),
LLVM tries to keep its build files as simple as possible. See e.g.
llvm/docs/SupportLibrary.rst, "Code Organization".

Diff Detail

Event Timeline

thakis created this revision.Jul 21 2020, 8:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2020, 8:49 AM
mtrofin accepted this revision.Jul 21 2020, 8:57 AM
mtrofin added inline comments.
llvm/include/llvm/Config/config.h.cmake
350

There's already a LLVM_HAVE_TF_API in llvm-config.h.cmake. Should LLVM_HAVE_TF_AOT move there, too?

(or vice-versa - it wasn't too clear to me which file is for what)

llvm/lib/Analysis/CMakeLists.txt
81

nit: why did LoopUnrollAnalyzer move? if it's a drive-by change (to keep sorting), should LoopNestAnalysis.cpp also move?

This revision is now accepted and ready to land.Jul 21 2020, 8:57 AM
thakis marked 2 inline comments as done.Jul 21 2020, 9:01 AM

Thanks!

llvm/include/llvm/Config/config.h.cmake
350

config.h is for llvm-internal things. looks like this one doesn't have to be exposed to users of llvm.

llvm/lib/Analysis/CMakeLists.txt
81

I ran :sort to put the ML files in the right place. This was an unintentional change, I'll move it back.

This revision was automatically updated to reflect the committed changes.