Skip to content

Commit

Permalink
Make LargeAddressAware incremental (dotnet#1658)
Browse files Browse the repository at this point in the history
Unfortunately, we have two processes that run in sequence to modify the
output binary in place. This can happen:

* Initial compile
* First editbin
* First OpenSourceSign
* Second compile (skipped, up to date)
* Second editbin (runs, wasn't incremental before this commit)
* Second OpenSourceSign (runs, prior step makes it appear out of date)

The last OpenSourceSign then complains "this assembly is already
signed", breaking the build.

Fixes dotnet#1657 by treating editbin + OpenSourceSign as a unit for purposes
of incrementality.
  • Loading branch information
rainersigwald authored Feb 2, 2017
1 parent f354022 commit 754c9d1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dir.targets
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,15 @@
</PropertyGroup>
</Target>

<!-- We want this target to be incremental, but editbin affects the file in place, as does
OpenSourceSign. So run this target when the assembly has been updated since the last
time it was signed. Signing will run immediately after this, flipping another bit and
dropping the marker file. -->
<Target Name="EditBin"
AfterTargets="CoreCompile"
BeforeTargets="OpenSourceSign"
Inputs="@(IntermediateAssembly)"
Outputs="@(IntermediateAssembly->'%(Identity).oss_signed')"
Condition="'$(FullFrameworkBuild)' == 'true' and '$(PlatformTarget)' == 'x86'">
<PropertyGroup>
<!-- Native equivalent is /LARGEADDRESSAWARE on the linker -->
Expand Down

0 comments on commit 754c9d1

Please sign in to comment.