Use macro rather than manually setting thumb bit in debugger.cpp
[platform/upstream/coreclr.git] / build.proj
index 7325e6f..1a633a6 100644 (file)
@@ -11,6 +11,8 @@
 
   <Import Project="dir.traversal.targets" />
 
 
   <Import Project="dir.traversal.targets" />
 
+  <Import Project="$(ToolsDir)clean.targets" />
+
   <!-- The following properties are in place to keep the behavior of build.cmd while we work on the dev workflow steps. -->
   <PropertyGroup>
     <!-- To disable the restoration of packages, set RestoreDuringBuild=false or pass /p:RestoreDuringBuild=false.-->
   <!-- The following properties are in place to keep the behavior of build.cmd while we work on the dev workflow steps. -->
   <PropertyGroup>
     <!-- To disable the restoration of packages, set RestoreDuringBuild=false or pass /p:RestoreDuringBuild=false.-->
     <Delete Files="$(BinDir)System.Private.CoreLib.*" />
   </Target>
 
     <Delete Files="$(BinDir)System.Private.CoreLib.*" />
   </Target>
 
-  <PropertyGroup>
-    <OptDataProjectJson>$(SourceDir).nuget/optdata/project.json</OptDataProjectJson>
-    <OptDataPackageFeed>https://dotnet.myget.org/F/dotnet-core-optimization-data/api/v3/index.json</OptDataPackageFeed>
-  </PropertyGroup>
-  <Target Name="RestoreOptData">
-    <Exec Condition="Exists('$(OptDataProjectJson)')" Command="$(DnuRestoreCommand) &quot;$(OptDataProjectJson)&quot; --source &quot;$(OptDataPackageFeed)&quot;" />
-  </Target>
-
   <!--
     BuildTools will conditionally restore additional packages, including IBC tools, using the "RestoreOptionalToolingPackages"
     target, which runs automatically before "Sync". Since no "Sync" target actually exists, go ahead and define one now so that
     the tools are fetched before "Build".
   -->
   <!--
     BuildTools will conditionally restore additional packages, including IBC tools, using the "RestoreOptionalToolingPackages"
     target, which runs automatically before "Sync". Since no "Sync" target actually exists, go ahead and define one now so that
     the tools are fetched before "Build".
   -->
-  <Target Name="Sync" BeforeTargets="Build" />
+  <Target Name="Sync" BeforeTargets="Build"
+    DependsOnTargets="RestoreOptData;RestoreNETCorePlatforms" />
+
+  <Target Name="RestoreOptData" Condition="'$(RestoreDuringBuild)'=='true' and '$(BuildType)'=='Release'">
+    <PropertyGroup>
+      <_OptimizationDataFeed Condition="'$(DotNetBuildOffline)' != 'true'">--source https://dotnet.myget.org/F/dotnet-core-optimization-data/api/v3/index.json</_OptimizationDataFeed>
+    </PropertyGroup>
 
 
-  <Target Name="RestoreNETCorePlatforms" AfterTargets="Build" Condition="'$(RestoreDuringBuild)'=='true'">
+    <Exec Command="$(DotnetRestoreCommand) $(_OptimizationDataFeed) $(SourceDir).nuget/optdata/optdata.csproj"
+          StandardOutputImportance="Low" />
+  </Target>
+
+  <Target Name="RestoreNETCorePlatforms" Condition="'$(RestoreDuringBuild)'=='true'">
     <Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/init/init.csproj"
           StandardOutputImportance="Low" />
   </Target>
     <Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/init/init.csproj"
           StandardOutputImportance="Low" />
   </Target>
-  
+
+  <Target Name="CleanAllProjects">
+    <Message Condition="Exists($(RootBinDir))" Importance="High" Text="Removing $(RootBinDir)"/>
+    <RemoveDir Directories="$(RootBinDir)" />
+  </Target>
+
 </Project>
 </Project>