[llvm] 207c4d4 - [MLGO] Strip TF_PIP cmake variable

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 22 16:28:23 PDT 2021


Author: Mircea Trofin
Date: 2021-07-22T16:28:13-07:00
New Revision: 207c4d4d37d4a2e812a8bbd772aae822fee75640

URL: https://github.com/llvm/llvm-project/commit/207c4d4d37d4a2e812a8bbd772aae822fee75640
DIFF: https://github.com/llvm/llvm-project/commit/207c4d4d37d4a2e812a8bbd772aae822fee75640.diff

LOG: [MLGO] Strip TF_PIP cmake variable

This should fix build breaks for 'development' mode. The other modes
were unaffected - 'release' because it doesn't use TFUtils.cpp, and the
mixed mode because the AOT compiled code brings in the necessary include
dirs anyway.

Added: 
    

Modified: 
    llvm/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 37218cd1093b..68cd2def61ed 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -803,8 +803,10 @@ if (TENSORFLOW_C_LIB_PATH)
     endif()
     string(REGEX MATCH "Location: ([^\n]*\n)" TF_PIP_LOC "${TF_PIP_OUT}")
     string(REPLACE "Location: " "" TF_PIP ${TF_PIP_LOC})
-    set(TF_PROTO_HEADERS ${TF_PIP}/tensorflow/include)
+    string(STRIP ${TF_PIP} TF_PIP)
+    set(TF_PROTO_HEADERS "${TF_PIP}/tensorflow/include")
   endif()
+  message(STATUS "Using Tensorflow headers under: ${TF_PROTO_HEADERS}")
   include_directories(${TF_PROTO_HEADERS})
   add_definitions("-DGOOGLE_PROTOBUF_NO_RTTI")
   add_definitions("-D_GLIBCXX_USE_CXX11_ABI=0")


        


More information about the llvm-commits mailing list