Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SimpleTest.targets « Simple « src « tests - github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9a018e7eb5ed0714b3252905a83f53cbe9fde069 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<Project DefaultTargets="LinkNative" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />

  <PropertyGroup>
    <OutputType Condition="'$(OutputType)' == ''">Exe</OutputType>
    <OutputPath>$(MSBuildProjectDirectory)\bin\$(Configuration)\$(Platform)\</OutputPath>
    <IntermediateOutputPath>$(MSBuildProjectDirectory)\obj\$(Configuration)\$(Platform)\</IntermediateOutputPath>
    <DebugType Condition="'$(DebugType)' == ''">portable</DebugType>
  </PropertyGroup>

  <PropertyGroup>
    <CopyNuGetImplementations>false</CopyNuGetImplementations>
    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <TargetFrameworkIdentifier>.NETCoreApp</TargetFrameworkIdentifier>
    <TargetFramework>netcoreapp2.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NETCore.App">
      <Version>$(MicrosoftNETCoreAppPackageVersion)</Version>
    </PackageReference>
  </ItemGroup>

  <!-- Reuse restored assets from the repro project -->
  <PropertyGroup>
    <RestoreOutputPath>$(IntermediateOutputRootPath)\repro</RestoreOutputPath>
  </PropertyGroup>

  <!--
    When building a library as a reference, the returned build outputs include both the 
    IL assembly produced by CSC and the native obj produced by Ilc. Separate the native
    object file here so it isn't passed to CSC, and instead redirect it to be picked up
    by the LinkNative target.
  -->
  <Target Name="RemoveObjFiles" AfterTargets="ResolveProjectReferences" Condition="'$(IlcMultiModule)' == 'true'">
    <ItemGroup>
        <ObjFiles Include="@(_ResolvedProjectReferencePaths)" Condition="'%(Extension)' == '.obj' or '%(Extension)' == '.bc'" />
        <LinkerArg Include="@(_ResolvedProjectReferencePaths)" Condition="'%(Extension)' == '.obj'" />
        <IlcReference Include="@(_ResolvedProjectReferencePaths)" Condition="'%(Extension)' == '.dll'" />
        <_ResolvedProjectReferencePaths Remove="@(ObjFiles)" />
    </ItemGroup>
  </Target>
  
  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />

  <Import Project="$(IlcPath)\build\Microsoft.NETCore.Native.targets" />

  <ItemGroup>
    <CustomLinkerArg Include="$(AdditionalLinkerFlags)" />
  </ItemGroup>

  <PropertyGroup>
    <DefineConstants Condition="'$(IlcMultiModule)' == 'true'">MULTIMODULE_BUILD;$(DefineConstants)</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
    <IlcArg Include="--targetarch=$(Platform)" />
    <IlcArg Include="--stacktracedata" />
  </ItemGroup>

</Project>