Improve memkind library detection (#9134)

Summary:
Improve memkind library detection in build_detect_platform:

- The current position of -lmemkind does not work with all versions of gcc
- LDFLAGS allows specifying non-standard library path through EXTRA_LDFLAGS

After the change, the options match TBB detection.
This is a follow-up to https://github.com/facebook/rocksdb/issues/6214.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/9134

Reviewed By: ajkr, mrambacher

Differential Revision: D32192028

fbshipit-source-id: 115fafe8d93f1fe6aaf80afb32b2cb67aad074c7
main
Luca Giacchino 3 years ago committed by Facebook GitHub Bot
parent 9f7968b2ed
commit 39b6c5791a
  1. 2
      build_tools/build_detect_platform

@ -469,7 +469,7 @@ EOF
if ! test $ROCKSDB_DISABLE_MEMKIND; then if ! test $ROCKSDB_DISABLE_MEMKIND; then
# Test whether memkind library is installed # Test whether memkind library is installed
$CXX $PLATFORM_CXXFLAGS $COMMON_FLAGS -lmemkind -x c++ - -o test.o 2>/dev/null <<EOF $CXX $PLATFORM_CXXFLAGS $LDFLAGS -x c++ - -o test.o -lmemkind 2>/dev/null <<EOF
#include <memkind.h> #include <memkind.h>
int main() { int main() {
memkind_malloc(MEMKIND_DAX_KMEM, 1024); memkind_malloc(MEMKIND_DAX_KMEM, 1024);

Loading…
Cancel
Save