-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Run ILC after ComputeResolvedFilesToPublishList #111514
base: main
Are you sure you want to change the base?
Conversation
Did you consider using the scheme that ILLink/R2R/SingleFile use right now? It feels like it would make the sequencing most "standard". We'd probably need to wait for the new SDK to flow to this repo but we just did an upgrade and we could do another one. |
This moves us in that direction - now this target will be sequenced appropriately - and we can change from AfterTargets to DependsOnTargets in a later change. I'm looking at the native aot targets all-up to see if there's other logic that needs cleanup, but wanted to start with this piece. |
--> | ||
<Target Name="ComputeLinkedFilesToPublish" | ||
BeforeTargets="ComputeResolvedFilesToPublishList" | ||
AfterTargets="ComputeResolvedFilesToPublishList" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ha ha nice catch
@@ -92,40 +118,4 @@ | |||
|
|||
</Target> | |||
|
|||
<Target Name="CopyNativeBinary" AfterTargets="Publish"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting rid of this
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(CopyOutputSymbolsToPublishDirectory)' == 'true'"> | ||
<_symbolRecursivePath Include="$(NativeOutputPath)$(TargetName)$(_symbolExt)/**/*" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it may be possible to simplify this -- I'll have to refresh my MSbuild knowledge to remember if it's easy to just track everything in a subdir.
Condition="'$(_symbolIsFile)' == 'true' and Exists('$(_symbolSourcePath)')"> | ||
<RelativePath>$(TargetName)$(_symbolExt)</RelativePath> | ||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> | ||
</ResolvedFileToPublish> | ||
|
||
<!-- Add folder otherwise --> | ||
<ResolvedFileToPublish Include="@(_symbolRecursivePath)" | ||
Condition="'$(_symbolIsFile)' == 'false' and Exists('$(_symbolSourcePath)')"> | ||
<RelativePath>$(TargetName)$(_symbolExt)/%(RecursiveDir)%(Filename)%(Extension)</RelativePath> | ||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: limit the scope of condition
Condition="'$(_symbolIsFile)' == 'true' and Exists('$(_symbolSourcePath)')"> | |
<RelativePath>$(TargetName)$(_symbolExt)</RelativePath> | |
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> | |
</ResolvedFileToPublish> | |
<!-- Add folder otherwise --> | |
<ResolvedFileToPublish Include="@(_symbolRecursivePath)" | |
Condition="'$(_symbolIsFile)' == 'false' and Exists('$(_symbolSourcePath)')"> | |
<RelativePath>$(TargetName)$(_symbolExt)/%(RecursiveDir)%(Filename)%(Extension)</RelativePath> | |
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> | |
Condition="Exists('$(_symbolSourcePath)')"> | |
<!-- If the symbol is a dSYM bundle, it's a folder not a file. --> | |
<RelativePath Condition="'$(NativeSymbolExt)' != '.dSYM'">$(TargetName)$(_symbolExt)</RelativePath> | |
<RelativePath Condition="'$(NativeSymbolExt)' == '.dSYM'">$(TargetName)$(_symbolExt)</RelativePath> | |
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> |
<!-- If the symbol is a dSYM bundle, it's a folder not a file. --> | ||
<_symbolIsFile Condition="'$(NativeSymbolExt)' == '.dSYM'">false</_symbolIsFile> | ||
<_symbolIsFile Condition="'$(_symbolIsFile)' == ''">true</_symbolIsFile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<!-- If the symbol is a dSYM bundle, it's a folder not a file. --> | |
<_symbolIsFile Condition="'$(NativeSymbolExt)' == '.dSYM'">false</_symbolIsFile> | |
<_symbolIsFile Condition="'$(_symbolIsFile)' == ''">true</_symbolIsFile> |
Fixes #108909
Needs more testing, but seems to work with a small repro so far.