File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ include("${ClickHouse_SOURCE_DIR}/contrib/aws-cmake/AwsThreadAffinity.cmake")
2626include ("${ClickHouse_SOURCE_DIR} /contrib/aws-cmake/AwsThreadName.cmake" )
2727include ("${ClickHouse_SOURCE_DIR} /contrib/aws-cmake/AwsSIMD.cmake" )
2828include ("${ClickHouse_SOURCE_DIR} /contrib/aws-crt-cpp/cmake/AwsGetVersion.cmake" )
29+ set (AWS_STUBS "${ClickHouse_SOURCE_DIR} /contrib/aws-cmake/aws_stubs.cpp" )
2930
3031
3132# Gather sources and options.
@@ -388,6 +389,8 @@ file(GLOB AWS_SDK_GLUE_SRC
388389list (APPEND AWS_SOURCES ${AWS_SDK_GLUE_SRC} )
389390list (APPEND AWS_PUBLIC_INCLUDES "${AWS_SDK_GLUE_DIR} /include/" )
390391
392+ list (APPEND AWS_SOURCES ${AWS_STUBS} )
393+
391394# Add library.
392395add_library (_aws ${AWS_SOURCES} )
393396
Original file line number Diff line number Diff line change 1+ // aws_stubs.cpp
2+ #include < cstdio>
3+ #include < cstdlib>
4+
5+ extern " C" {
6+
7+ #define AWS_TRAP (sym ) \
8+ __attribute__ ((weak)) void sym() { \
9+ std::fprintf (stderr, " TRAPPED: " #sym " called\n " ); \
10+ std::abort (); \
11+ }
12+
13+ AWS_TRAP (aws_tls_client_ctx_new)
14+ AWS_TRAP(aws_tls_server_ctx_new)
15+ AWS_TRAP(aws_tls_init_static_state)
16+ AWS_TRAP(aws_tls_clean_up_static_state)
17+ AWS_TRAP(aws_mqtt_library_init)
18+ AWS_TRAP(aws_mqtt_library_clean_up)
19+
20+ } // extern "C"
You can’t perform that action at this time.
0 commit comments