-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit to populate CoreCLR repo
[tfs-changeset: 1407945] Commit migrated from dotnet/coreclr@ef1e2ab
- Loading branch information
0 parents
commit 2024b63
Showing
7,745 changed files
with
2,769,137 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Localization Specific Metadata | ||
_________________________________________________________ | ||
Copyright (C) Microsoft Corporation. All rights reserved. | ||
--> | ||
<Project DefaultTargets="Localize" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<RunFromAll>true</RunFromAll> | ||
</PropertyGroup> | ||
<!--When running from a top-level project $(RunFromMaster) = true--> | ||
<Import Project="$(_NTBINDIR)\tools\devdiv\loc\Loctask\Localization.settings.targets" Condition=" '$(RunFromMaster)' == '' " /> | ||
|
||
<ImportGroup Condition="'$(ProductGroupsToBuild)' == '' or '$(ProductGroupsToBuild)' == 'FX' or | ||
'$(ProductGroupsToBuild)' == 'VS;FX' or '$(ProductGroupsToBuild)' == 'FX;VS'" > | ||
<Import Project="LocProjects\caspol.exe.locproj" /> | ||
<Import Project="LocProjects\corperfmonsymbols.ini.locproj" /> | ||
<Import Project="LocProjects\CustomMarshalers.dll.locproj" /> | ||
<Import Project="LocProjects\flogvwrc.dll.locproj" /> | ||
<Import Project="LocProjects\gacutlrc.dll.locproj" /> | ||
<Import Project="LocProjects\IlDasmrc.dll.locproj" /> | ||
<Import Project="LocProjects\mscoreeis.dll.locproj" /> | ||
<Import Project="LocProjects\mscorees_unsigned.dll.locproj" /> | ||
<Import Project="LocProjects\mscorlib.dll.locproj" /> | ||
<Import Project="LocProjects\mscorrc.dll.locproj" /> | ||
<Import Project="LocProjects\mscorsecr.dll.locproj" /> | ||
<Import Project="LocProjects\pevrfyrc.dll.locproj" /> | ||
<Import Project="LocProjects\Regasm.exe.locproj" /> | ||
<Import Project="LocProjects\winmdexp.exe.locproj" /> | ||
<Import Project="LocProjects\SecAnnotate.exe.locproj" /> | ||
<Import Project="LocProjects\sn.exe.locproj" /> | ||
<Import Project="LocProjects\snrc.dll.locproj" /> | ||
<Import Project="LocProjects\sysglobl.dll.locproj" /> | ||
<Import Project="LocProjects\System.EnterpriseServices.dll.locproj" /> | ||
<Import Project="LocProjects\System.Runtime.Remoting.dll.locproj" /> | ||
<Import Project="LocProjects\System.Runtime.Serialization.Formatters.Soap.dll.locproj" /> | ||
<Import Project="LocProjects\System.Security.dll.locproj" /> | ||
<Import Project="LocProjects\sdk_tools.locproj" /> | ||
</ImportGroup> | ||
|
||
<ImportGroup Condition="'$(ProductGroupsToBuild)' == '' or '$(ProductGroupsToBuild)' == 'FX' or '$(ProductGroupsToBuild)' == 'VS' or | ||
'$(ProductGroupsToBuild)' == 'VS;FX' or '$(ProductGroupsToBuild)' == 'FX;VS'" > | ||
<Import Project="LocProjects\SecurityTransparencyRules.dll.locproj" /> | ||
</ImportGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
@echo off | ||
setlocal | ||
|
||
:: Set the default arguments for build | ||
set __BuildArch=x64 | ||
set __BuildType=debug | ||
|
||
:: Set the various build properties here so that CMake and MSBuild can pick them up | ||
set __ProjectDir=%CD% | ||
set __ProjectFilesDir=%~dp0 | ||
set __SourceDir=%__ProjectDir%\src | ||
set __PackagesDir=%__SourceDir%\.nuget | ||
set __RootBinDir=%__ProjectDir%\binaries | ||
set __LogsDir=%__RootBinDir%\Logs | ||
set __CMakeSlnDir=%__RootBinDir%\CMake | ||
set __MSBCleanBuildArgs= | ||
|
||
:Arg_Loop | ||
if "%1" == "" goto ArgsDone | ||
if /i "%1" == "/?" goto Usage | ||
if /i "%1" == "x64" (set __BuildArch=x64&&shift&goto Arg_Loop) | ||
|
||
if /i "%1" == "debug" (set __BuildType=debug&shift&goto Arg_Loop) | ||
if /i "%1" == "release" (set __BuildType=release&shift&goto Arg_Loop) | ||
|
||
if /i "%1" == "clean" (set __CleanBuild=1&shift&goto Arg_Loop) | ||
|
||
if /i "%1" == "unixmscorlib" (set __UnixMscorlibOnly=1&shift&goto Arg_Loop) | ||
|
||
echo Invalid commandline argument: %1 | ||
goto Usage | ||
|
||
:ArgsDone | ||
|
||
echo Commencing CoreCLR Repo build | ||
echo. | ||
|
||
:: Set the remaining variables based upon the determined build configuration | ||
set __BinDir=%__RootBinDir%\Product\%__BuildArch%\%__BuildType% | ||
set __PackagesBinDir=%__BinDir%\.nuget | ||
set __ToolsDir=%__RootBinDir%\tools | ||
set __TestWorkingDir=%__RootBinDir%\tests\%__BuildArch%\%__BuildType% | ||
set __IntermediatesDir=%__RootBinDir%\intermediates\%__BuildArch%\%__BuildType% | ||
|
||
:: Generate path to be set for CMAKE_INSTALL_PREFIX to contain forward slash | ||
set __CMakeBinDir=%__BinDir% | ||
set "__CMakeBinDir=%__CMakeBinDir:\=/%" | ||
|
||
:: Switch to clean build mode if the binaries output folder does not exist | ||
if not exist %__RootBinDir% set __CleanBuild=1 | ||
|
||
:: Configure environment if we are doing a clean build. | ||
if not defined __CleanBuild goto CheckPrereqs | ||
echo Doing a clean build | ||
echo. | ||
|
||
:: MSBuild projects would need a rebuild | ||
set __MSBCleanBuildArgs=/t:rebuild | ||
|
||
:: Cleanup the binaries drop folder | ||
if exist %__BinDir% rd /s /q %__BinDir% | ||
md %__BinDir% | ||
|
||
:: Cleanup the CMake folder | ||
if exist %__CMakeSlnDir% rd /s /q %__CMakeSlnDir% | ||
md %__CMakeSlnDir% | ||
|
||
:: Cleanup the logs folder | ||
if exist %__LogsDir% rd /s /q %__LogsDir% | ||
md %__LogsDir% | ||
|
||
::Cleanup intermediates folder | ||
if exist %__IntermediatesDir% rd /s /q %__IntermediatesDir% | ||
|
||
:: Check prerequisites | ||
:CheckPrereqs | ||
echo Checking pre-requisites... | ||
echo. | ||
:: | ||
:: Check presence of CMake on the path | ||
for %%X in (cmake.exe) do (set FOUNDCMake=%%~$PATH:X) | ||
if defined FOUNDCMake goto CheckVS | ||
echo Installation of CMake, and ensuring it is on the path, is a pre-requisite to build this repository. | ||
goto :eof | ||
|
||
:CheckVS | ||
:: Check presence of VS | ||
if defined VS120COMNTOOLS goto CheckVSExistence | ||
echo Installation of VS 2013 is a pre-requisite to build this repository. | ||
goto :eof | ||
|
||
:CheckVSExistence | ||
:: Does VS 2013 really exist? | ||
if exist "%VS120COMNTOOLS%\..\IDE\devenv.exe" goto CheckMSBuild | ||
echo Installation of VS 2013 is a pre-requisite to build this repository. | ||
goto :eof | ||
|
||
:CheckMSBuild | ||
:: Note: We've disabled node reuse because it causes file locking issues. | ||
:: The issue is that we extend the build with our own targets which | ||
:: means that that rebuilding cannot successfully delete the task | ||
:: assembly. | ||
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe" | ||
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe" | ||
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" | ||
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe" | ||
if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe. Please see https://github.com/dotnet/coreclr/wiki/Developer%%20Guide for build instructions. && exit /b 1 | ||
|
||
:: All set to commence the build | ||
|
||
setlocal | ||
if defined __UnixMscorlibOnly goto PerformMScorlibBuild | ||
|
||
echo Commencing build of native components for %__BuildArch%/%__BuildType% | ||
echo. | ||
|
||
:: Set the environment for the native build | ||
call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64 | ||
cd %__CMakeSlnDir% | ||
|
||
if exist "%VSINSTALLDIR%DIA SDK" goto GenVSSolution | ||
echo Error: DIA SDK is missing at "%VSINSTALLDIR%DIA SDK". ^ | ||
This is due to bug in VS Intaller. It does not install DIA SDK at "%VSINSTALLDIR%" but rather ^ | ||
at VS install location of previous version. Workaround is to copy DIA SDK folder from VS install location ^ | ||
of previous version to "%VSINSTALLDIR%" and then resume build. | ||
goto :eof | ||
|
||
:GenVSSolution | ||
:: Regenerate the VS solution | ||
call ..\..\src\pal\tools\gen-buildsys-win.bat %__ProjectDir% | ||
|
||
:BuildComponents | ||
if exist %__CMakeSlnDir%\install.vcxproj goto BuildCoreCLR | ||
echo Failed to generate native component build project! | ||
goto :eof | ||
|
||
REM Build CoreCLR | ||
:BuildCoreCLR | ||
set __CoreCLRBuildLog=%__LogsDir%\CoreCLR_%__BuildArch%__%__BuildType%.log | ||
%_msbuildexe% %__CMakeSlnDir%\install.vcxproj %__MSBCleanBuildArgs% /nologo /maxcpucount /nodeReuse:false /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% /fileloggerparameters:Verbosity=diag;LogFile="%__CoreCLRBuildLog%" | ||
pushd %__ProjectDir% | ||
IF NOT ERRORLEVEL 1 goto PerformMScorlibBuild | ||
echo Native component build failed. Refer %__CoreCLRBuildLog% for details. | ||
goto :eof | ||
|
||
:PerformMScorlibBuild | ||
endlocal | ||
|
||
setlocal | ||
set __AdditionalMSBuildArgs= | ||
|
||
if defined __UnixMscorlibOnly set __AdditionalMSBuildArgs=/p:OS=Unix /p:BuildNugetPackage=false | ||
|
||
:: Set the environment for the managed build | ||
call "%VS120COMNTOOLS%\VsDevCmd.bat" | ||
echo Commencing build of mscorlib for %__BuildArch%/%__BuildType% | ||
echo. | ||
set __MScorlibBuildLog=%__LogsDir%\MScorlib_%__BuildArch%__%__BuildType%.log | ||
%_msbuildexe% "%__ProjectFilesDir%build.proj" %__MSBCleanBuildArgs% /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%__MScorlibBuildLog%" %__AdditionalMSBuildArgs% | ||
IF NOT ERRORLEVEL 1 ( | ||
if defined __UnixMscorlibOnly goto :eof | ||
goto PerformTestBuild | ||
) | ||
|
||
echo MScorlib build failed. Refer %__MScorlibBuildLog% for details. | ||
goto :eof | ||
|
||
:PerformTestBuild | ||
echo. | ||
echo Commencing build of tests for %__BuildArch%/%__BuildType% | ||
echo. | ||
call tests\buildtest.cmd | ||
endlocal | ||
|
||
::Build complete | ||
echo Repo successfully built. | ||
echo. | ||
echo Product binaries are available at %__BinDir% | ||
echo Test binaries are available at %__TestWorkingDir% | ||
goto :eof | ||
|
||
:Usage | ||
echo. | ||
echo Usage: | ||
echo %0 BuildArch BuildType [clean] where: | ||
echo. | ||
echo BuildArch can be: x64 | ||
echo BuildType can be: Debug, Release | ||
echo Clean - optional argument to force a clean build. | ||
goto :eof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="dir.props" /> | ||
|
||
<!-- Inline task to bootstrap the build to enable downloading nuget.exe --> | ||
<UsingTask TaskName="DownloadFile" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll"> | ||
<ParameterGroup> | ||
<Address ParameterType="System.String" Required="true"/> | ||
<FileName ParameterType="System.String" Required="true" /> | ||
</ParameterGroup> | ||
<Task> | ||
<Reference Include="System" /> | ||
<Code Type="Fragment" Language="cs"> | ||
<![CDATA[ | ||
var directory = System.IO.Path.GetDirectoryName(FileName); | ||
System.IO.Directory.CreateDirectory(directory); | ||
var client = new System.Net.WebClient(); | ||
client.Proxy = System.Net.WebRequest.DefaultWebProxy; | ||
client.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials; | ||
client.DownloadFile(Address, FileName); | ||
]]> | ||
</Code> | ||
</Task> | ||
</UsingTask> | ||
|
||
<Target Name="_RestoreBuildTools" | ||
BeforeTargets="Build" | ||
Inputs="$(BuildToolsTargetInputs)" | ||
Outputs="$(BuildToolsTargetOutputs)" | ||
> | ||
|
||
<!-- Download latest nuget.exe --> | ||
<DownloadFile | ||
Condition="!Exists($(NuGetToolPath))" | ||
Address="http://nuget.org/nuget.exe" | ||
FileName="$(NuGetToolPath)" /> | ||
|
||
<!-- Restore build tools --> | ||
<Exec | ||
StandardOutputImportance="Low" | ||
Command=""$(NuGetToolPath)" install " $(SourceDir).nuget\packages.config " -o " $(ToolsDir) " $(NuGetConfigCommandLine)" /> | ||
|
||
<Touch Files="$(BuildToolsInstallSemaphore)" AlwaysCreate="true" /> | ||
</Target> | ||
|
||
<!-- Setup Nuget properties --> | ||
<PropertyGroup> | ||
<NuSpecPathSrc>$(PackagesDir)Microsoft.DotNet.CoreCLR.nuspec</NuSpecPathSrc> | ||
<NuSpecPathBin>$(PackagesBinDir)\Microsoft.DotNet.CoreCLR.nuspec</NuSpecPathBin> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<NuSpecs Include="$(NuSpecPathBin)" /> | ||
</ItemGroup> | ||
|
||
<!-- Generate Microsoft.Dotnet.CoreCLR nuget package --> | ||
<Target Name="BuildNuGetPackages" AfterTargets="Build" Condition="'$(BuildNugetPackage)' != 'false'"> | ||
<MakeDir Directories="$(PackagesBinDir)" Condition="!Exists('$(PackagesBinDir)')" /> | ||
<Copy SourceFiles="$(NuSpecPathSrc)" DestinationFiles="$(NuSpecPathBin)" /> | ||
<Exec Command="$(NuGetToolPath) pack "%(NuSpecs.Identity)" -NoPackageAnalysis -OutputDirectory "$(PackagesBinDir)"" /> | ||
</Target> | ||
|
||
<ItemGroup> | ||
<PDBSToMove Include="$(BinDir)mscorlib.pdb"/> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<MscorlibPDBPath>$(BinDir)mscorlib.pdb</MscorlibPDBPath> | ||
</PropertyGroup> | ||
|
||
<Target Name="MovePDB" AfterTargets="Build"> | ||
<Move Condition="Exists($(MscorlibPDBPath))" | ||
SourceFiles="@(PDBSToMove)" | ||
DestinationFolder="$(BinDir)PDB" | ||
/> | ||
</Target> | ||
|
||
<!-- Build mscorlib --> | ||
<ItemGroup> | ||
<Project Include="src\mscorlib\mscorlib.csproj" /> | ||
</ItemGroup> | ||
|
||
<Import Project="dir.traversal.targets" /> | ||
|
||
<!-- Override clean from dir.traversal.targets and just remove the full BinDir --> | ||
<Target Name="Clean"> | ||
<Delete Files="$(BinDir)mscorlib.*" /> | ||
</Target> | ||
</Project> |
Oops, something went wrong.