Imported Upstream version 5.4.0.167

Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-08-21 15:34:15 +00:00
parent e49d6f06c0
commit 536cd135cc
12856 changed files with 563812 additions and 223249 deletions

View File

@@ -11,7 +11,7 @@ This is the repo for CoreRT, the .NET Core runtime optimized for AOT (Ahead of T
- [Prerequisites for building](prerequisites-for-building.md)
- [How to build and run from the Command Line](how-to-build-and-run-ilcompiler-in-console-shell-prompt.md)
- [How to build and run from Visual Studio](how-to-build-and-run-ilcompiler-in-visual-studio-2015.md)
- [How to build and run from Visual Studio](how-to-build-and-run-ilcompiler-in-visual-studio.md)
- [How to build and run from VSCode](how-to-build-and-run-ilcompiler-in-vscode.md)
- [How to run tests](how-to-run-tests.md)
- [Cross Compilation for ARM on Linux](cross-building.md)

View File

@@ -1,4 +1,4 @@
##Runtime
## Runtime
- Build managed parts
- Build language source to IL
@@ -20,7 +20,7 @@
- Toolchain support to write the GCInfo into final binary
- Runtime to consume GCInfo produced by RyuJIT today for precise GC
##Toolchain
## Toolchain
- Split compilation
- Design document
@@ -33,29 +33,29 @@
- Stubs - Delegates, etc.
- Adjustments for RyuJIT / UTC difference
##Reflection
## Reflection
- Produce compact metadata in the final binary
- Produce mapping tables
- Runtime consumption
##Interop
## Interop
- Move MCG [Marshaling Code Generator](http://blogs.msdn.com/b/dotnet/archive/2014/06/13/net-native-deep-dive-debugging-into-interop-code.aspx) to github
- Package MCG as standalone tool
- Integrate MCG with ILToNative toolchain
##Framework
## Framework
- Move all .NET Native System.Private* libraries over to github
- Complete .NET Native specific libraries in corefx (build, port to Unix)
- Port to Win32/Unix
##Shared generics
## Shared generics
- Toolchain - produce supporting tables and fixups
##CPPCodegen
## CPPCodegen
- Complete IL to CPP codegenerator
- Portable EH

View File

@@ -8,6 +8,8 @@ Build your repo by issuing the following command at repo root:
build[.cmd|.sh] clean [Debug|Release]
```
If you're using Visual Studio 2017, you need to run the above command from the "Developer Command Prompt for VS 2017". Visual Studio setup puts a shortcut to this in the Start menu.
This will result in the following:
- Restore nuget packages required for building
@@ -17,12 +19,12 @@ This will result in the following:
# Install latest CLI tools
* Download latest CLI tools from [https://github.com/dotnet/cli/](https://github.com/dotnet/cli/) and add them to the path. The latest CLI tools include MSBuild support that the native compilation build integration depends on. These instructions have been tested with build `1.0.0-rc4-004812`.
* On windows ensure you are using the 'VS2015 x64 Native Tools Command Prompt'
(This is distinct from the 'Developer Command Prompt for VS2015')
* On windows ensure you are using the 'x64 Native Tools Command Prompt for VS 2017' or 'VS2015 x64 Native Tools Command Prompt'
(This is distinct from the 'Developer Command Prompt for VS 2017')
You should now be able to use the `dotnet` commands of the CLI tools.
# Compiling source to native code using the ILCompiler you built#
# Compiling source to native code using the ILCompiler you built #
* Ensure that you have done a repo build per the instructions above.
* Create a new folder and switch into it.
@@ -87,18 +89,6 @@ If you are seeing errors such as:
- Make sure to use release build, or pass the extra `/p:AdditionalCppCompilerFlags=/MTd` argument above.
If you are seeing errors such as:
```
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
Linking of intermediate files failed.
```
- Make sure you run these commands from the 'VS2015 x64 Native Tools Command Prompt' instead of a vanilla command prompt
- Search for the missing lib files in your SDK, for example under C:\Program Files (x86)\Windows Kits\10\lib. Make sure the path to these libraries is included in the LIB environment variable. It appears VS 2015 RTM developer command prompt does not correctly set the LIB paths for the 10586 Windows SDK. VS 2015 Update 1 resolves that issue, so installing it is another alternative.
For more details see the discussion in issue #606
If you are seeing errors such as:
```
@@ -106,7 +96,6 @@ libcpmtd.lib(nothrow.obj) : fatal error LNK1112: module machine type 'X86' confl
C:\Users\[omitted]\nativetest\bin\Product\Windows_NT.x64.Debug\packaging\publish1\Microsoft.NETCore.Native.targets(151,5): error MSB3073: The command "link @"obj\Debug\netcoreapp1.0\native\link.rsp"" exited with code 1112. [C:\Users\[omitted]\nativetest\app\app.csproj]
```
- Make sure you run these commands from the `VS2015 x64 Native Tools Command Prompt` instead of a vanilla command prompt
- Try running command `"c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64` to force x64 target
Make sure you run these commands from the `x64 Native Tools Command Prompt for VS 2017` instead of a vanilla command prompt
For more details see discussion in issue #2679

View File

@@ -6,7 +6,7 @@ Native compilation is a great scenario addition to .NET Core apps on Windows, OS
Architecture
============
[.NET Native](https://msdn.microsoft.com/library/dn584397.aspx) is a native toolchain that compiles [IL byte code](https://en.wikipedia.org/wiki/Common_Intermediate_Language) to machine code (e.g. X64 instructions). By default, .NET Native (for .NET Core, as opposed to UWP) uses RyuJIT as an ahead-of-time (AOT) compiler, the same one that CoreCLR uses as a just-in-time (JIT) compiler. It can also be used with other compilers, such as [LLILC](https://github.com/dotnet/llilc), UTC for UWP apps and [IL to CPP](https://github.com/dotnet/corert/tree/master/src/ILCompiler.Compiler/src/CppCodeGen) (an IL to textual C++ compiler we have built as a reference prototype).
[.NET Native](https://msdn.microsoft.com/library/dn584397.aspx) is a native toolchain that compiles [IL byte code](https://en.wikipedia.org/wiki/Common_Intermediate_Language) to machine code (e.g. X64 instructions). By default, .NET Native (for .NET Core, as opposed to UWP) uses RyuJIT as an ahead-of-time (AOT) compiler, the same one that CoreCLR uses as a just-in-time (JIT) compiler. It can also be used with other compilers, such as [LLILC](https://github.com/dotnet/llilc), UTC for UWP apps and [IL to CPP](https://github.com/dotnet/corert/tree/master/src/ILCompiler.CppCodeGen/src/CppCodeGen) (an IL to textual C++ compiler we have built as a reference prototype).
[CoreRT](https://github.com/dotnet/corert) is the .NET Core runtime that is optimized for AOT scenarios, which .NET Native targets. This is a refactored and layered runtime. The base is a small native execution engine that provides services such as garbage collection(GC). This is the same GC used in CoreCLR. Many other parts of the traditional .NET runtime, such as the [type system](https://github.com/dotnet/corert/tree/master/src/Common/src/TypeSystem), are implemented in C#. We've always wanted to implement runtime functionality in C#. We now have the infrastructure to do that. In addition, library implementations that were built deep into CoreCLR, have also been cleanly refactored and implemented as C# libraries.

View File

@@ -2,8 +2,8 @@ The following pre-requisites need to be installed for building the repo:
# Windows (Windows 7+)
1. Install [Visual Studio 2015](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx), including Visual C++ support. Visual Studio 2017 RC also works, but you will need to pass `vs2017` as a parameter to the build script to build using this version.
2. Install [CMake](http://www.cmake.org/download/). We use CMake 3.3.2 but any later version should work.
1. Install [Visual Studio 2017](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx), including Visual C++ support. Visual Studio 2015 also works.
2. Install [CMake](http://www.cmake.org/download/) 3.8.0 or later. Make sure you add it to the PATH in the setup wizard.
3. (Windows 7 only) Install PowerShell 3.0. It's part of [Windows Management Framework 3.0](http://go.microsoft.com/fwlink/?LinkID=240290). Windows 8 or later comes with the right version inbox.
PowerShell also needs to be available from the PATH environment variable (it's the default). Typically it should be %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\.
@@ -20,7 +20,7 @@ sudo apt-get update
```
```sh
sudo apt-get install cmake clang-3.9 libicu52 libunwind8
sudo apt-get install cmake clang-3.9 libicu52 libunwind8 uuid-dev
```
# Mac OSX (10.11.5+)
@@ -29,3 +29,20 @@ sudo apt-get install cmake clang-3.9 libicu52 libunwind8
2. Install [CMake](https://cmake.org/download/). Launch `/Applications/CMake.app/Contents/MacOS/CMake` GUI. Goto "OSX App Menu -> Tools -> Install For Command Line Use" and follow the steps. CMake < 3.6 has [a bug](https://cmake.org/Bug/view.php?id=16064) that can make `--install` fail. Do `sudo mkdir /usr/local/bin` to work around.
3. Install OpenSSL. Build tools have a dependency on OpenSSL. You can use [Homebrew](http://brew.sh/) to install it: with Homebrew installed, run `brew install openssl` followed by `ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/`, followed by `ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/`.
4. Install ICU (International Components for Unicode). It can be obtained via [Homebrew](http://brew.sh/): run `brew install icu4c` followed by `brew link --force icu4c`
# Bash on Ubuntu on Windows (Windows 10 Creators Update or later)
Make sure you run with Ubuntu 16.04 Xenial userland (this is the default after Windows 10 Creators Update, but if you enabled the "Bash on Ubuntu on Windows" feature before the Creators Update, you need to [upgrade manually](https://blogs.msdn.microsoft.com/commandline/2017/04/11/windows-10-creators-update-whats-new-in-bashwsl-windows-console/)). Running `lsb_release -a` will give you the version.
Install basic dependency packages:
First add a new package source to be able to install clang-3.9:
```sh
echo "deb http://llvm.org/apt/xenial/ llvm-toolchain-xenial-3.9 main" | sudo tee /etc/apt/sources.list.d/llvm.list
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
```
```sh
sudo apt-get install cmake clang-3.9 libunwind8 uuid-dev
```