Skip to content

Commit 466d0fe

Browse files
authored
Merge branch 'main' into SVLS-6036-respect-timeouts
2 parents 845c86b + 787d15e commit 466d0fe

File tree

78 files changed

+3906
-1434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+3906
-1434
lines changed

Cargo.lock

Lines changed: 28 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ resolver = "2"
5858
[workspace.package]
5959
rust-version = "1.78.0"
6060
edition = "2021"
61-
version = "15.0.0"
61+
version = "16.0.3"
6262
license = "Apache-2.0"
6363

6464
[profile.dev]

cmake/DatadogConfig.cmake.in

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,37 @@ endif()
1111

1212
find_path(Datadog_INCLUDE_DIR datadog/profiling.h HINTS ${Datadog_ROOT}/include)
1313

14-
find_library(
15-
Datadog_LIBRARY
16-
NAMES datadog_profiling
17-
HINTS ${Datadog_ROOT}/lib)
14+
set(DD_LIB_NAME "datadog_profiling")
15+
16+
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
17+
# Prefer static linking over dynamic unless specified
18+
set(LINK_TYPE "static")
19+
if (DEFINED VCRUNTIME_LINK_TYPE)
20+
string(TOLOWER ${VCRUNTIME_LINK_TYPE} LINK_TYPE)
21+
endif()
22+
23+
set(BUILD_TYPE "release")
24+
if (DEFINED CMAKE_BUILD_TYPE)
25+
string(TOLOWER ${CMAKE_BUILD_TYPE} BUILD_TYPE)
26+
endif()
27+
28+
find_library(
29+
Datadog_LIBRARY
30+
# Windows artifacts publish the library as datadog_profiling_ffi
31+
# in {build_type}/{link_type} directory
32+
NAMES ${DD_LIB_NAME} datadog_profiling_ffi
33+
HINTS ${Datadog_ROOT}/lib ${Datadog_ROOT}/${BUILD_TYPE}/${LINK_TYPE})
34+
35+
# It could be either datadog_profiling or datadog_profiling_ffi, set it to the
36+
# one that is found
37+
get_filename_component(DD_LIB_NAME ${Datadog_LIBRARY} NAME_WE)
38+
message(STATUS "Datadog library name: ${DD_LIB_NAME}")
39+
else()
40+
find_library(
41+
Datadog_LIBRARY
42+
NAMES ${DD_LIB_NAME}
43+
HINTS ${Datadog_ROOT}/lib)
44+
endif()
1845

1946
find_package_handle_standard_args(Datadog DEFAULT_MSG Datadog_LIBRARY
2047
Datadog_INCLUDE_DIR)
@@ -24,15 +51,15 @@ if(Datadog_FOUND)
2451
set(Datadog_LIBRARIES ${Datadog_LIBRARY} "@Datadog_LIBRARIES@")
2552
mark_as_advanced(Datadog_ROOT Datadog_LIBRARY Datadog_INCLUDE_DIR)
2653

27-
add_library(datadog_profiling INTERFACE)
28-
target_include_directories(datadog_profiling
54+
add_library(${DD_LIB_NAME} INTERFACE)
55+
target_include_directories(${DD_LIB_NAME}
2956
INTERFACE ${Datadog_INCLUDE_DIRS})
30-
target_link_libraries(datadog_profiling INTERFACE ${Datadog_LIBRARIES})
31-
target_compile_features(datadog_profiling INTERFACE c_std_11)
57+
target_link_libraries(${DD_LIB_NAME} INTERFACE ${Datadog_LIBRARIES})
58+
target_compile_features(${DD_LIB_NAME} INTERFACE c_std_11)
3259

3360
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
3461
target_link_libraries(
35-
datadog_profiling
62+
${DD_LIB_NAME}
3663
INTERFACE NtDll
3764
UserEnv
3865
Bcrypt
@@ -45,7 +72,7 @@ if(Datadog_FOUND)
4572
PowrProf)
4673
endif()
4774

48-
add_library(Datadog::Profiling ALIAS datadog_profiling)
75+
add_library(Datadog::Profiling ALIAS ${DD_LIB_NAME})
4976
else()
5077
set(Datadog_ROOT
5178
""

crashtracker-ffi/cbindgen.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ renaming_overrides_prefixing = true
3535
"Vec_Tag" = "ddog_Vec_Tag"
3636
"Vec_U8" = "ddog_Vec_U8"
3737
"VoidResult" = "ddog_VoidResult"
38+
"StringWrapper" = "ddog_StringWrapper"
39+
"StringWrapperResult" = "ddog_StringWrapperResult"
40+
"CrashInfoBuilderNewResult" = " ddog_crasht_CrashInfoBuilder_NewResult"
41+
"StackTraceNewResult" = " ddog_crasht_StackTrace_NewResult"
42+
"StackFrameNewResult" = "ddog_crasht_StackFrame_NewResult"
43+
"CrashInfoNewResult" = "ddog_crasht_CrashInfo_NewResult"
3844

3945
[export.mangle]
4046
rename_types = "PascalCase"

0 commit comments

Comments
 (0)