diff options
author | Jan Kotas <jkotas@microsoft.com> | 2016-09-19 22:01:57 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-09-20 06:16:55 +0300 |
commit | 34ed9fa54bfba29424f181b852f67d0552852b93 (patch) | |
tree | bb64eb8b75bbce3bbc9b0b7e0200bca98937d983 | |
parent | 18c51707abd96a066ff241cda24cd51671f37c42 (diff) |
Update documentation
-rw-r--r-- | Documentation/how-to-build-and-run-ilcompiler-in-console-shell-prompt.md | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Documentation/how-to-build-and-run-ilcompiler-in-console-shell-prompt.md b/Documentation/how-to-build-and-run-ilcompiler-in-console-shell-prompt.md index 841406aae..99c85bb9e 100644 --- a/Documentation/how-to-build-and-run-ilcompiler-in-console-shell-prompt.md +++ b/Documentation/how-to-build-and-run-ilcompiler-in-console-shell-prompt.md @@ -13,12 +13,10 @@ This will result in the following: - Restore nuget packages required for building - Build native and managed components of ILCompiler. The final binaries are placed to `<repo_root>\bin\Product\<OS>.<arch>.<Config>\packaging\publish1`. - Build and run tests -- Installs the latest CLI tools at `<repo_root>\Tools\dotnetcli` -# Setup CLI -To consume the CLI tools installed as part of the build, do the following: +# Install latest CLI tools -* Add `<repo_root>\Tools\dotnetcli` to the path +* Download latest CLI tools from https://github.com/dotnet/cli/ and add them to the path * On windows ensure you are using the 'VS2015 x64 Native Tools Command Prompt' (This is distinct from the 'Developer Command Prompt for VS2015') @@ -28,21 +26,24 @@ You should now be able to use the `dotnet` commands of the CLI tools. * Ensure that you have done a repo build per the instructions above. * Create a new folder and switch into it. -* Issue the command, `dotnet new`, on the command/shell prompt. This will add a template source file and corresponding project.json. If you get an error, please ensure the [pre-requisites](prerequisites-for-building.md) are installed. - +* Run `dotnet new --type MSBuild` on the command/shell prompt. This will add a project template. If you get an error, please ensure the [pre-requisites](prerequisites-for-building.md) are installed. +* Run `dotnet restore`. This will download nuget packages required for compilation +* Add the following line at the end of `.csproj` file that is part your project. +``` + <Import Project="$(IlcPath)\Microsoft.NETCore.Native.targets" /> +``` ## Using RyuJIT ## This approach uses the same code-generator (RyuJIT), as [CoreCLR](https://github.com/dotnet/coreclr), for compiling the application. Linking is done using the platform specific linker. -From the shell/command prompt, issue the following commands, from the folder containing your source file and project.json, to generate the native executable +From the shell/command prompt, issue the following commands, from the folder containing your project, to generate the native executable ``` - dotnet restore - dotnet build --native --ilcpath <repo_root>\bin\Product\Windows_NT.x64.Debug\packaging\publish1 + dotnet build3 /p:IlcPath=<repo_root>\bin\Product\Windows_NT.x64.Debug\packaging\publish1 ``` -Native executable will be dropped in `./bin/[configuration]/[framework]/[runtime]/native/` folder and will have the same name as the folder in which your source file is present. +Native executable will be dropped in `./bin/[configuration]/native/` folder and will have the same name as the folder in which your source file is present. ## Using CPP Code Generator ## @@ -51,11 +52,10 @@ This approach uses platform specific C++ compiler and linker for compiling/linki From the shell/command prompt, issue the following commands to generate the native executable: ``` - dotnet restore - dotnet build --native --cpp --ilcpath <repo_root>\bin\Product\Windows_NT.x64.Debug\packaging\publish1 --cppcompilerflags /MTd + dotnet build3 /t:LinkNative /p:IlcPath=<repo_root>\bin\Product\Windows_NT.x64.Debug\packaging\publish1 /p:NativeCodeGen=cpp /p:AdditionalCppCompilerFlags=/MTd ``` -Omit `--cppcompilerflags /MTd` for release CoreRT build. +Omit `/p:AdditionalCppCompilerFlags=/MTd` for release CoreRT build. ## Workarounds for linker errors on Windows ## |