Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Commit

Permalink
Fix rough edges after CLI update (#3983)
Browse files Browse the repository at this point in the history
* Move build-restore.cmd back to build-managed

buildpipeline needs to be updated to make this split

* Cleanup dir.props/dir.targets

* Add back VS clues

* Reformat whitespaces to match VS convention
  • Loading branch information
jkotas committed Jun 27, 2017
1 parent e3af35c commit 1b322c7
Show file tree
Hide file tree
Showing 9 changed files with 457 additions and 478 deletions.
8 changes: 0 additions & 8 deletions build.cmd
Expand Up @@ -36,14 +36,6 @@ exit /b %ERRORLEVEL%

:AfterNativeBuild

call %~dp0buildscripts\build-restore.cmd %*

IF NOT ERRORLEVEL 1 goto AfterRestoreBuild
echo Managed component build failed. Refer !__BuildLog! for details.
exit /b %ERRORLEVEL%

:AfterRestoreBuild

call %~dp0buildscripts\build-managed.cmd %*

IF NOT ERRORLEVEL 1 goto AfterManagedBuild
Expand Down
14 changes: 13 additions & 1 deletion buildscripts/build-managed.cmd
Expand Up @@ -30,15 +30,27 @@ exit /b %ERRORLEVEL%
rem Explicitly set Platform causes conflicts in managed project files. Clear it to allow building from VS x64 Native Tools Command Prompt
set Platform=

:: Restore the Tools directory
call "%__ProjectDir%\init-tools.cmd"

rem Tell nuget to always use repo-local nuget package cache. The "dotnet restore" invocations use the --packages
rem argument, but there are a few commands in publish and tests that do not.
set "NUGET_PACKAGES=%__PackagesDir%"

echo Using CLI tools version:
dir /b "%__DotNetCliPath%\sdk"

"%__DotNetCliPath%\dotnet.exe" msbuild "%__ProjectDir%\build.proj" /nologo /t:Restore /flp:v=normal;LogFile=build-restore.log /p:NuPkgRid=win7-x64 /maxcpucount /p:OSGroup=%__BuildOS% /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% %__ExtraMsBuildParams%
IF ERRORLEVEL 1 exit /b %ERRORLEVEL%

rem Buildtools tooling is not capable of publishing netcoreapp currently. Use helper projects to publish skeleton of
rem the standalone app that the build injects actual binaries into later.
"%__DotNetCliPath%\dotnet.exe" restore "%__SourceDir%\ILCompiler\netcoreapp\ilc.csproj" -r win7-x64
IF ERRORLEVEL 1 exit /b %ERRORLEVEL%
"%__DotNetCliPath%\dotnet.exe" publish "%__SourceDir%\ILCompiler\netcoreapp\ilc.csproj" -r win7-x64 -o "%__RootBinDir%\%__BuildOS%.%__BuildArch%.%__BuildType%\tools"
IF ERRORLEVEL 1 exit /b %ERRORLEVEL%

:: Set the environment for the managed build
:SetupManagedBuild
call "!VS%__VSProductVersion%COMNTOOLS!\VsDevCmd.bat"
echo Commencing build of managed components for %__BuildOS%.%__BuildArch%.%__BuildType%
echo.
Expand Down
46 changes: 0 additions & 46 deletions buildscripts/build-restore.cmd

This file was deleted.

3 changes: 1 addition & 2 deletions dir.props
Expand Up @@ -255,6 +255,5 @@
</PropertyGroup>

<!-- Use Roslyn Compilers to build -->
<Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false'" />
<Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)')" />
<Import Project="$(RoslynPropsFile)" Condition="Exists('$(RoslynPropsFile)')" />
</Project>
2 changes: 1 addition & 1 deletion dir.targets
Expand Up @@ -54,7 +54,7 @@
<NugetRuntimeIdentifier Condition="'$(NugetRuntimeIdentifier)' == ''">$(RuntimeIdentifiers)</NugetRuntimeIdentifier>
</PropertyGroup>

<Import Project="$(ToolsDir)/Build.Common.targets" />
<Import Project="$(ToolsDir)Build.Common.targets" Condition="Exists('$(ToolsDir)Build.Common.targets')" />

<!-- Override corefx multi targeting support -->
<Target Name="ConvertCommonMetadataToAdditionalProperties" BeforeTargets="AssignProjectConfiguration" />
Expand Down

0 comments on commit 1b322c7

Please sign in to comment.