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
d261b7bd
Commit
d261b7bd
authored
Mar 08, 2018
by
4ast
Committed by
GitHub
Mar 08, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1623 from iovisor/yhs_dev
fix CMakefile for lua
parents
66db8790
29015d7e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
src/cc/CMakeLists.txt
src/cc/CMakeLists.txt
+5
-0
src/cc/frontends/clang/CMakeLists.txt
src/cc/frontends/clang/CMakeLists.txt
+0
-1
src/lua/CMakeLists.txt
src/lua/CMakeLists.txt
+1
-1
No files found.
src/cc/CMakeLists.txt
View file @
d261b7bd
...
...
@@ -52,6 +52,8 @@ target_link_libraries(bcc-loader-static elf)
add_library
(
bcc-static STATIC
${
bcc_common_sources
}
${
bcc_table_sources
}
${
bcc_util_sources
}
)
set_target_properties
(
bcc-static PROPERTIES OUTPUT_NAME bcc
)
add_library
(
bcc-lua-static STATIC
${
bcc_common_sources
}
${
bcc_table_sources
}
${
bcc_sym_sources
}
${
bcc_util_sources
}
)
include
(
clang_libs
)
set
(
CMAKE_SHARED_LINKER_FLAGS
"
${
CMAKE_SHARED_LINKER_FLAGS
}
${
clang_lib_exclude_flags
}
"
)
...
...
@@ -62,6 +64,7 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${llvm_lib_exclude_f
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
}
)
set
(
bcc_common_libs_for_lua
${
bcc_common_libs_for_a
}
)
if
(
ENABLE_CPP_API
)
add_subdirectory
(
api
)
...
...
@@ -74,6 +77,7 @@ if(ENABLE_USDT)
add_subdirectory
(
usdt
)
list
(
APPEND bcc_common_libs_for_a usdt-static
)
list
(
APPEND bcc_common_libs_for_s usdt-static
)
list
(
APPEND bcc_common_libs_for_lua usdt-static
)
endif
()
add_subdirectory
(
frontends
)
...
...
@@ -81,6 +85,7 @@ add_subdirectory(frontends)
# Link against LLVM libraries
target_link_libraries
(
bcc-shared
${
bcc_common_libs_for_s
}
)
target_link_libraries
(
bcc-static
${
bcc_common_libs_for_a
}
bcc-loader-static
)
target_link_libraries
(
bcc-lua-static
${
bcc_common_libs_for_lua
}
)
install
(
TARGETS bcc-shared LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
)
install
(
FILES
${
bcc_table_headers
}
DESTINATION include/bcc
)
...
...
src/cc/frontends/clang/CMakeLists.txt
View file @
d261b7bd
...
...
@@ -10,4 +10,3 @@ if(DEFINED BCC_BACKUP_COMPILE)
endif
()
add_library
(
clang_frontend STATIC loader.cc b_frontend_action.cc tp_frontend_action.cc kbuild_helper.cc ../../common.cc
)
target_link_libraries
(
clang_frontend bcc-static
)
src/lua/CMakeLists.txt
View file @
d261b7bd
...
...
@@ -23,7 +23,7 @@ if (LUAJIT_LIBRARIES AND LUAJIT)
add_executable
(
bcc-lua src/main.c bcc.o
)
set_target_properties
(
bcc-lua PROPERTIES LINKER_LANGUAGE C
)
target_link_libraries
(
bcc-lua
${
LUAJIT_LIBRARIES
}
)
target_link_libraries
(
bcc-lua -Wl,--whole-archive bcc-static -Wl,--no-whole-archive
)
target_link_libraries
(
bcc-lua -Wl,--whole-archive bcc-
lua-
static -Wl,--no-whole-archive
)
if
(
NOT COMPILER_NOPIE_FLAG EQUAL
""
)
target_link_libraries
(
bcc-lua
${
COMPILER_NOPIE_FLAG
}
)
endif
()
...
...
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