Disable force_install warning produced by CMake for libraries native build.#32853
Conversation
This lets us enable warn as error in libraries build because this pools contain a newer CMake.
|
Is it really a good idea to use different compilers for CI vs. for official builds? It just means that there are more ways to break official builds that won't be caught by the CI. |
|
This is actually getting CI and official builds to use the same compiler. I merged my CI update earlier today. #32626 |
|
Ok, but it still have a mix of Why is it so important to fix this warning? |
|
Yes the reason for the mix is because coreclr fails with the Windows SDK that the VS2019 preview when building the test components. So I’ll need to figure out why and then we can build all partitions with the same pool, this is temporary. The reason why it is important to have this warnings be errors on CI is because locally we have warnings as errors and for nullable annotations and analyzer rules it has happened that some warnings have been introduced on a PR causing local development to fail with errors. |
|
Why is it not an option to just disable that specific warning, or disable the warnings for just the native portion of the build? I think that should be our default way to deal with any warnings-as-errors issues. |
|
/azp run runtime |
|
/azp run dotnet-runtime-perf |
|
Azure Pipelines successfully started running 1 pipeline(s). |
2 similar comments
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Azure Pipelines successfully started running 1 pipeline(s). |
The problem is the way we do the native build in libraries at the moment. The native build is driven by MSBuild, we call Exec task as an in proc to our build script under libraries/Native. Since warnaserror is controlled globally by arcade passing down the |
I believe that the build-native.cmd script is executed out of proc: https://github.com/dotnet/runtime/blob/master/src/libraries/Native/build-native.proj#L47. It should be easy to tweak the warning as errors behavior for this invocation. I believe that changing https://github.com/dotnet/runtime/blob/master/src/libraries/Native/build-native.cmd#L150 to: should silence the warning/error. |
|
Hmm I didn’t know we could do that in native as well. I’ll try that, thanks that’s a good suggestion. |
| :BuildNativeProj | ||
| :: Build the project created by Cmake | ||
| set __msbuildArgs=/p:Platform=%__BuildArch% /p:PlatformToolset="%__PlatformToolset%" | ||
| set __msbuildArgs=/p:Platform=%__BuildArch% /p:PlatformToolset="%__PlatformToolset%" -noWarn:MSB8065 |
There was a problem hiding this comment.
Nit: Link to the issue to get this workaround removed would be nice
There was a problem hiding this comment.
Thanks. We don’t have an issue open to update the toolset in the build pools. I’m going to merge and once I’m back from vacation will follow up on this matter and add the issue link if needed.
This lets us enable warn as error in libraries build.
Fixes: #32876
cc: @dotnet/runtime-infrastructure