Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/workflow/building/libraries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,25 @@ dotnet build System.Net.NetworkInformation.csproj /p:TargetOS=Linux
dotnet build -c Release System.Net.NetworkInformation.csproj
```

### Iterating on System.Private.CoreLib changes
When changing `System.Private.CoreLib` after a full build, in order to test against those changes, you will need an updated `System.Private.CoreLib` in the testhost. In order to achieve that, you can build the `libs.pretest` subset which does testhost setup including copying over `System.Private.CoreLib`.

After doing a build of the runtime:

```
build.cmd clr -rc Release
```

You can iterate on `System.Private.CoreLib` by running:

```
build.cmd clr.corelib+clr.nativecorelib+libs.pretest -rc Release
Comment thread
safern marked this conversation as resolved.
```

When this `System.Private.CoreLib` will be built in Release mode, then it will be crossgen'd and we will update the testhost to the latest version of corelib.

You can use the same workflow for mono runtime by using `mono.corelib+libs.pretest` subsets.

### Building for Mono
By default the libraries will attempt to build using the CoreCLR version of `System.Private.CoreLib.dll`. In order to build against the Mono version you need to use the `/p:RuntimeFlavor=Mono` argument.

Expand Down
9 changes: 6 additions & 3 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,12 @@ function Get-Help() {
Write-Host "* Build Mono runtime for Windows x64 on Release configuration."
Write-Host ".\build.cmd mono -c release"
Write-Host ""
Write-Host "It's important to mention that to build Mono for the first time,"
Write-Host "you need to build the CLR and Libs subsets beforehand."
Write-Host "This is done automatically if a full build is performed at first."
Write-Host "* Build Release coreclr corelib, crossgen corelib and update Debug libraries testhost to run test on an updated corelib."
Write-Host ".\build.cmd clr.corelib+clr.nativecorelib+libs.pretest -rc release"
Write-Host ""
Write-Host "* Build Debug mono corelib and update Release libraries testhost to run test on an updated corelib."
Write-Host ".\build.cmd mono.corelib+libs.pretest -rc debug -c release"
Write-Host ""
Write-Host ""
Write-Host "For more information, check out https://github.com/dotnet/runtime/blob/master/docs/workflow/README.md"
}
Expand Down
9 changes: 6 additions & 3 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,12 @@ usage()
echo "* Build Mono runtime for Linux x64 on Release configuration."
echo "./build.sh mono -c release"
echo ""
echo "It's important to mention that to build Mono for the first time,"
echo "you need to build the CLR and Libs subsets beforehand."
echo "This is done automatically if a full build is performed at first."
echo "* Build Release coreclr corelib, crossgen corelib and update Debug libraries testhost to run test on an updated corelib."
echo "./build.sh clr.corelib+clr.nativecorelib+libs.pretest -rc release"
echo ""
echo "* Build Debug mono corelib and update Release libraries testhost to run test on an updated corelib."
echo "./build.sh mono.corelib+libs.pretest -rc debug -c release"
echo ""
echo ""
echo "For more general information, check out https://github.com/dotnet/runtime/blob/master/docs/workflow/README.md"
}
Expand Down