Skip to content

Commit

Permalink
[chore](profile) Move DLLVM_PROFILE into service/CMakeLists.txt (#30705)
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Drogon <jack.xsuperman@gmail.com>
  • Loading branch information
JackDrogon authored Feb 8, 2024
1 parent 47ea3ea commit 06e08fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion be/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ set(BUILD_SHARED_LIBS OFF)

option(ENABLE_CLANG_COVERAGE "coverage option" OFF)
if (ENABLE_CLANG_COVERAGE AND ENABLE_CLANG_COVERAGE STREQUAL ON AND COMPILER_CLANG)
add_compile_options(-fprofile-instr-generate -fcoverage-mapping -DLLVM_PROFILE)
add_compile_options(-fprofile-instr-generate -fcoverage-mapping)
add_link_options(-fprofile-instr-generate)
endif ()

Expand Down
3 changes: 3 additions & 0 deletions be/src/service/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ if (${MAKE_TEST} STREQUAL "OFF")
doris_main.cpp
)

if (ENABLE_CLANG_COVERAGE AND ENABLE_CLANG_COVERAGE STREQUAL ON AND COMPILER_CLANG)
target_compile_definitions(doris_be PRIVATE -DLLVM_PROFILE)
endif ()
pch_reuse(doris_be)

# This permits libraries loaded by dlopen to link to the symbols in the program.
Expand Down

0 comments on commit 06e08fc

Please sign in to comment.