Skip to content

feat: Add dd-win-prof as a dependency, built on Windows when DD_ENABLE_PROFILER=ON#157

Closed
awforsythe wants to merge 7 commits into
mainfrom
aforsythe/chore/dd-win-prof
Closed

feat: Add dd-win-prof as a dependency, built on Windows when DD_ENABLE_PROFILER=ON#157
awforsythe wants to merge 7 commits into
mainfrom
aforsythe/chore/dd-win-prof

Conversation

@awforsythe

Copy link
Copy Markdown
Contributor

This PR integrates dd-win-prof into the SDK's CMake build, allowing it to be included and built as a dependency when DD_ENABLE_PROFILER is set and the SDK is being built for Windows.

As of this PR, on a Windows VM, from a fresh copy of dd-sdk-cpp, I can configure and build with -DDD_ENABLE_PROFILER=ON:

cmake^
  -DDD_DEVELOPMENT=ON^
  -DDD_CRASH_MODE=inprocess^
  -DDD_ENABLE_CLANG_TIDY=OFF^
  -DDD_ENABLE_CLANG_FORMAT=OFF^
  -DDD_ENABLE_COVERAGE=OFF^
  -DDD_ENABLE_SANITIZERS=^
  -DDD_HTTP_USE_SYSTEM_LIBCURL=OFF^
  -DDD_ENABLE_PROFILER=ON^
  -S . -B build && cmake --build build --config Release

The dd-sdk-cpp CMake project will pull in dd-win-prof via FetchContent (temporarily using branch aforsythe/cmake), build it from source, and add it as a dependency of dd-sdk-cpp, such that we could include dd-win-prof headers and call its public functions from the SDK.

Additionally, the datadog_enable and datadog_install convenience functions (used to add Datadog SDK support to downstream projects, like the example dd_native_repl program) now handle copying dd-win-prof.dll and datadog_profiling_ffi.dll to the final output directory.

So once our CMake build completes, we have an example program with all required artifacts in place:

C:\dd\dd-sdk-cpp>dir /b build\examples\Release
datadog_profiling_ffi.dll
dd-win-prof.dll
dd_native_cpp_example.exe
dd_native_c_example.exe
dd_native_repl.exe

This PR does not attempt to integrate dd-win-prof into the SDK, nor does it add any calls to dd-win-prof's API. This PR is concerned only with ensuring that we can build dd-win-prof seamlessly alongside the SDK.

@awforsythe awforsythe requested a review from a team as a code owner March 3, 2026 17:36
fuzzybinary
fuzzybinary previously approved these changes Mar 3, 2026

@fuzzybinary fuzzybinary left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably doesn't have too be pulled into main -- we can leave this on an experimental branch so long as the Profiling team knows how to get it.

Base automatically changed from aforsythe/RUM-14717/binary-build-ids to main March 4, 2026 18:00
@awforsythe awforsythe dismissed fuzzybinary’s stale review March 4, 2026 18:00

The base branch was changed.

@awforsythe awforsythe force-pushed the aforsythe/chore/dd-win-prof branch from e279c33 to cb9147e Compare March 4, 2026 18:04
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Mar 4, 2026

Copy link
Copy Markdown

✅ Code Quality    ✅ Code Vulnerabilities    ✅ Library Vulnerabilities    ✅ Secrets

🎉 All green!

🛠️ No new code quality issues
🛡️ No new code vulnerabilities
📚 No new vulnerable libraries detected
🔑 No new secrets detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1a4202f | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@awforsythe awforsythe force-pushed the aforsythe/chore/dd-win-prof branch 2 times, most recently from cb9147e to 7d6db18 Compare March 4, 2026 21:57
@awforsythe awforsythe force-pushed the aforsythe/chore/dd-win-prof branch from 7d6db18 to 1a4202f Compare March 9, 2026 16:47
@awforsythe

Copy link
Copy Markdown
Contributor Author

This branch has been supplanted by the profiling team's more recent work; closing this PR in favor of #185.

@awforsythe awforsythe closed this Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants