Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
52e7a6ca
Commit
52e7a6ca
authored
Aug 22, 2017
by
gejun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use ldd to get deps of leveldb and gperftools
parent
e23aad0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
13 deletions
+35
-13
config_brpc.sh
config_brpc.sh
+35
-13
No files found.
config_brpc.sh
View file @
52e7a6ca
...
...
@@ -115,9 +115,19 @@ append_linking $PROTOBUF_LIB protobuf
LEVELDB_LIB
=
$(
find_dir_of_lib_or_die leveldb
)
# required by leveldb
SNAPPY_LIB
=
$(
find_dir_of_lib snappy
)
if
[
-f
$LEVELDB_LIB
/libleveldb.a
]
&&
[
-f
$SNAPPY_LIB
/libsnappy.a
]
;
then
STATIC_LINKINGS
=
"
$STATIC_LINKINGS
-lleveldb -lsnappy"
if
[
-f
$LEVELDB_LIB
/libleveldb.a
]
;
then
if
[
-f
$LEVELDB_LIB
/libleveldb.so
]
;
then
if
ldd
$LEVELDB_LIB
/libleveldb.so |
grep
libsnappy
;
then
SNAPPY_LIB
=
$(
find_dir_of_lib snappy
)
fi
fi
if
[
-z
"
$SNAPPY_LIB
"
]
;
then
STATIC_LINKINGS
=
"
$STATIC_LINKINGS
-lleveldb"
elif
[
-f
$SNAPPY_LIB
/libsnappy.a
]
;
then
STATIC_LINKINGS
=
"
$STATIC_LINKINGS
-lleveldb -lsnappy"
else
DYNAMIC_LINKINGS
=
"
$DYNAMIC_LINKINGS
-lleveldb"
fi
else
DYNAMIC_LINKINGS
=
"
$DYNAMIC_LINKINGS
-lleveldb"
fi
...
...
@@ -203,16 +213,28 @@ else
append_to_output_libs
"
$TCMALLOC_LIB
"
" "
TCMALLOC_HDR
=
$(
find_dir_of_header_or_die google/profiler.h
)
append_to_output_headers
"
$TCMALLOC_HDR
"
" "
# required by tcmalloc('s profiler)
UNWIND_LIB
=
$(
find_dir_of_lib unwind
)
# required by libunwind
LZMA_LIB
=
$(
find_dir_of_lib lzma
)
if
[
-f
$TCMALLOC_LIB
/libtcmalloc_and_profiler.a
]
&&
\
[
-f
$UNWIND_LIB
/libunwind.a
]
&&
\
[
-f
$LZMA_LIB
/liblzma.a
]
;
then
append_to_output_libs
"
$UNWIND_LIB
"
" "
append_to_output_libs
"
$LZMA_LIB
"
" "
append_to_output
" STATIC_LINKINGS+=-ltcmalloc_and_profiler -lunwind -llzma"
if
[
-f
$TCMALLOC_LIB
/libtcmalloc_and_profiler.a
]
;
then
if
[
-f
$TCMALLOC_LIB
/libtcmalloc.so
]
;
then
ldd
$TCMALLOC_LIB
/libtcmalloc.so
>
libtcmalloc.deps
if
grep
libunwind libtcmalloc.deps
;
then
UNWIND_LIB
=
$(
find_dir_of_lib unwind
)
fi
if
grep
liblzma libtcmalloc.deps
;
then
LZMA_LIB
=
$(
find_dir_of_lib lzma
)
fi
rm
libtcmalloc.deps
fi
if
[
-z
"
$UNWIND_LIB
"
]
;
then
append_to_output
" STATIC_LINKINGS+=-ltcmalloc_and_profiler"
elif
[
-f
$UNWIND_LIB
/libunwind.a
]
;
then
append_to_output_libs
"
$UNWIND_LIB
"
" "
append_to_output
" STATIC_LINKINGS+=-ltcmalloc_and_profiler -lunwind"
if
[
!
-z
"
$LZMA_LIB
"
]
;
then
append_to_output_linkings
$LZMA_LIB
lzma
" "
fi
else
append_to_output
" DYNAMIC_LINKINGS+=-ltcmalloc_and_profiler"
fi
else
append_to_output
" DYNAMIC_LINKINGS+=-ltcmalloc_and_profiler"
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment