Skip to content

Commit

Permalink
Fix build on macOS
Browse files Browse the repository at this point in the history
Commit migrated from dotnet/core-setup@09d46b8
  • Loading branch information
dagood committed Jul 2, 2019
1 parent 8d3432a commit 11236b8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
10 changes: 8 additions & 2 deletions src/installer/corehost/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@
<BuildArgs Condition="'$(StripSymbols)' == 'true'">$(BuildArgs) --stripsymbols</BuildArgs>
</PropertyGroup>

<!--
Use IgnoreStandardErrorWarningFormat because Arcade sets WarnAsError and there's an existing
warning in the macOS build when dsymutil tries to strip symbols.
-->
<Message Text="$(MSBuildProjectDirectory)\build.sh $(BuildArgs)" Importance="High"/>
<Exec Command="$(MSBuildProjectDirectory)\build.sh $(BuildArgs)" />
<Exec Command="$(MSBuildProjectDirectory)\build.sh $(BuildArgs)" IgnoreStandardErrorWarningFormat="true"/>
</Target>

<Target Name="BuildCoreHostWindows"
Expand Down Expand Up @@ -69,7 +73,9 @@
AssemblyName=%(HostFiles.FileDescription);
NativeVersionFile=$(IntermediateOutputRootPath)hostResourceFiles\%(HostFiles.Identity)\version_info.h"
Targets="GenerateNativeVersionFile"
Condition="'$(IncrementalNativeBuild)' != 'true'"/>
Condition="
'$(IncrementalNativeBuild)' != 'true' or
!Exists('$(IntermediateOutputRootPath)hostResourceFiles\%(HostFiles.Identity)\version_info.h')"/>

<PropertyGroup>
<BuildArgs>$(ConfigurationGroup) $(TargetArchitecture) apphostver $(AppHostVersion) hostver $(HostVersion) fxrver $(HostResolverVersion) policyver $(HostPolicyVersion) commit $(LatestCommit) rid $(OutputRid)</BuildArgs>
Expand Down
20 changes: 13 additions & 7 deletions src/installer/pkg/packaging-tools/framework.dependency.targets
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
<_jitPackageDir>$(PackagesDir)transport.runtime.$(PackageRID).microsoft.netcore.jit/$(MicrosoftNETCoreRuntimeCoreCLRPackageVersion)/</_jitPackageDir>
<_corefxPackageDir>$(PackagesDir)runtime.$(PackageRID).$(MicrosoftPrivateCoreFxNETCoreAppPackage.ToLowerInvariant())/$(MicrosoftPrivateCoreFxNETCoreAppPackageVersion)/</_corefxPackageDir>
<_winmdPackageDir>$(PackagesDir)$(MicrosoftTargetingPackPrivateWinRTPackage.ToLowerInvariant())/$(MicrosoftTargetingPackPrivateWinRTPackageVersion)/</_winmdPackageDir>
<_diaSymReaderPackageDir>$(PackagesDir)microsoft.diasymreader.native/$(MicrosoftDiaSymReaderNativePackageVersion)/</_diaSymReaderPackageDir>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -146,6 +147,7 @@
<_runtimeJIT Include="$(_jitPackageDir)**/$(LibraryFilePrefix)clrjit$(LibraryFileExtension)" />
<_fxSystemRuntime Include="$(_corefxPackageDir)**/System.Runtime.dll" />
<_windowsWinMD Include="$(_winmdPackageDir)**/Windows.winmd" />
<_diaSymReaderAssembly Include="$(_diaSymReaderPackageDir)**\Microsoft.DiaSymReader.Native.*.dll" />
</ItemGroup>

<PropertyGroup Condition="'@(_runtimeCLR)' != ''">
Expand All @@ -169,9 +171,13 @@
<PropertyGroup Condition="'@(_windowsWinMD)' != ''">
<_windowsWinMDDirectory>%(_windowsWinMD.RootDir)%(_windowsWinMD.Directory)</_windowsWinMDDirectory>
</PropertyGroup>


<PropertyGroup Condition="'@(_diaSymReaderAssembly)' != ''">
<_diaSymReaderToolDir>%(_diaSymReaderAssembly.RootDir)%(_diaSymReaderAssembly.Directory)</_diaSymReaderToolDir>
</PropertyGroup>

<ItemGroup>
<_requiredProperty Include="_coreLibDirectory;_crossGenPath;_jitPath;_fxLibDirectory;_windowsWinMDDirectory" />
<_requiredProperty Include="_coreLibDirectory;_crossGenPath;_jitPath;_fxLibDirectory;_windowsWinMDDirectory;_diaSymReaderToolDir" />
</ItemGroup>

<Message Text="%(_requiredProperty.Identity): $(%(_requiredProperty.Identity))" />
Expand Down Expand Up @@ -228,7 +234,7 @@
'%(RidSpecificFilesToPackage.DestinationSubDirectory)' == '' AND
(
'%(FileName)' != 'System.Runtime.WindowsRuntime' Or
'$(OsEnvironment)'=='Windows_NT'
'$(OS)'=='Windows_NT'
)">
<CrossGenedDirectory>$(CrossGenOutputPath)%(TargetPath)/</CrossGenedDirectory>
<CrossGenedPath>$(CrossGenOutputPath)%(TargetPath)/%(FileName)%(Extension)</CrossGenedPath>
Expand Down Expand Up @@ -273,7 +279,7 @@
<_crossGenArgs Include="-in %(_filesToCrossGen.FullPath)" />
<_crossGenArgs Include="-out %(_filesToCrossGen.CrossGenedPath)" />
<_crossGenArgs Include="-platform_assemblies_paths $(_crossgenPlatformAssemblies)" />
<_crossGenArgs Include="-Platform_Winmd_Paths $(_windowsWinMDDirectory)" Condition="'$(OsEnvironment)'=='Windows_NT'" />
<_crossGenArgs Include="-Platform_Winmd_Paths $(_windowsWinMDDirectory)" Condition="'$(OS)'=='Windows_NT'" />
<_crossGenArgs Include="-JITPath $(_jitPath)" />
</ItemGroup>

Expand All @@ -298,7 +304,7 @@
-->
<Exec
Command="$(_crossGenPath) @$(_crossGenResponseFile)"
WorkingDirectory="$(_clrDirectory)"
WorkingDirectory="$(_diaSymReaderToolDir)"
EnvironmentVariables="COMPlus_PartialNGen=$(_partialCrossgenFlag)"
IgnoreStandardErrorWarningFormat="true" />
</Target>
Expand All @@ -318,7 +324,7 @@
<ItemGroup>
<_crossGenSymbolsArgs Include="-readytorun" />
<_crossGenSymbolsArgs Include="-platform_assemblies_paths %(_filesToCrossGen.CrossGenedDirectory)$(_pathSeparatorEscaped)$(_coreLibDirectory)$(_pathSeparatorEscaped)$(_fxLibDirectory)" />
<_crossGenSymbolsArgs Include="-Platform_Winmd_Paths $(_windowsWinMDDirectory)" Condition="'$(OsEnvironment)'=='Windows_NT'"/>
<_crossGenSymbolsArgs Include="-Platform_Winmd_Paths $(_windowsWinMDDirectory)" Condition="'$(OS)'=='Windows_NT'"/>
<_crossGenSymbolsArgs Include="-$(_crossGenSymbolsOptionName)" />
<_crossGenSymbolsArgs Include="$(_crossGenSymbolsOutputDirectory)" />
<_crossGenSymbolsArgs Include="%(_filesToCrossGen.CrossGenedPath)" />
Expand All @@ -331,7 +337,7 @@

<Exec
Command="$(_crossGenPath) @$(_crossGenSymbolsResponseFile)"
WorkingDirectory="$(_clrDirectory)"
WorkingDirectory="$(_diaSymReaderToolDir)"
EnvironmentVariables="COMPlus_PartialNGen=0" />

<Touch Files="%(_filesToCrossGen.CrossGenSymbolSemaphorePath)" AlwaysCreate="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
<ItemGroup>
<PkgProjectReference Include="..\pkg\legacy\Microsoft.NETCore.App.Internal.pkgproj" />
<PkgProjectReference Include="..\pkg\legacy\Microsoft.NETCore.App.pkgproj" />
<PkgProjectReference Include="..\..\Microsoft.NETCore.DotNetAppHost\Microsoft.NETCore.DotNetAppHost.pkgproj" />
<PkgProjectReference Include="..\..\Microsoft.NETCore.DotNetHost\Microsoft.NETCore.DotNetHost.pkgproj" />
<PkgProjectReference Include="..\..\Microsoft.NETCore.DotNetHostPolicy\Microsoft.NETCore.DotNetHostPolicy.pkgproj" />
<PkgProjectReference Include="..\..\Microsoft.NETCore.DotNetHostResolver\Microsoft.NETCore.DotNetHostResolver.pkgproj" />
</ItemGroup>

<!--
Expand Down

0 comments on commit 11236b8

Please sign in to comment.