fix(3p/nix): Link to glog built by Nix
Same as cl/921, it seems that the trick to making this work is indeed overriding the C++ standard used in the dependency. Change-Id: I3c5984d71014d774c161ecc283844f504fd44719 Reviewed-on: https://cl.tvl.fyi/c/depot/+/922 Tested-by: BuildkiteCI Reviewed-by: lukegb <lukegb@tvl.fyi>
This commit is contained in:
parent
5cb6e6ee21
commit
7e8a48c82c
4 changed files with 7 additions and 14 deletions
5
third_party/glog/default.nix
vendored
5
third_party/glog/default.nix
vendored
|
@ -7,7 +7,10 @@ in llvmPackages.libcxxStdenv.mkDerivation {
|
|||
src = ./.;
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
cmakeFlags = [ "-WITH_GFLAGS=OFF" ];
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_CXX_STANDARD=17"
|
||||
"-WITH_GFLAGS=OFF"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/google/glog";
|
||||
|
|
9
third_party/nix/CMakeLists.txt
vendored
9
third_party/nix/CMakeLists.txt
vendored
|
@ -17,16 +17,11 @@ set(PKGCONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
|||
find_package(BZip2)
|
||||
find_package(Boost COMPONENTS context) # probably coroutine + ::headers, lets find out
|
||||
find_package(CURL)
|
||||
find_package(LibLZMA)
|
||||
find_package(SQLite3)
|
||||
find_package(Threads)
|
||||
find_package(LibLZMA)
|
||||
find_package(absl REQUIRED)
|
||||
|
||||
# Linking precompiled glog binaries (linked against libstdc++) leads
|
||||
# to working binaries that do not output log messages. It seems that
|
||||
# in order to use glog with LLVM & libc++, one needs to make glog a
|
||||
# part of the local project build.
|
||||
add_subdirectory(glog)
|
||||
find_package(glog REQUIRED)
|
||||
|
||||
# generate a configuration file (autoheader-style) to configure
|
||||
# certain symbols that Nix depends on.
|
||||
|
|
6
third_party/nix/default.nix
vendored
6
third_party/nix/default.nix
vendored
|
@ -17,11 +17,6 @@ in pkgs.llvmPackages.libcxxStdenv.mkDerivation {
|
|||
version = "2.3.4";
|
||||
src = ./.;
|
||||
|
||||
# Abseil's sources need to be symlinked into Nix' sources.
|
||||
postUnpack = ''
|
||||
ln -fs ${pkgs.glog.drvAttrs.src} nix/glog
|
||||
'';
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
bison
|
||||
clang-tools
|
||||
|
@ -41,6 +36,7 @@ in pkgs.llvmPackages.libcxxStdenv.mkDerivation {
|
|||
curl
|
||||
editline
|
||||
flex
|
||||
glog
|
||||
libseccomp
|
||||
libsodium
|
||||
openssl
|
||||
|
|
1
third_party/nix/glog
vendored
1
third_party/nix/glog
vendored
|
@ -1 +0,0 @@
|
|||
../glog/
|
Loading…
Reference in a new issue