Move src/native libraries that are shared between runtime builds to be targets-driven#103184
Merged
jkoritzinsky merged 31 commits intodotnet:mainfrom Jun 24, 2024
Merged
Conversation
Contributor
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
Member
|
FYI there's some eventpipe and containers unit tests in https://github.com/dotnet/runtime/tree/main/src/mono/mono/eventpipe/test that (AFAIK) don't run on any pipeline, but that is used for local validation of EP or container changes |
This was referenced Jun 12, 2024
… for runtimes that haven't adopted simdhash
…raries, and update CoreCLR to use the new model.
… there's very few reasons to use it in this way, but this is one of the scenarios for it).
637d77f to
5c13647
Compare
…will fix some of the NativeAOT warnings
This was referenced Jun 19, 2024
lambdageek
approved these changes
Jun 24, 2024
| #include <stdio.h> | ||
| #include <stdlib.h> | ||
|
|
||
| // Define a default implementation of the assert failure function. |
Member
There was a problem hiding this comment.
Should we put something like this in minipal? it seems generally useful
Member
Author
There was a problem hiding this comment.
I think I'd like to see more places where we'd use it before I move it to minipal. We can extract it the next time we'd have a use for it.
Member
Author
|
/ba-g Wasm firefox timeout seems unrelated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Today, the src/native/containers and src/native/eventpipe libraries are defined in terms of source and header file lists.
This provides flexibility into how they're defined in CMake, but it makes it difficult to flow include directories or dependencies. It also makes it difficult to encapsulate logic, as these lists are defined in
.cmakefiles that are included into aCMakeLists.txtfile.This PR converts these libraries to be defined in terms of CMake targets.
src/native/containers is transformed into an object library, so we can build it once and then link it into static libs, shared libs, or executables. An
extern "C"block was added around all declarations that are currently used in eventpipe/diagnosticserver (so notdn-simdhash) to enable the build to build the containers library as a C library. Also, a default implementation of thedn_simdhash_assert_failmethod was added to enable the containers lib to link into runtimes that don't currently provide an implementation.src/native/eventpipe is transformed into interface libraries. Due to how eventpipe and diagnosticserver both require runtime-specific headers and need to be built with different flags for each target, defining them as interface libraries is the cleanest manner to handle this scenario (until we can refactor the
ep-rt-*.handds-rt-*.hheaders into a cleaner design).This PR also updates the eventpipe and diagnosticserver codebases to use CMake's UNITY_BUILD support in each runtime's implementation instead of manually implementing a unity build.