1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 20:21:14 +00:00

tensorflow-lite: set CXXSTANDARD to c++17 (#127209)

This commit is contained in:
Phillip Cloud 2021-06-18 05:46:37 -04:00 committed by GitHub
parent 0f7a074b9e
commit 5c533a0232
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,6 +83,12 @@ stdenv.mkDerivation rec {
url = "https://github.com/tensorflow/tensorflow/commit/f3c4f4733692150fd6174f2cd16438cfaba2e5ab.patch";
sha256 = "0zx4hbz679kn79f30159rl1mq74dg45cvaawii0cyv48z472yy4k";
})
# TODO: remove on the next version bump
(fetchpatch {
name = "cxxstandard-var.patch";
url = "https://github.com/tensorflow/tensorflow/commit/9b128ae4200e10b4752f903492d1e7d11957ed5c.patch";
sha256 = "1q0izdwdji5fbyqll6k4dmkzfykyvvz5cvc6hysdj285nkn2wy6h";
})
];
buildInputs = [ zlib flatbuffers ];
@ -140,7 +146,14 @@ stdenv.mkDerivation rec {
# tensorflow lite expects to compile abseil into `libtensorflow-lite.a`
ln -s ${abseil-cpp.src} "$prefix/absl"
buildFlagsArray+=(INCLUDES="-I $PWD ${includes}" TARGET_TOOLCHAIN_PREFIX="" -j$NIX_BUILD_CORES all)
# set CXXSTANDARD=c++17 here because abseil-cpp in nixpkgs is set as
# such and would be used in dependents like libedgetpu
buildFlagsArray+=(
INCLUDES="-I $PWD ${includes}"
CXXSTANDARD="-std=c++17"
TARGET_TOOLCHAIN_PREFIX=""
-j$NIX_BUILD_CORES
all)
'';
installPhase = ''