diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-29T20·51+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-29T21·04+0100 |
commit | e494a347b52c96543eec91bc73756a22fe336292 (patch) | |
tree | 339e96bae727d5d30a8a651a8ffac4975f6ddb88 /third_party | |
parent | 6302a89c6daf1e3303fc53206fd15a2e581eb916 (diff) |
fix(3p/nix): Build glog as included CMake project r/870
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/nix/CMakeLists.txt | 7 | ||||
-rw-r--r-- | third_party/nix/default.nix | 6 | ||||
l--------- | third_party/nix/glog | 1 |
3 files changed, 9 insertions, 5 deletions
diff --git a/third_party/nix/CMakeLists.txt b/third_party/nix/CMakeLists.txt index fb7076aa5f41..88a23cd8805c 100644 --- a/third_party/nix/CMakeLists.txt +++ b/third_party/nix/CMakeLists.txt @@ -11,7 +11,6 @@ find_package(Boost COMPONENTS context) # probably coroutine + ::headers, lets fi find_package(CURL) find_package(SQLite3) find_package(Threads) -find_package(glog) find_package(LibLZMA) # Abseil really doesn't like being precompiled. It is included here as @@ -24,6 +23,12 @@ find_package(LibLZMA) # link to the Abseil sources in the Nix store. add_subdirectory(abseil_cpp) +# 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) + # generate a configuration file (autoheader-style) to configure # certain symbols that Nix depends on. configure_file(config.h.in nix_config.h @ONLY) diff --git a/third_party/nix/default.nix b/third_party/nix/default.nix index aa2fd3b7afef..c31de41eddc7 100644 --- a/third_party/nix/default.nix +++ b/third_party/nix/default.nix @@ -19,7 +19,8 @@ in pkgs.llvmPackages.libcxxStdenv.mkDerivation { # Abseil's sources need to be symlinked into Nix' sources. postUnpack = '' - ln -fs ${pkgs.abseil_cpp.src} nix/abseil_cpp + ln -fs ${pkgs.abseil_cpp.drvAttrs.src} nix/abseil_cpp + ln -fs ${pkgs.glog.drvAttrs.src} nix/glog ''; nativeBuildInputs = with pkgs; [ @@ -34,8 +35,6 @@ in pkgs.llvmPackages.libcxxStdenv.mkDerivation { # TODO(tazjin): Some of these might only be required for native inputs buildInputs = with pkgs; [ - # TODO(tazjin): Figure out why meson can't make the Abseil headers visible - abseil_cpp aws-s3-cpp boost brotli @@ -43,7 +42,6 @@ in pkgs.llvmPackages.libcxxStdenv.mkDerivation { curl editline flex - glog largeBoehm libseccomp libsodium diff --git a/third_party/nix/glog b/third_party/nix/glog new file mode 120000 index 000000000000..831dc12a904c --- /dev/null +++ b/third_party/nix/glog @@ -0,0 +1 @@ +../glog/ \ No newline at end of file |