Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add top-level controls to VMR for system libraries #19640

Closed

Conversation

omajid
Copy link
Member

@omajid omajid commented May 2, 2024

Often, when building .NET, we want to build with different configurations of external libraries. For example, runtime has a copy of brotli, and we may or may not want to use that.

This introduces top-level properties to the VMR to select whether to use the bundled copy of a library (eg in, runtime/src/native/external) vs the system copy of the library.

This will be used by dotnet/runtime#101797

Often, when building .NET, we want to build with different
configurations of external libraries. For example, runtime has a copy of
brotli, and we may or may not want to use that.

This introduces top-level properties to the VMR to select whether to use
the bundled copy of a library (eg in, runtime/src/native/external) vs
the system copy of the library.
@omajid omajid requested review from a team as code owners May 2, 2024 14:25
<BuildArgs Condition="'$(UseSystemLibunwind)' != ''">$(BuildArgs) /p:UseSystemLibunwind=$(UseSystemLibunwind)</BuildArgs>
<BuildArgs Condition="'$(UseSystemLlvmLibunwind)' != ''">$(BuildArgs) /p:UseSystemLlvmLibunwind=$(UseSystemLlvmLibunwind)</BuildArgs>
<BuildArgs Condition="'$(UseSystemRapidjson)' != ''">$(BuildArgs) /p:UseSystemRapidjson=$(UseSystemRapidjson)</BuildArgs>
<BuildArgs Condition="'$(UseSystemZlib)' != ''">$(BuildArgs) /p:UseSystemZlib=$(UseSystemZlib)</BuildArgs>
Copy link
Member Author

Choose a reason for hiding this comment

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

Is it better to add specific named options like this? Or better to have generic mechanism to pass any property to the inner build?

Copy link
Member

Choose a reason for hiding this comment

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

I could imagine an explosion of these over time. It would be better to have some generic passthrough mechanism. @ViktorHofer what do you think?

Copy link
Member

Choose a reason for hiding this comment

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

Could we use a property named something like UseSystemLibs and have the names specified as a +-deliminated list? Like /p:UseSystemLibs=brotli+libunwind+rapidjson+zlib? And then implement that property as the one that's passed through?

Copy link
Member

@ViktorHofer ViktorHofer left a comment

Choose a reason for hiding this comment

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

As part of the installer->sdk repository consolidation we are already switching the VMR over into dotnet/sdk. ETA: today or tomorrow. The last manual code sync happened today and we don't plan on doing another sync. Please close this PR and submit it into dotnet/sdk. Sorry for the inconvenience.

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.

None yet

4 participants