From efe6eb40f450d419c19ddfe98792dded0b0f5029 Mon Sep 17 00:00:00 2001 From: Andon Andonov Date: Wed, 6 Dec 2017 16:39:56 -0800 Subject: [PATCH 1/8] ILCompiler Package Multi-Runtime Package Support --- buildpipeline/DotNet-CoreRT-Publish.json | 6 +- dir.props | 2 +- .../Microsoft.DotNet.ILCompiler.Common.props | 47 ++++++++ .../Microsoft.DotNet.ILCompiler.builds | 20 +++- .../Microsoft.DotNet.ILCompiler.pkgproj | 41 +++---- .../Microsoft.DotNet.ILCompiler.targets | 46 ++++++- .../linux/Microsoft.DotNet.ILCompiler.pkgproj | 12 ++ .../osx/Microsoft.DotNet.ILCompiler.pkgproj | 12 ++ .../win/Microsoft.DotNet.ILCompiler.pkgproj | 12 ++ .../BuildFrameworkNativeObjects.proj | 4 +- .../Microsoft.NETCore.Native.Publish.targets | 5 +- .../Microsoft.NETCore.Native.Unix.props | 84 +++++++------ .../Microsoft.NETCore.Native.Windows.props | 112 +++++++++--------- .../Microsoft.NETCore.Native.targets | 56 +++++++-- tests/src/Simple/PInvoke/PInvokeNative.exp | Bin 0 -> 6273 bytes 15 files changed, 316 insertions(+), 143 deletions(-) create mode 100644 pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.Common.props create mode 100644 pkg/Microsoft.DotNet.ILCompiler/linux/Microsoft.DotNet.ILCompiler.pkgproj create mode 100644 pkg/Microsoft.DotNet.ILCompiler/osx/Microsoft.DotNet.ILCompiler.pkgproj create mode 100644 pkg/Microsoft.DotNet.ILCompiler/win/Microsoft.DotNet.ILCompiler.pkgproj create mode 100644 tests/src/Simple/PInvoke/PInvokeNative.exp diff --git a/buildpipeline/DotNet-CoreRT-Publish.json b/buildpipeline/DotNet-CoreRT-Publish.json index ed451610e6d..3589bf04e90 100644 --- a/buildpipeline/DotNet-CoreRT-Publish.json +++ b/buildpipeline/DotNet-CoreRT-Publish.json @@ -94,7 +94,7 @@ "scriptType": "inlineScript", "scriptName": "", "arguments": "", - "inlineScript": "if ($env:Configuration -ne \"Release\") { exit }\n\n& $env:Build_SourcesDirectory\\scripts\\DotNet-Trusted-Publish\\Embed-Index.ps1 `\n $env:Pipeline_SourcesDirectory\\packages\\AzureTransfer\\Windows_NT.x64.$env:Configuration\\$env:AzureContainerSymbolPackageGlob `\n $env:Build_StagingDirectory\\IndexedSymbolPackages", + "inlineScript": "if ($env:Configuration -ne \"Release\") { exit }\n\n& $env:Build_SourcesDirectory\\scripts\\DotNet-Trusted-Publish\\Embed-Index.ps1 `\n $env:Pipeline_SourcesDirectory\\packages\\AzureTransfer\\$env:Configuration\\$env:AzureContainerSymbolPackageGlob `\n $env:Build_StagingDirectory\\IndexedSymbolPackages", "workingFolder": "", "failOnStandardError": "true" } @@ -152,7 +152,7 @@ "scriptType": "inlineScript", "scriptName": "", "arguments": "$(MyGetApiKey)", - "inlineScript": "param($ApiKey)\nif ($env:Configuration -ne \"Release\") { exit }\n& $env:CustomNuGetPath push $env:Pipeline_SourcesDirectory\\packages\\AzureTransfer\\Windows_NT.x64.$env:Configuration\\$env:AzureContainerPackageGlob $ApiKey -Source $env:MyGetFeedUrl -Timeout 3600", + "inlineScript": "param($ApiKey)\nif ($env:Configuration -ne \"Release\") { exit }\n& $env:CustomNuGetPath push $env:Pipeline_SourcesDirectory\\packages\\AzureTransfer\\$env:Configuration\\$env:AzureContainerPackageGlob $ApiKey -Source $env:MyGetFeedUrl -Timeout 3600", "workingFolder": "", "failOnStandardError": "true" } @@ -192,7 +192,7 @@ "scriptType": "inlineScript", "scriptName": "", "arguments": "-gitHubAuthToken $(UpdatePublishedVersions.AuthToken) -root $(Pipeline.SourcesDirectory)", - "inlineScript": "param($gitHubAuthToken, $root)\nif ($env:Configuration -ne \"Release\") { exit }\ncd $root\n. $root\\buildscripts\\UpdatePublishedVersions.ps1 `\n -gitHubUser dotnet-build-bot -gitHubEmail dotnet-build-bot@microsoft.com `\n -gitHubAuthToken $gitHubAuthToken `\n -versionsRepoOwner $env:VersionsRepoOwner -versionsRepo $env:VersionsRepo `\n -versionsRepoPath build-info/dotnet/$env:GitHubRepositoryName/$env:SourceBranch `\n -nupkgPath $root\\packages\\AzureTransfer\\Windows_NT.x64.$env:Configuration\\$env:AzureContainerPackageGlob", + "inlineScript": "param($gitHubAuthToken, $root)\nif ($env:Configuration -ne \"Release\") { exit }\ncd $root\n. $root\\buildscripts\\UpdatePublishedVersions.ps1 `\n -gitHubUser dotnet-build-bot -gitHubEmail dotnet-build-bot@microsoft.com `\n -gitHubAuthToken $gitHubAuthToken `\n -versionsRepoOwner $env:VersionsRepoOwner -versionsRepo $env:VersionsRepo `\n -versionsRepoPath build-info/dotnet/$env:GitHubRepositoryName/$env:SourceBranch `\n -nupkgPath $root\\packages\\AzureTransfer\\$env:Configuration\\$env:AzureContainerPackageGlob", "workingFolder": "", "failOnStandardError": "true" } diff --git a/dir.props b/dir.props index 5c78f0c1e3d..6e9f1a4f732 100644 --- a/dir.props +++ b/dir.props @@ -135,7 +135,7 @@ $(DotnetCliPath) - $(PackageOutputRoot)$(OSPlatformConfig)/ + $(PackageOutputRoot)$(BinDirConfiguration)/ $(PackageOutputPath)symbols/ diff --git a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.Common.props b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.Common.props new file mode 100644 index 00000000000..84364490584 --- /dev/null +++ b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.Common.props @@ -0,0 +1,47 @@ + + + + + + true + false + x64; + true + true + true + + + + + targets + + + tools + + + sdk + + + framework + + + + sdk + + + sdk + + + sdk + + + sdk + + + sdk + + + + + diff --git a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds index 841203881cb..e814a633bcf 100644 --- a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds +++ b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds @@ -1,12 +1,26 @@ + + OSX + + + $(OS) + win + linux + osx + + + + - Windows_NT - Linux - Mac + AnyOS + + + + diff --git a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj index a94ce651b38..ffe824f1e7c 100644 --- a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj +++ b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj @@ -5,44 +5,37 @@ false x64; true + true true true - + + true + - + + + + + + + build + targets - + + + tools - - sdk - - - framework - - - - sdk - - - sdk - - - sdk - - - sdk - - - sdk + + targets diff --git a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.targets b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.targets index 28e6f9aa7c1..051c9a8346c 100644 --- a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.targets +++ b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.targets @@ -1,7 +1,45 @@ - + - <_ILCompilerRootDir>$(MSBuildThisFileDirectory)../ - $(_ILCompilerRootDir)targets/ + false + <_ILCompilerPackageRootDir>$(MSBuildThisFileDirectory)../ + $(_ILCompilerPackageRootDir)targets/ + + + OSX + + + $(OS) + + win-x64 + linux-x64 + osx-x64 + + + + <_RuntimeILCompilerPackageName Condition="'$(TargetRuntimeIdentifier)' != ''">runtime.$(TargetRuntimeIdentifier).Microsoft.DotNet.ILCompiler + $(BuildIntegrationTargetsDir)$(_RuntimeILCompilerPackageName).targets + true + + + RunResolvePackageDependencies + ImportRuntimeILCompilerPackageTarget + SetupProperties + - + + + + + + + + + + + + + + + diff --git a/pkg/Microsoft.DotNet.ILCompiler/linux/Microsoft.DotNet.ILCompiler.pkgproj b/pkg/Microsoft.DotNet.ILCompiler/linux/Microsoft.DotNet.ILCompiler.pkgproj new file mode 100644 index 00000000000..ee248648040 --- /dev/null +++ b/pkg/Microsoft.DotNet.ILCompiler/linux/Microsoft.DotNet.ILCompiler.pkgproj @@ -0,0 +1,12 @@ + + + + + + linux-x64 + + + + + diff --git a/pkg/Microsoft.DotNet.ILCompiler/osx/Microsoft.DotNet.ILCompiler.pkgproj b/pkg/Microsoft.DotNet.ILCompiler/osx/Microsoft.DotNet.ILCompiler.pkgproj new file mode 100644 index 00000000000..da5cafaf13a --- /dev/null +++ b/pkg/Microsoft.DotNet.ILCompiler/osx/Microsoft.DotNet.ILCompiler.pkgproj @@ -0,0 +1,12 @@ + + + + + + osx-x64 + + + + + diff --git a/pkg/Microsoft.DotNet.ILCompiler/win/Microsoft.DotNet.ILCompiler.pkgproj b/pkg/Microsoft.DotNet.ILCompiler/win/Microsoft.DotNet.ILCompiler.pkgproj new file mode 100644 index 00000000000..433dc4652a6 --- /dev/null +++ b/pkg/Microsoft.DotNet.ILCompiler/win/Microsoft.DotNet.ILCompiler.pkgproj @@ -0,0 +1,12 @@ + + + + + + win-x64 + + + + + diff --git a/src/BuildIntegration/BuildFrameworkNativeObjects.proj b/src/BuildIntegration/BuildFrameworkNativeObjects.proj index 806b087f4cd..7c00d75614c 100644 --- a/src/BuildIntegration/BuildFrameworkNativeObjects.proj +++ b/src/BuildIntegration/BuildFrameworkNativeObjects.proj @@ -8,7 +8,9 @@ true - + + + + BeforeTargets="ComputeIlcCompileInputs" + DependsOnTargets="$(DynamicBuildPropertyDependencies)"> @@ -47,7 +48,7 @@ until we get a proper AOT NetCore app package. --> - + diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props b/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props index 76c280d9045..73b5dc44882 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props +++ b/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props @@ -21,44 +21,56 @@ See the LICENSE file in the project root for more information. $(CppCompilerAndLinker) ar + + + + + clang + clang-3.9 + $(CppCompilerAndLinker) + $(CppCompilerAndLinker) + ar + + - - - - - - - + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props b/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props index 41b0227a604..98d064a1362 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props +++ b/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props @@ -14,66 +14,66 @@ See the LICENSE file in the project root for more information. *********************************************************************************************** --> - + cl link lib + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.targets b/src/BuildIntegration/Microsoft.NETCore.Native.targets index ce276c89910..1cb97e3ceae 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/BuildIntegration/Microsoft.NETCore.Native.targets @@ -25,7 +25,10 @@ See the LICENSE file in the project root for more information. $(OS) - $(MSBuildThisFileDirectory)/.. + + + + $(MSBuildThisFileDirectory) @@ -64,11 +67,14 @@ See the LICENSE file in the project root for more information. $(FrameworkLibPath)\Framework$(LibFileExt) $(FrameworkLibPath)\libframework$(LibFileExt) + SetupProperties Compile;ComputeIlcCompileInputs $(IlcCompileDependsOn);BuildFrameworkLib + $(IlcCompileDependsOn);SetupWindowsProps + $(IlcCompileDependsOn);SetupUnixProps @@ -83,7 +89,31 @@ See the LICENSE file in the project root for more information. - + + + + + + $(RuntimePackagePath) + $(RuntimePackagePath)\tools\ILCompiler.Build.Tasks.dll + + + + + + + + + + + + + + + + + + @@ -95,13 +125,15 @@ See the LICENSE file in the project root for more information. BuildFrameworkLib is invoked before IlcCompile in multi-module builds to produce the shared framework library on demand --> - + - - + + + IntermediateOutputPath=$(IntermediateOutputPath); FrameworkLibPath=$(FrameworkLibPath); - FrameworkObjPath=$(FrameworkObjPath) + FrameworkObjPath=$(FrameworkObjPath); + RuntimePackagePath=$(RuntimePackagePath) @@ -136,8 +168,8 @@ See the LICENSE file in the project root for more information. - - + + + DependsOnTargets="$(CreateLibDependsOn);$(DynamicBuildPropertyDependencies)" + > - - - - + diff --git a/tests/src/Simple/PInvoke/PInvokeNative.exp b/tests/src/Simple/PInvoke/PInvokeNative.exp new file mode 100644 index 0000000000000000000000000000000000000000..16de11cc63eaa2aad1433a9da6248db930197bbd GIT binary patch literal 6273 zcmeI0U2GiH6~|9J350xl6DM&JCv0F790+D@ukCdjs1wJ=TO7xD?KIEterzrS=<=kV9nQv*cOOK!~ckVcD$QAu!TCvpslox?xA~W zJKaY+XeaHW-L!}HQYWQoAMK|uIzR{M5OvdGIzmUOhmO&4x}VZ?f*zm;DMKge6g@<} zbebNfN9YXA7OLycs+zHUdtLRZ4MpcG6{lqR>XKS>+)Wy{DwQRxv`XXGRcW1ir>^KM{(I&gxxJ_ z4EA%P{tJu5fN>XLd8|Pn!R{3`1^c+Dk6}ASO~XDRiV)^gqGn+~FKR2;K2h_qW1_Z$ z?H6?w_PnTFU|ph2SWX}Yb%Grbbq#i0R2SGmQDs;SiV1ldcls0+JG&HIs?`t>L%#$FYng+{=`X=n0 zs9CU+qTYn%q;1eV*eOxpf#uJ{psQdHiFylmL6iyBE9(2OS43R{J1y#M*e{AIgFP(j zhp_y48gw1(5mE2JJ|n6Ec1F~Du+NIBfpJw}&`)5$B+3Wt6ZLagQ`837W1@Zm`<$qo zU|CTgz;biYnNQdbC&&d@7(G1bYbQx+}`6UD%~j4_*rwoLryWR zDiVWJbxhBxyCr41s^)lR$#IqIn?6FcXL@eQEZS?eiZa6tM4VnR#jNYBAgrY)?TYf! zy&L)A(`NIkS8T6tRnkSjUbY>KRqM98VNP)Rthu(Q%q!#OyyH|n^HLGAKiAhk*f%ho z&5oK&cGaA6Jpbx&&fLI1a_g$(bUcRn6n02Y?t6hdfTIkG$1tBV80g9VC>*@AxMF0=yc-dME>;T&i#znzFXpWP5alnh?SQ+pj1xO;^4F?CzLQpJl zcb9afXy`(h!(<~@%Q@Yk94M1T1dr!%880UIemaG&>qSKmT>Ld_UtF-4BdF#Liws@{ z$I@nLfjlG&6a1P^vuTc!~lgE)fz*KIAiq;Qc*s|p}mbSx|2!w^k->PBmMMMjSSG&G%`r9Ya~bC)5s9Lqmf~HUn3** zJB{S&9~v2@ZO9cZJ2sG|LmKI)QyLkd5seJe6B@};K_f%-tVV`uRU;#GQzLo0t&vgs zcAN}m>0OQV(@!-rK)=z*ApKnB+Lv#Qsvt@qgclxlI3%hH!M z(oe5xWPsk%$RPbpBRTq`MuzC42H|H5okr_u)(IiQ7Xpp*SJVQMiMlujgnz|EEg%z7 z7sr5b^%=DesRW`PAA>RF78DRaM#2)H!7xwo>Y# Date: Fri, 15 Dec 2017 11:10:34 -0800 Subject: [PATCH 2/8] Remove extra binary --- tests/src/Simple/PInvoke/PInvokeNative.exp | Bin 6273 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 tests/src/Simple/PInvoke/PInvokeNative.exp diff --git a/tests/src/Simple/PInvoke/PInvokeNative.exp b/tests/src/Simple/PInvoke/PInvokeNative.exp deleted file mode 100644 index 16de11cc63eaa2aad1433a9da6248db930197bbd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6273 zcmeI0U2GiH6~|9J350xl6DM&JCv0F790+D@ukCdjs1wJ=TO7xD?KIEterzrS=<=kV9nQv*cOOK!~ckVcD$QAu!TCvpslox?xA~W zJKaY+XeaHW-L!}HQYWQoAMK|uIzR{M5OvdGIzmUOhmO&4x}VZ?f*zm;DMKge6g@<} zbebNfN9YXA7OLycs+zHUdtLRZ4MpcG6{lqR>XKS>+)Wy{DwQRxv`XXGRcW1ir>^KM{(I&gxxJ_ z4EA%P{tJu5fN>XLd8|Pn!R{3`1^c+Dk6}ASO~XDRiV)^gqGn+~FKR2;K2h_qW1_Z$ z?H6?w_PnTFU|ph2SWX}Yb%Grbbq#i0R2SGmQDs;SiV1ldcls0+JG&HIs?`t>L%#$FYng+{=`X=n0 zs9CU+qTYn%q;1eV*eOxpf#uJ{psQdHiFylmL6iyBE9(2OS43R{J1y#M*e{AIgFP(j zhp_y48gw1(5mE2JJ|n6Ec1F~Du+NIBfpJw}&`)5$B+3Wt6ZLagQ`837W1@Zm`<$qo zU|CTgz;biYnNQdbC&&d@7(G1bYbQx+}`6UD%~j4_*rwoLryWR zDiVWJbxhBxyCr41s^)lR$#IqIn?6FcXL@eQEZS?eiZa6tM4VnR#jNYBAgrY)?TYf! zy&L)A(`NIkS8T6tRnkSjUbY>KRqM98VNP)Rthu(Q%q!#OyyH|n^HLGAKiAhk*f%ho z&5oK&cGaA6Jpbx&&fLI1a_g$(bUcRn6n02Y?t6hdfTIkG$1tBV80g9VC>*@AxMF0=yc-dME>;T&i#znzFXpWP5alnh?SQ+pj1xO;^4F?CzLQpJl zcb9afXy`(h!(<~@%Q@Yk94M1T1dr!%880UIemaG&>qSKmT>Ld_UtF-4BdF#Liws@{ z$I@nLfjlG&6a1P^vuTc!~lgE)fz*KIAiq;Qc*s|p}mbSx|2!w^k->PBmMMMjSSG&G%`r9Ya~bC)5s9Lqmf~HUn3** zJB{S&9~v2@ZO9cZJ2sG|LmKI)QyLkd5seJe6B@};K_f%-tVV`uRU;#GQzLo0t&vgs zcAN}m>0OQV(@!-rK)=z*ApKnB+Lv#Qsvt@qgclxlI3%hH!M z(oe5xWPsk%$RPbpBRTq`MuzC42H|H5okr_u)(IiQ7Xpp*SJVQMiMlujgnz|EEg%z7 z7sr5b^%=DesRW`PAA>RF78DRaM#2)H!7xwo>Y# Date: Fri, 15 Dec 2017 11:54:18 -0800 Subject: [PATCH 3/8] Change OS-Detection and remove ProjectReferences from meta-package definition --- .../Microsoft.DotNet.ILCompiler.builds | 10 +++------- .../Microsoft.DotNet.ILCompiler.pkgproj | 8 +------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds index e814a633bcf..035fba9a026 100644 --- a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds +++ b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds @@ -2,13 +2,9 @@ - OSX - - - $(OS) - win - linux - osx + win + linux + osx diff --git a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj index ffe824f1e7c..edf447ae19c 100644 --- a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj +++ b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj @@ -13,13 +13,7 @@ - - - - - - - + build From 4113bc63032740abb1d56d789f37fd67acc8a158 Mon Sep 17 00:00:00 2001 From: Andon Andonov Date: Fri, 15 Dec 2017 15:25:01 -0800 Subject: [PATCH 4/8] Adding Formatting and Naming changes for clarity --- .../Microsoft.DotNet.ILCompiler.pkgproj | 4 +-- .../BuildFrameworkNativeObjects.proj | 4 +-- .../Microsoft.DotNet.ILCompiler.targets | 21 ++++++++-------- .../Microsoft.NETCore.Native.Publish.targets | 8 +++--- .../Microsoft.NETCore.Native.Unix.props | 2 +- .../Microsoft.NETCore.Native.Windows.props | 2 +- .../Microsoft.NETCore.Native.targets | 25 +++++++++---------- 7 files changed, 32 insertions(+), 34 deletions(-) rename {pkg/Microsoft.DotNet.ILCompiler => src/BuildIntegration}/Microsoft.DotNet.ILCompiler.targets (64%) diff --git a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj index edf447ae19c..a8b7a44b758 100644 --- a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj +++ b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj @@ -15,11 +15,11 @@ - + build - + targets diff --git a/src/BuildIntegration/BuildFrameworkNativeObjects.proj b/src/BuildIntegration/BuildFrameworkNativeObjects.proj index 7c00d75614c..8570bc9a5b4 100644 --- a/src/BuildIntegration/BuildFrameworkNativeObjects.proj +++ b/src/BuildIntegration/BuildFrameworkNativeObjects.proj @@ -9,8 +9,8 @@ - - + + false <_ILCompilerPackageRootDir>$(MSBuildThisFileDirectory)../ - $(_ILCompilerPackageRootDir)targets/ + $(_ILCompilerPackageRootDir)targets/ OSX @@ -11,30 +11,29 @@ $(OS) - win-x64 - linux-x64 - osx-x64 + win-x64 + linux-x64 + osx-x64 - <_RuntimeILCompilerPackageName Condition="'$(TargetRuntimeIdentifier)' != ''">runtime.$(TargetRuntimeIdentifier).Microsoft.DotNet.ILCompiler - $(BuildIntegrationTargetsDir)$(_RuntimeILCompilerPackageName).targets - true + runtime.$(IlcTargetRuntimeIdentifier).Microsoft.DotNet.ILCompiler + true RunResolvePackageDependencies - ImportRuntimeILCompilerPackageTarget - SetupProperties + ImportRuntimeILCompilerPackageTarget + SetupProperties - + - + diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.Publish.targets b/src/BuildIntegration/Microsoft.NETCore.Native.Publish.targets index 1da2ebd32c6..12743b911b9 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.Publish.targets +++ b/src/BuildIntegration/Microsoft.NETCore.Native.Publish.targets @@ -1,7 +1,7 @@ - $(MSBuildThisFileDirectory)..\tools\ILCompiler.Build.Tasks.dll + $(MSBuildThisFileDirectory)..\tools\ILCompiler.Build.Tasks.dll - - + + diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props b/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props index 73b5dc44882..5ed981fedd4 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props +++ b/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props @@ -31,7 +31,7 @@ See the LICENSE file in the project root for more information. $(CppCompilerAndLinker) ar - + diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props b/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props index 98d064a1362..2d943a99de2 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props +++ b/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props @@ -20,7 +20,7 @@ See the LICENSE file in the project root for more information. link lib - + diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.targets b/src/BuildIntegration/Microsoft.NETCore.Native.targets index 1cb97e3ceae..cad1db18e53 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/BuildIntegration/Microsoft.NETCore.Native.targets @@ -28,7 +28,7 @@ See the LICENSE file in the project root for more information. - $(MSBuildThisFileDirectory) + $(MSBuildThisFileDirectory) @@ -67,14 +67,13 @@ See the LICENSE file in the project root for more information. $(FrameworkLibPath)\Framework$(LibFileExt) $(FrameworkLibPath)\libframework$(LibFileExt) - SetupProperties + SetupProperties Compile;ComputeIlcCompileInputs $(IlcCompileDependsOn);BuildFrameworkLib - $(IlcCompileDependsOn);SetupWindowsProps - $(IlcCompileDependsOn);SetupUnixProps + $(IlcCompileDependsOn);SetupOSSpecificProps @@ -91,11 +90,11 @@ See the LICENSE file in the project root for more information. - + $(RuntimePackagePath) - $(RuntimePackagePath)\tools\ILCompiler.Build.Tasks.dll + $(RuntimePackagePath)\tools\ILCompiler.Build.Tasks.dll @@ -113,7 +112,7 @@ See the LICENSE file in the project root for more information. - + @@ -125,10 +124,10 @@ See the LICENSE file in the project root for more information. BuildFrameworkLib is invoked before IlcCompile in multi-module builds to produce the shared framework library on demand --> - + - + IntermediateOutputPath=$(IntermediateOutputPath); FrameworkLibPath=$(FrameworkLibPath); @@ -168,8 +167,8 @@ See the LICENSE file in the project root for more information. - - + + @@ -240,6 +239,6 @@ See the LICENSE file in the project root for more information. - + From f9802d875074a5c8cb26821ff67fe54f488ce0c0 Mon Sep 17 00:00:00 2001 From: Andon Andonov Date: Fri, 15 Dec 2017 15:50:23 -0800 Subject: [PATCH 5/8] Unify runtime-specific packages and move package build targets --- .../Microsoft.DotNet.ILCompiler.builds | 2 +- .../Microsoft.DotNet.ILCompiler.pkgproj | 10 +--------- .../Microsoft.DotNet.ILCompiler.pkgproj | 4 +++- .../linux/Microsoft.DotNet.ILCompiler.pkgproj | 12 ------------ .../osx/Microsoft.DotNet.ILCompiler.pkgproj | 12 ------------ .../Microsoft.DotNet.ILCompiler.targets | 4 ++-- .../Microsoft.NETCore.Native.targets | 2 +- 7 files changed, 8 insertions(+), 38 deletions(-) rename pkg/Microsoft.DotNet.ILCompiler/{win => TargetSpecific}/Microsoft.DotNet.ILCompiler.pkgproj (72%) delete mode 100644 pkg/Microsoft.DotNet.ILCompiler/linux/Microsoft.DotNet.ILCompiler.pkgproj delete mode 100644 pkg/Microsoft.DotNet.ILCompiler/osx/Microsoft.DotNet.ILCompiler.pkgproj diff --git a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds index 035fba9a026..c259278aa64 100644 --- a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds +++ b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds @@ -15,7 +15,7 @@ - + diff --git a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj index a8b7a44b758..ac7f6c2b1f4 100644 --- a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj +++ b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj @@ -15,22 +15,14 @@ - + build - - - targets - tools - - - targets - diff --git a/pkg/Microsoft.DotNet.ILCompiler/win/Microsoft.DotNet.ILCompiler.pkgproj b/pkg/Microsoft.DotNet.ILCompiler/TargetSpecific/Microsoft.DotNet.ILCompiler.pkgproj similarity index 72% rename from pkg/Microsoft.DotNet.ILCompiler/win/Microsoft.DotNet.ILCompiler.pkgproj rename to pkg/Microsoft.DotNet.ILCompiler/TargetSpecific/Microsoft.DotNet.ILCompiler.pkgproj index 433dc4652a6..380a672dc79 100644 --- a/pkg/Microsoft.DotNet.ILCompiler/win/Microsoft.DotNet.ILCompiler.pkgproj +++ b/pkg/Microsoft.DotNet.ILCompiler/TargetSpecific/Microsoft.DotNet.ILCompiler.pkgproj @@ -4,7 +4,9 @@ - win-x64 + win-x64 + linux-x64 + osx-x64 diff --git a/pkg/Microsoft.DotNet.ILCompiler/linux/Microsoft.DotNet.ILCompiler.pkgproj b/pkg/Microsoft.DotNet.ILCompiler/linux/Microsoft.DotNet.ILCompiler.pkgproj deleted file mode 100644 index ee248648040..00000000000 --- a/pkg/Microsoft.DotNet.ILCompiler/linux/Microsoft.DotNet.ILCompiler.pkgproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - linux-x64 - - - - - diff --git a/pkg/Microsoft.DotNet.ILCompiler/osx/Microsoft.DotNet.ILCompiler.pkgproj b/pkg/Microsoft.DotNet.ILCompiler/osx/Microsoft.DotNet.ILCompiler.pkgproj deleted file mode 100644 index da5cafaf13a..00000000000 --- a/pkg/Microsoft.DotNet.ILCompiler/osx/Microsoft.DotNet.ILCompiler.pkgproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - osx-x64 - - - - - diff --git a/src/BuildIntegration/Microsoft.DotNet.ILCompiler.targets b/src/BuildIntegration/Microsoft.DotNet.ILCompiler.targets index 0cf728a3daf..740cb42c50c 100644 --- a/src/BuildIntegration/Microsoft.DotNet.ILCompiler.targets +++ b/src/BuildIntegration/Microsoft.DotNet.ILCompiler.targets @@ -3,7 +3,7 @@ false <_ILCompilerPackageRootDir>$(MSBuildThisFileDirectory)../ - $(_ILCompilerPackageRootDir)targets/ + $(_ILCompilerPackageRootDir)build/ OSX @@ -40,5 +40,5 @@ - + diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.targets b/src/BuildIntegration/Microsoft.NETCore.Native.targets index cad1db18e53..a2cba426ac9 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/BuildIntegration/Microsoft.NETCore.Native.targets @@ -73,7 +73,7 @@ See the LICENSE file in the project root for more information. Compile;ComputeIlcCompileInputs $(IlcCompileDependsOn);BuildFrameworkLib - $(IlcCompileDependsOn);SetupOSSpecificProps + $(IlcCompileDependsOn);SetupOSSpecificProps From 17d1c0cb340c5b6335e7cca8b26e7e3af1f22a36 Mon Sep 17 00:00:00 2001 From: Andon Andonov Date: Fri, 15 Dec 2017 16:49:17 -0800 Subject: [PATCH 6/8] Use command-line arg RID and remove unnecessary files --- .../Microsoft.DotNet.ILCompiler.Common.props | 47 ------------------- .../Microsoft.DotNet.ILCompiler.builds | 9 +--- .../Microsoft.DotNet.ILCompiler.pkgproj | 45 ++++++++++++++++-- .../Microsoft.DotNet.ILCompiler.targets | 12 +---- 4 files changed, 44 insertions(+), 69 deletions(-) delete mode 100644 pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.Common.props diff --git a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.Common.props b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.Common.props deleted file mode 100644 index 84364490584..00000000000 --- a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.Common.props +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - true - false - x64; - true - true - true - - - - - targets - - - tools - - - sdk - - - framework - - - - sdk - - - sdk - - - sdk - - - sdk - - - sdk - - - - - diff --git a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds index c259278aa64..3c6ea9fc8ca 100644 --- a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds +++ b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds @@ -1,20 +1,13 @@ - - win - linux - osx - - - AnyOS - + diff --git a/pkg/Microsoft.DotNet.ILCompiler/TargetSpecific/Microsoft.DotNet.ILCompiler.pkgproj b/pkg/Microsoft.DotNet.ILCompiler/TargetSpecific/Microsoft.DotNet.ILCompiler.pkgproj index 380a672dc79..df63fb391a6 100644 --- a/pkg/Microsoft.DotNet.ILCompiler/TargetSpecific/Microsoft.DotNet.ILCompiler.pkgproj +++ b/pkg/Microsoft.DotNet.ILCompiler/TargetSpecific/Microsoft.DotNet.ILCompiler.pkgproj @@ -1,5 +1,3 @@ - @@ -9,6 +7,47 @@ osx-x64 - + + + true + false + x64; + true + true + true + + + + + targets + + + tools + + + sdk + + + framework + + + + sdk + + + sdk + + + sdk + + + sdk + + + sdk + + + + diff --git a/src/BuildIntegration/Microsoft.DotNet.ILCompiler.targets b/src/BuildIntegration/Microsoft.DotNet.ILCompiler.targets index 740cb42c50c..635f40e9845 100644 --- a/src/BuildIntegration/Microsoft.DotNet.ILCompiler.targets +++ b/src/BuildIntegration/Microsoft.DotNet.ILCompiler.targets @@ -4,20 +4,10 @@ false <_ILCompilerPackageRootDir>$(MSBuildThisFileDirectory)../ $(_ILCompilerPackageRootDir)build/ - - - OSX - - - $(OS) - win-x64 - linux-x64 - osx-x64 - - runtime.$(IlcTargetRuntimeIdentifier).Microsoft.DotNet.ILCompiler + runtime.$(RuntimeIdentifier).Microsoft.DotNet.ILCompiler true From 7c36fb08b00cb51948f3033d52842c4a39ffb11e Mon Sep 17 00:00:00 2001 From: Andon Andonov Date: Fri, 15 Dec 2017 17:17:21 -0800 Subject: [PATCH 7/8] Respond to PR feedback --- .../BuildFrameworkNativeObjects.proj | 2 +- .../Microsoft.DotNet.ILCompiler.targets | 4 +--- .../Microsoft.NETCore.Native.targets | 12 ++++-------- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/BuildIntegration/BuildFrameworkNativeObjects.proj b/src/BuildIntegration/BuildFrameworkNativeObjects.proj index 8570bc9a5b4..6affd6d3ef5 100644 --- a/src/BuildIntegration/BuildFrameworkNativeObjects.proj +++ b/src/BuildIntegration/BuildFrameworkNativeObjects.proj @@ -9,7 +9,7 @@ - + false - <_ILCompilerPackageRootDir>$(MSBuildThisFileDirectory)../ - $(_ILCompilerPackageRootDir)build/ - + runtime.$(RuntimeIdentifier).Microsoft.DotNet.ILCompiler diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.targets b/src/BuildIntegration/Microsoft.NETCore.Native.targets index a2cba426ac9..96bd5d50927 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/BuildIntegration/Microsoft.NETCore.Native.targets @@ -25,10 +25,6 @@ See the LICENSE file in the project root for more information. $(OS) - - - - $(MSBuildThisFileDirectory) @@ -127,7 +123,7 @@ See the LICENSE file in the project root for more information. - + IntermediateOutputPath=$(IntermediateOutputPath); FrameworkLibPath=$(FrameworkLibPath); @@ -167,8 +163,8 @@ See the LICENSE file in the project root for more information. - - + + - + From c65eb32f357572982dbccdc9397f85b9d8cb2fdf Mon Sep 17 00:00:00 2001 From: Andon Andonov Date: Fri, 15 Dec 2017 17:23:41 -0800 Subject: [PATCH 8/8] Rename + add comments --- src/BuildIntegration/Microsoft.DotNet.ILCompiler.targets | 8 ++++---- .../Microsoft.NETCore.Native.Windows.props | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/BuildIntegration/Microsoft.DotNet.ILCompiler.targets b/src/BuildIntegration/Microsoft.DotNet.ILCompiler.targets index 748e02e421f..0009363a3e9 100644 --- a/src/BuildIntegration/Microsoft.DotNet.ILCompiler.targets +++ b/src/BuildIntegration/Microsoft.DotNet.ILCompiler.targets @@ -9,17 +9,17 @@ true - RunResolvePackageDependencies - ImportRuntimeILCompilerPackageTarget + RunResolvePackageDependencies + ImportRuntimeIlcPackageTarget SetupProperties - + - + diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props b/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props index 2d943a99de2..2214b342372 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props +++ b/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props @@ -14,12 +14,14 @@ See the LICENSE file in the project root for more information. *********************************************************************************************** --> - cl link lib + + +