Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add build option ENABLE_DEBUG_SERVICE. #178

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ option(BUILD_SHARED_LIBS "build shared libraries instead of static" ON)
option(ENABLE_CACHE_ALIGN "enable optional cache align requirement" OFF)
option(MC_QUEUE "use moody-camel queue" OFF)
option(TRACY_ENABLE "enable tracy profiler" OFF)
option(ENABLE_DEBUG_SERVICE "treats debug service as a core component" ON)
option(ENABLE_ALTIMETER "enable altimeter logging" OFF)

if(NOT DEFINED SHARKSFIN_IMPLEMENTATION)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ available options:
* `-DSHARKSFIN_IMPLEMENTATION=<implementation name>` - switch sharksfin implementation. Available options are `memory` and `shirakami` (default: `memory`)
* `-DPERFORMANCE_TOOLS=ON` - enable performance tooling to measure engine performance
* `-DMC_QUEUE=ON` - use moody camel queue instead of tbb queue to store tasks in tateyama task scheduler.
* `-DENABLE_DEBUG_SERVICE=OFF` - turn off the `debug service`.
* for debugging only
* `-DENABLE_SANITIZER=OFF` - disable sanitizers (requires `-DCMAKE_BUILD_TYPE=Debug`)
* `-DENABLE_UB_SANITIZER=ON` - enable undefined behavior sanitizer (requires `-DENABLE_SANITIZER=ON`)
Expand Down
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ if(MC_QUEUE)
target_compile_definitions(${ENGINE} PUBLIC MC_QUEUE)
endif()

if (ENABLE_DEBUG_SERVICE)
target_compile_definitions(${ENGINE} PRIVATE ENABLE_DEBUG_SERVICE)
endif ()

if (ENABLE_ALTIMETER)
target_link_libraries(${ENGINE}
PRIVATE altimeter
Expand Down
2 changes: 2 additions & 0 deletions src/tateyama/framework/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ void add_core_components(server& svr) {

svr.add_service(std::make_shared<framework::routing_service>());
svr.add_service(std::make_shared<datastore::service::bridge>());
#ifdef ENABLE_DEBUG_SERVICE
svr.add_service(std::make_shared<debug::service>());
#endif

svr.add_endpoint(std::make_shared<framework::ipc_endpoint>());
svr.add_endpoint(std::make_shared<framework::stream_endpoint>());
Expand Down