Skip to content

Commit 991d543

Browse files
authored
capi: fix sanitizer build after PR 1978 (#1981)
1 parent 109b0c5 commit 991d543

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cmd/capi/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ set(PRIVATE_LIBS
3131

3232
target_link_libraries(execute PRIVATE ${PRIVATE_LIBS})
3333

34-
# Target 'capi_main' is used to check that Silkworm C API header passes pure C compilation
35-
add_executable(capi_main main.c)
36-
target_link_libraries(capi_main PRIVATE silkworm_capi)
34+
# Target 'capi_main' is used to check that Silkworm C API header passes pure C compilation (avoid this target in
35+
# sanitizer build due to linking errors w/ libFuzzingEngine dependencies)
36+
if(NOT SILKWORM_SANITIZE)
37+
add_executable(capi_main main.c)
38+
target_link_libraries(capi_main PRIVATE silkworm_capi)
39+
endif()

0 commit comments

Comments
 (0)