Skip to content

Commit

Permalink
add automatic location of auto-generated definition file to build scr…
Browse files Browse the repository at this point in the history
…ipts (dotnet#4986)
  • Loading branch information
tonerdo committed Dec 27, 2017
1 parent 9f615d8 commit 0d17711
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ See the LICENSE file in the project root for more information.

<ItemGroup>
<LinkerArg Condition="$(NativeLib) == 'Shared'" Include="/DLL" />
<LinkerArg Condition="$(DefFile) != ''" Include="/DEF:$(DefFile)" />
<LinkerArg Include="@(NativeLibrary)" />
<LinkerArg Include="@(AdditionalNativeLibrary)" />
<LinkerArg Include="/NOLOGO /DEBUG /MANIFEST:NO" />
Expand Down
5 changes: 5 additions & 0 deletions src/BuildIntegration/Microsoft.NETCore.Native.targets
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ See the LICENSE file in the project root for more information.
<NativeObjectExt Condition="'$(TargetOS)' == 'Windows_NT'">.obj</NativeObjectExt>
<NativeObjectExt Condition="'$(TargetOS)' != 'Windows_NT'">.o</NativeObjectExt>
<NativeObjectExt Condition="'$(NativeCodeGen)' == 'wasm'">.bc</NativeObjectExt>

<LibFileExt Condition="'$(TargetOS)' == 'Windows_NT'">.lib</LibFileExt>
<LibFileExt Condition="'$(TargetOS)' != 'Windows_NT'">.a</LibFileExt>

Expand All @@ -48,7 +49,10 @@ See the LICENSE file in the project root for more information.
<NativeBinaryExt Condition="'$(OutputType)' != 'Exe' and '$(TargetOS)' != 'Windows_NT' and $(NativeLib) == 'Static'">.a</NativeBinaryExt>
<NativeBinaryExt Condition="'$(NativeCodeGen)' == 'wasm'">.html</NativeBinaryExt>

<NativeExportExt Condition="'$(OutputType)' != 'Exe' and '$(TargetOS)' == 'Windows_NT' and '$(NativeLib)' == 'Shared'">.def</NativeExportExt>

<NativeObject>$(NativeIntermediateOutputPath)$(TargetName)$(NativeObjectExt)</NativeObject>
<NativeExport>$(NativeIntermediateOutputPath)$(TargetName)$(NativeExportExt)</NativeExport>
<NativeBinary>$(NativeOutputPath)$(TargetName)$(NativeBinaryExt)</NativeBinary>

<IlcCompileOutput Condition="$(NativeCodeGen) == ''">$(NativeObject)</IlcCompileOutput>
Expand Down Expand Up @@ -193,6 +197,7 @@ See the LICENSE file in the project root for more information.
<CustomLinkerArg Include="$(NativeObject)" />
<CustomLinkerArg Include="-o $(NativeBinary)" Condition="'$(OS)' != 'Windows_NT'" />
<CustomLinkerArg Include="/OUT:$(NativeBinary)" Condition="'$(OS)' == 'Windows_NT'" />
<CustomLinkerArg Include="/DEF:$(NativeExport)" Condition="'$(OS)' == 'Windows_NT' and '$(NativeLib)' == 'Shared'" />
<CustomLinkerArg Include="@(LinkerArg)" />
</ItemGroup>

Expand Down

0 comments on commit 0d17711

Please sign in to comment.