Add crossgen2.tar.gz file and remove circular dependency issue
[platform/core/dotnet/build-tools.git] / targets / Tizen.Pre.Compiled.targets
1 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2   <Target Name="PreCompiled"
3           AfterTargets="_TizenPrepareTpkPackage"
4           BeforeTargets="TizenPrepareCertificate"
5           Condition="'$(TizenGBSBuildArch)' !=''">
6
7     <PropertyGroup>
8       <TpkRootPath>$(OutputPath)tpkroot/</TpkRootPath>
9       <BinPath>$(TpkRootPath)bin/</BinPath>
10       <LibPath>$(TpkRootPath)lib/</LibPath>
11       <BinNativeImagePath>$(BinPath).native_image/</BinNativeImagePath>
12       <LibNativeImagePath>$(LibPath).native_image/</LibNativeImagePath>
13     </PropertyGroup>
14
15     <Exec Command ="find $(BinPath) -maxdepth 1 -name '*.dll'" ConsoleToMSBuild="true" >
16       <Output TaskParameter="ConsoleOutput" ItemName="DllListOfBin" />
17     </Exec>
18     <Exec Command ="find $(LibPath) -maxdepth 1 -name '*.dll'" ConsoleToMSBuild="true" >
19       <Output TaskParameter="ConsoleOutput" ItemName="DllListOfLib" />
20     </Exec>
21     <Exec Command ="find $(BinPath) -maxdepth 1 -name '*.pdb'" ConsoleToMSBuild="true" >
22       <Output TaskParameter="ConsoleOutput" ItemName="PdbListOfBin" />
23     </Exec>
24     <Exec Command ="find $(LibPath) -maxdepth 1 -name '*.pdb'" ConsoleToMSBuild="true" >
25       <Output TaskParameter="ConsoleOutput" ItemName="PdbListOfLib" />
26     </Exec>
27
28     <Exec Command="mkdir $(BinNativeImagePath)" Condition="@(DllListOfBin->Count()) != 0 OR @(PdbListOfBin->Count()) != 0" />
29     <Exec Command="mkdir $(LibNativeImagePath)" Condition="@(DllListOfLib->Count()) != 0 OR @(PdbListOfLib->Count()) != 0" />
30
31     <Exec Command="crossgen2 --jitpath /usr/share/dotnet-build-tools/sdk/crossgen2/libclrjit_unix_$(TizenGBSBuildArch)_x64.so --targetarch $(TizenGBSBuildArch) -o $(BinNativeImagePath)%(DllListOfBin.Filename).ni%(DllListOfBin.Extension) --resilient --Ot -r:/usr/share/dotnet.tizen/netcoreapp/*.dll -r:/usr/share/dotnet.tizen/framework/*.dll -r:$(IntermediateOutputPath)crossgen2/ref/*.dll %(DllListOfBin.Identity)" EnvironmentVariables="DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1" Condition="'$(TizenGBSBuildArch)' != '' and '%(DllListOfBin.Identity)' != ''" />
32     <Exec Command="crossgen2 --jitpath /usr/share/dotnet-build-tools/sdk/crossgen2/libclrjit_unix_$(TizenGBSBuildArch)_x64.so --targetarch $(TizenGBSBuildArch) -o $(LibNativeImagePath)%(DllListOfLib.Filename).ni%(DllListOfLib.Extension) --resilient --Ot -r:/usr/share/dotnet.tizen/netcoreapp/*.dll -r:/usr/share/dotnet.tizen/framework/*.dll -r:$(IntermediateOutputPath)crossgen2/ref/*.dll %(DllListOfLib.Identity)" EnvironmentVariables="DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1" Condition="'$(TizenGBSBuildArch)' != '' and '%(DllListOfLib.Identity)' != ''" />
33
34     <Exec Command="cp %(PdbListOfBin.Identity) $(BinNativeImagePath)" Condition="'%(PdbListOfBin.Identity)' != ''" />
35     <Exec Command="cp %(PdbListOfLib.Identity) $(LibNativeImagePath)" Condition="'%(PdbListOfLib.Identity)' != ''" />
36
37     <Exec Command="touch $(BinPath)._TIZEN_DOTNET_PRE_COMPILED_PACKAGE" />
38   </Target>
39 </Project>