Skip to content

Conversation

@vitek-karas
Copy link
Member

Simply passes the defines to the custom task. Had to add one feature define which was missing.

This is the dotnet/runtime part of the fix for dotnet/linker#1973.

Simply passes the defines to the custom task. Had to add one feature define which was missing.
@vitek-karas vitek-karas added area-Infrastructure-coreclr linkable-framework Issues associated with delivering a linker friendly framework labels Apr 20, 2021
@vitek-karas vitek-karas added this to the 6.0.0 milestone Apr 20, 2021
@vitek-karas vitek-karas requested a review from sbomer April 20, 2021 14:09
@vitek-karas vitek-karas self-assigned this Apr 20, 2021
@ghost
Copy link

ghost commented Apr 20, 2021

Tagging subscribers to 'linkable-framework': @eerhardt, @vitek-karas, @LakshanF, @sbomer
See info in area-owners.md if you want to be subscribed.

Issue Details

Simply passes the defines to the custom task. Had to add one feature define which was missing.

This is the dotnet/runtime part of the fix for dotnet/linker#1973.

Author: vitek-karas
Assignees: vitek-karas
Labels:

area-Infrastructure-coreclr, linkable-framework

Milestone: 6.0.0

@vitek-karas
Copy link
Member Author

This is currently blocked on the mono/linker counterpart which is in: dotnet/linker#1980

@vitek-karas vitek-karas added the blocked Issue/PR is blocked on something - see comments label Apr 20, 2021
@vitek-karas
Copy link
Member Author

I verified that on Linux all of the FEATURE_COMINTEROP sections are not included in the generated descriptor. On Windows the generated descriptor is identical to the one before the change.

<_RexcepFilePath Condition=" '$(_RexcepFilePath)' == '' ">$(MSBuildThisFileDirectory)..\vm\rexcep.h</_RexcepFilePath>
<_ILLinkDescriptorsIntermediatePath>$(IntermediateOutputPath)ILLink.Descriptors.Combined.xml</_ILLinkDescriptorsIntermediatePath>
<_DefineConstants>$(DefineConstants)</_DefineConstants>
<_DefineConstants Condition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'Checked'">$(DefineConstants);_DEBUG</_DefineConstants>
Copy link
Member

Choose a reason for hiding this comment

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

How come this isn't handled by the existing infrastructure?

Copy link
Member Author

Choose a reason for hiding this comment

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

Based on binlogs we only define DEBUG for managed code. _DEBUG seems to be only defined in native.

Copy link
Member

Choose a reason for hiding this comment

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

We should be able to just fix the corelib.h to use DEBUG instead of _DEBUG.

@eerhardt
Copy link
Member

This should contribute to #40336 (at a minimum). Will it completely solve it?

vitek-karas added a commit that referenced this pull request May 3, 2021
…corelib.

Basically a port of #51562 including changes as per PR feedback.
@vitek-karas
Copy link
Member Author

Changes from the PR including the feedback has been merged as part of the mono/linker update in #51921. It was just logistically easier to do than create an intermediate state where linker task is new and runtime is old and still make that work.

@vitek-karas vitek-karas closed this May 3, 2021
@vitek-karas vitek-karas deleted the IfdefsForLinkDescriptors branch May 3, 2021 21:08
@ghost ghost locked as resolved and limited conversation to collaborators Jun 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Infrastructure-coreclr blocked Issue/PR is blocked on something - see comments linkable-framework Issues associated with delivering a linker friendly framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants