Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
a2ea7224
Commit
a2ea7224
authored
Nov 22, 2017
by
4ast
Committed by
GitHub
Nov 22, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1455 from iovisor/yhs_dev
force linking the whole api-static library into shared library
parents
8cf1ff52
fbe1b321
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
src/cc/CMakeLists.txt
src/cc/CMakeLists.txt
+11
-5
No files found.
src/cc/CMakeLists.txt
View file @
a2ea7224
...
...
@@ -57,24 +57,30 @@ include(clang_libs)
set
(
CMAKE_SHARED_LINKER_FLAGS
"
${
CMAKE_SHARED_LINKER_FLAGS
}
${
clang_lib_exclude_flags
}
"
)
set
(
CMAKE_SHARED_LINKER_FLAGS
"
${
CMAKE_SHARED_LINKER_FLAGS
}
${
llvm_lib_exclude_flags
}
"
)
set
(
bcc_common_libs b_frontend clang_frontend bpf-static
# bcc_common_libs_for_a for archive libraries
# bcc_common_libs_for_s for shared libraries
set
(
bcc_common_libs_for_a b_frontend clang_frontend bpf-static
${
clang_libs
}
${
llvm_libs
}
${
LIBELF_LIBRARIES
}
)
set
(
bcc_common_libs_for_s
${
bcc_common_libs_for_a
}
)
if
(
ENABLE_CPP_API
)
add_subdirectory
(
api
)
list
(
APPEND bcc_common_libs api-static
)
list
(
APPEND bcc_common_libs_for_a api-static
)
# Keep all API functions
list
(
APPEND bcc_common_libs_for_s -Wl,--whole-archive api-static -Wl,--no-whole-archive
)
endif
()
if
(
ENABLE_USDT
)
add_subdirectory
(
usdt
)
list
(
APPEND bcc_common_libs usdt-static
)
list
(
APPEND bcc_common_libs_for_a usdt-static
)
list
(
APPEND bcc_common_libs_for_s usdt-static
)
endif
()
add_subdirectory
(
frontends
)
# Link against LLVM libraries
target_link_libraries
(
bcc-shared
${
bcc_common_libs
}
)
target_link_libraries
(
bcc-static
${
bcc_common_libs
}
bcc-loader-static
)
target_link_libraries
(
bcc-shared
${
bcc_common_libs
_for_s
}
)
target_link_libraries
(
bcc-static
${
bcc_common_libs
_for_a
}
bcc-loader-static
)
install
(
TARGETS bcc-shared LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
)
install
(
FILES
${
bcc_table_headers
}
DESTINATION include/bcc
)
...
...
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