Add support for ifdefs when generating link descriptor#51562
Add support for ifdefs when generating link descriptor#51562vitek-karas wants to merge 2 commits intodotnet:mainfrom
Conversation
Simply passes the defines to the custom task. Had to add one feature define which was missing.
|
Tagging subscribers to 'linkable-framework': @eerhardt, @vitek-karas, @LakshanF, @sbomer Issue DetailsSimply 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.
|
|
This is currently blocked on the mono/linker counterpart which is in: dotnet/linker#1980 |
|
I verified that on Linux all of the |
| <_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> |
There was a problem hiding this comment.
How come this isn't handled by the existing infrastructure?
There was a problem hiding this comment.
Based on binlogs we only define DEBUG for managed code. _DEBUG seems to be only defined in native.
There was a problem hiding this comment.
We should be able to just fix the corelib.h to use DEBUG instead of _DEBUG.
|
This should contribute to #40336 (at a minimum). Will it completely solve it? |
…corelib. Basically a port of #51562 including changes as per PR feedback.
|
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. |
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.