Fix unset ZapRelocationType for fixup (#18589)
[platform/upstream/coreclr.git] / Tools / Build.Common.props
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3   <!--
4      This file will contain all of the common properties from most repos. The intention is to only have
5      repo specific properties inside the repos, and move to this file everything that is common.
6   -->
7
8   <!--
9     Import the reference assembly props
10
11       Sets Properties:
12         IsReferenceAssembly - Set if the project is in the ref assm path
13   -->
14   <Import Project="$(MSBuildThisFileDirectory)ReferenceAssemblies.props" Condition="'$(ExcludeReferenceAssembliesImport)'!='true'" />
15
16   <Import Project="$(MSBuildThisFileDirectory)RepoAPI.Mapping.props" />
17
18   <PropertyGroup>
19     <ChecksumAlgorithm>SHA256</ChecksumAlgorithm>
20   </PropertyGroup>
21
22   <PropertyGroup>
23     <GetNuGetPackageVersionsDependsOn>CreateVersionFileDuringBuild</GetNuGetPackageVersionsDependsOn>
24   </PropertyGroup>
25
26   <!-- Platform detection -->
27   <PropertyGroup>
28     <DefaultOSGroup Condition="'$(OS)'=='Unix' AND Exists('/Applications')">OSX</DefaultOSGroup>
29     <DefaultOSGroup Condition="'$(DefaultOSGroup)'=='' AND '$(OS)'=='Unix'">Linux</DefaultOSGroup>
30     <DefaultOSGroup Condition="'$(DefaultOSGroup)'==''">$(OS)</DefaultOSGroup>
31     <RunningOnUnix Condition="'$(OS)'!='Windows_NT'">true</RunningOnUnix>
32
33     <RunningOnCore Condition="'$(MSBuildRuntimeType)' == 'core'">true</RunningOnCore>
34   </PropertyGroup>
35
36   <!-- Common BuildTools properties -->
37   <PropertyGroup>
38     <ToolsDir Condition="'$(ToolsDir)'==''">$(MSBuildThisFileDirectory)</ToolsDir>
39     <ToolRuntimePath Condition="'$(ToolRuntimePath)'==''">$(ToolsDir)</ToolRuntimePath>
40     <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolRuntimePath)dotnetcli/</DotnetCliPath>
41     <OverrideToolHost Condition="'$(RunningOnUnix)' == 'true'">$(DotnetCliPath)dotnet</OverrideToolHost>
42     <OverrideToolHost Condition="'$(RunningOnUnix)' != 'true'">$(DotnetCliPath)dotnet.exe</OverrideToolHost>
43     <BuildToolsTaskDir Condition="'$(RunningOnCore)'!='true'">$(ToolsDir)net46/</BuildToolsTaskDir>
44     <BuildToolsTaskDir Condition="'$(RunningOnCore)'=='true'">$(ToolsDir)</BuildToolsTaskDir>
45     <RoslynIncompatibleMsbuildVersion Condition="'$(MSBuildToolsVersion)' == '2.0' OR
46                                                  '$(MSBuildToolsVersion)' == '3.5' OR
47                                                  '$(MSBuildToolsVersion)' == '4.0' OR
48                                                  '$(MSBuildToolsVersion)' == '12.0' OR
49                                                  '$(MSBuildToolsVersion)' == '14.0'">true</RoslynIncompatibleMsbuildVersion>
50     <!-- UseSharedCompilation is not supported in MSBuild 14.0 with the new version of roslyn, so make sure we are not using that for building -->
51     <UseSharedCompilation Condition="'$(UseSharedCompilation)' == '' and '$(UseRoslynCompilers)' != 'false' and '$(RoslynIncompatibleMsbuildVersion)' != 'true'">true</UseSharedCompilation>
52     <GenFacadesIgnoreBuildAndRevisionMismatch>true</GenFacadesIgnoreBuildAndRevisionMismatch>
53   </PropertyGroup>
54
55   <!-- Setting IsTestProject prior to Build.Common.targets -->
56   <PropertyGroup>
57     <IsTestProject Condition="'$(IsTestProject)'=='' And ($(MSBuildProjectFullPath.Contains('\tests\')) OR $(MSBuildProjectFullPath.Contains('/tests/')))">true</IsTestProject>
58   </PropertyGroup>
59
60   <Import Project="$(MSBuildThisFileDirectory)BuildVersion.targets" />
61
62   <Import Project="$(MSBuildThisFileDirectory)Roslyn.Common.props" Condition="'$(DisableBuildToolsRoslynVersion)' != 'true'" />
63
64   <!-- Restore commands -->
65   <PropertyGroup>
66     <DotnetToolCommand>$(OverrideToolHost)</DotnetToolCommand>
67     <DotnetRestoreSource>@(DotnetSourceList -> '--source %(Identity)', ' ')</DotnetRestoreSource>
68     <DotnetRestoreCommand>"$(DotnetToolCommand)"</DotnetRestoreCommand>
69     <DotnetRestoreCommand>$(DotnetRestoreCommand) restore</DotnetRestoreCommand>
70     <DotnetRestoreCommand>$(DotnetRestoreCommand) --packages "$(PackagesDir.TrimEnd('/').TrimEnd('\'))" $(DotnetRestoreSource)</DotnetRestoreCommand>
71     <DotnetRestoreCommand Condition="'$(NuGetConfigPath)'!=''">$(DotnetRestoreCommand) --configfile $(NuGetConfigPath)</DotnetRestoreCommand>
72
73     <!-- Keeping this for legacy reasons for now but should eliminate Dnu* eventually -->
74     <DnuRestoreCommand>$(DotnetRestoreCommand)</DnuRestoreCommand>
75   </PropertyGroup>
76
77   <!--
78     import the MicroBuild boot-strapper props (only relevant for shipping binaries)
79   -->
80   <Import Project="$(MSBuildThisFileDirectory)MicroBuild.Core.props" Condition="'$(IsTestProject)'!='true' AND Exists('$(MSBuildThisFileDirectory)MicroBuild.Core.props')" />
81 </Project>