llvm-project/llvm
Mehdi Amini e72d792c14 Guard `find_library(tensorflow_c_api ...)` by checking for TENSORFLOW_C_LIB_PATH to be set by the user
Also have CMake fails if the user provides a TENSORFLOW_C_LIB_PATH but
we can't find TensorFlow at this path.

At the moment the CMake script tries to figure if TensorFlow is
available on the system and enables support for it. This is in general
not desirable to customize build features this way and instead it is
preferable to let the user opt-in explicitly into the features they want
to enable. This is in line with other optional external dependencies
like Z3.
There are a few reasons to this but amongst others:
- reproducibility: making features "magically" enabled based on whether
  we find a package on the system or not makes it harder to handle bug
  reports from users.
- user control: they can't have TensorFlow on the system and build LLVM
  without TensorFlow right now. They also would suddenly distribute LLVM
  with a different set of features unknowingly just because their build
  machine environment would change subtly.

Right now this is motivated by a user reporting build failures on their system:

.../mesa-git/llvm-git/src/llvm-project/llvm/lib/Analysis/TFUtils.cpp:23:10: fatal error: tensorflow/c/c_api.h: No such file or directory
   23 | #include "tensorflow/c/c_api.h"
      |          ^~~~~~

It looks like we detected TensorFlow at configure time but couldn't set all the paths correctly.

Differential Revision: https://reviews.llvm.org/D88371
2020-09-28 22:15:55 +00:00
..
benchmarks
bindings [bindings/go] Fix TestAttributes after D88241 2020-09-25 20:31:45 -07:00
cmake [CMake][AIX] Limit tools in external project build 2020-09-28 16:59:25 -04:00
docs [TableGen] Add/edit Doxygen comments to match "TableGen Backend Developer's Guide." 2020-09-26 09:09:22 -04:00
examples Update Kaleidoscope: Change headers 2020-09-27 05:40:50 +00:00
include [GlobalISel] Add support for lowering of vector G_SELECT and use for AArch64. 2020-09-28 14:00:46 -07:00
lib [CVP] Allow two transforms in one invocation 2020-09-28 15:11:42 -07:00
projects
resources
runtimes [AIX] Try to not use LLVM tools while building runtimes 2020-09-25 10:55:24 -04:00
test [CVP] Allow two transforms in one invocation 2020-09-28 15:11:42 -07:00
tools [llvm-readobj/elf] - Fix the PREL31 relocation computation used for dumping arm32 unwind info (-u). 2020-09-28 16:22:56 +03:00
unittests [unittests] Preserve LD_LIBRARY_PATH in crash recovery test 2020-09-28 17:46:03 +01:00
utils [gn build] Re-run CompletionModelCodegen when input json files change 2020-09-28 16:58:00 -04:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Guard `find_library(tensorflow_c_api ...)` by checking for TENSORFLOW_C_LIB_PATH to be set by the user 2020-09-28 22:15:55 +00:00
CODE_OWNERS.TXT Update PowerPC backend ownership in CODE_OWNERS.TXT 2020-09-14 15:45:57 -05:00
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.