Skip to content

Commit 74d5016

Browse files
committed
[buildbot] Adjust gemmlowp_INSTALL_LIBDIR based on CMake's choices
Signed-off-by: Peter Rong <[email protected]>
1 parent 8a3c1fa commit 74d5016

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

buildbot/build_tflite.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ cmake -GNinja -S gemmlowp/src/gemmlowp/contrib -B gemmlowp/src/gemmlowp-build \
122122
-DCMAKE_INSTALL_PREFIX:PATH=${PWD}/gemmlowp \
123123
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
124124
ninja -C gemmlowp/src/gemmlowp-build install
125+
# Sometimes INSTALL_LIBDIR defaults to `lib64` instead of `lib`
126+
# Ask CMakeCache which one did it use.
127+
export gemmlowp_INSTALL_LIBDIR=$(grep CMAKE_INSTALL_LIBDIR\:PATH= gemmlowp/src/gemmlowp-build/CMakeCache.txt | cut -d'=' -f2-)
125128

126129
# ml_dtypes
127130
git clone --filter=tree:0 --no-checkout ${ML_DTYPES_REPOSITORY} ml_dtypes/src/ml_dtypes
@@ -141,7 +144,7 @@ cmake -GNinja -S tensorflow/src/tensorflow/tensorflow/lite -B tensorflow/src/ten
141144
-Druy_DIR:PATH=${PWD}/ruy/lib/cmake/ruy \
142145
-Dabsl_DIR:PATH=${PWD}/abseil-cpp/lib/cmake/absl \
143146
-DEigen3_DIR:PATH=${PWD}/eigen/share/eigen3/cmake \
144-
-Dgemmlowp_DIR:PATH=${PWD}/gemmlowp/lib/cmake/gemmlowp \
147+
-Dgemmlowp_DIR:PATH=${PWD}/gemmlowp/${gemmlowp_INSTALL_LIBDIR}/cmake/gemmlowp \
145148
-DNEON_2_SSE_DIR:PATH=${PWD}/ARM_NEON_2_x86_SSE/lib/cmake/NEON_2_SSE \
146149
-DFlatBuffers_DIR:PATH=${PWD}/flatbuffers/lib/cmake/flatbuffers \
147150
-DML_DTYPES_SOURCE_DIR:PATH=${PWD}/ml_dtypes/src/ml_dtypes
@@ -154,7 +157,7 @@ set(ruy_DIR "${PWD}/ruy/lib/cmake/ruy" CACHE PATH "")
154157
set(absl_DIR "${PWD}/abseil-cpp/lib/cmake/absl" CACHE PATH "")
155158
set(Eigen3_DIR "${PWD}/eigen/share/eigen3/cmake" CACHE PATH "")
156159
set(NEON_2_SSE_DIR "${PWD}/ARM_NEON_2_x86_SSE/lib/cmake/NEON_2_SSE" CACHE PATH "")
157-
set(gemmlowp_DIR "${PWD}/gemmlowp/lib/cmake/gemmlowp" CACHE PATH "")
160+
set(gemmlowp_DIR "${PWD}/gemmlowp/${gemmlowp_INSTALL_LIBDIR}/cmake/gemmlowp" CACHE PATH "")
158161
set(FlatBuffers_DIR "${PWD}/flatbuffers/lib/cmake/flatbuffers" CACHE PATH "")
159162
set(tensorflow-lite_DIR "${PWD}/tensorflow/lib/cmake/tensorflow-lite" CACHE PATH "")
160163
set(TENSORFLOW_SRC_DIR "${PWD}/tensorflow/src/tensorflow" CACHE PATH "")

0 commit comments

Comments
 (0)