Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit f5720ee

Browse files
authored
Merge pull request #17347 from weshaggard/MergeMaster21
[release/2.1] Merge master to release/2.1
2 parents d845ef1 + 3365ac5 commit f5720ee

File tree

1,972 files changed

+116615
-44020
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,972 files changed

+116615
-44020
lines changed

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ syntax: glob
1919
[Dd]ebugPublic/
2020
[Rr]elease/
2121
[Rr]eleases/
22-
x64/
23-
x86/
2422
build/
2523
bld/
2624
[Bb]in/
@@ -54,7 +52,6 @@ dlldata.c
5452

5553
*_i.c
5654
*_p.c
57-
*_i.h
5855
*.ilk
5956
*.meta
6057
*.obj
@@ -239,6 +236,7 @@ $RECYCLE.BIN/
239236

240237
# Common binary extensions on Windows
241238
*.exe
239+
*.exe.stackdump
242240
*.dll
243241
*.lib
244242

BuildToolsVersion.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.0-preview2-02621-01
1+
2.1.0-preview3-02629-02

CODE_OWNERS.TXT

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ N: Mike McLaughlin
1515
G: mikem8361
1616
D: Debugging APIs and implementation (anything under the debug directory), sos
1717

18-
N: Kshama Pawar
19-
G: kspawa
18+
N: Noah Falk, David Mason
19+
G: noahfalk, davmason
2020
D: Profiling APIs and implementation
2121

2222
N: Gaurav Khanna
@@ -28,4 +28,4 @@ G: ericstj
2828
D: Nuget packaging implementation
2929

3030
This list is incomplete, if you need to find other owners work with Jan Kotas
31-
to get them filled in.
31+
to get them filled in.

Documentation/building/debugging-instructions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ You can combine steps 4-8 and pass everything on the lldb command line:
5252

5353
`lldb-3.9 -o "plugin load libsosplugin.so" -o "process launch -s" -o "process handle -s false SIGUSR1 SIGUSR2" -o "breakpoint set -n LoadLibraryExW" corerun HelloWorld.exe linux`
5454

55+
For .NET Core version 1.x and 2.0.x, libsosplugin.so is built for and will only work with version 3.6 of lldb. For .NET Core 2.1, the plugin is built for 3.9 lldb and will work with 3.8 and 3.9 lldb.
56+
5557
### SOS commands ###
5658

5759
This is the full list of commands currently supported by SOS. lldb is case-sensitive unlike windbg.
@@ -164,6 +166,13 @@ lldb should start debugging successfully at this point. You should see stacktrac
164166
```
165167
lldb-3.9 -O "settings set target.exec-search-paths /home/parallels/Downloads/System.Drawing.Common.Tests/home/helixbot/dotnetbuild/work/2a74cf82-3018-4e08-9e9a-744bb492869e/Payload/shared/Microsoft.NETCore.App/9.9.9/" -o "plugin load /home/parallels/Downloads/System.Drawing.Common.Tests/home/helixbot/dotnetbuild/work/2a74cf82-3018-4e08-9e9a-744bb492869e/Payload/shared/Microsoft.NETCore.App/9.9.9/libsosplugin.so" --core /home/parallels/Downloads/System.Drawing.Common.Tests/home/helixbot/dotnetbuild/work/2a74cf82-3018-4e08-9e9a-744bb492869e/Work/f6414a62-9b41-4144-baed-756321e3e075/Unzip/core /home/parallels/Downloads/System.Drawing.Common.Tests/home/helixbot/dotnetbuild/work/2a74cf82-3018-4e08-9e9a-744bb492869e/Payload/shared/Microsoft.NETCore.App/9.9.9/dotnet
166168
```
169+
Disabling Managed Attach/Debugging
170+
==================================
171+
172+
The "COMPlus_EnableDiagnostics" environment variable can be used to disable managed debugging. This prevents the various OS artifacts used for debugging like the named pipes and semaphores on Linux/MacOS and shared memory on Windows from being created.
173+
174+
export COMPlus_EnableDiagnostics=0
175+
167176

168177
Using Visual Studio Code
169178
========================

Documentation/building/viewing-jit-dumps.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ To make sense of the results, it is recommended you also read the [Reading a Jit
88

99
The first thing we want to do is setup the .NET Core app we want to dump. Here are the steps to do this, if you don't have one ready:
1010

11-
* Perform a debug build of the CoreCLR repo. You don't need to build tests, so you can pass `skiptests` to the build command to make it faster.
12-
* Install the [.NET CLI 2.0 preview](https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/dogfooding.md), which we'll use to compile/publish our app.
11+
* Perform a release build of the CoreCLR repo by passing `release` to the build command. You don't need to build tests, so you can pass `skiptests` to the build command to make it faster. Note: the release build can be skipped, but in order to see optimized in the core library it is needed.
12+
* Perform a debug build of the CoreCLR repo. Tests aren't needed as in the release build, so you can pass `skiptests` to the build command. Note: the debug build is necessary, so that the JIT recognizes the configuration knobs.
13+
* Install the [.NET CLI 2.1 preview](https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/dogfooding.md), which we'll use to compile/publish our app.
1314
* `cd` to where you want your app to be placed, and run `dotnet new console`.
1415
* Modify your `csproj` file so that it contains a RID (runtime ID) corresponding to the OS you're using in the `<RuntimeIdentifier>` tag. For example, for Windows 10 x64 machine, the project file is:
1516

@@ -61,10 +62,12 @@ The first thing we want to do is setup the .NET Core app we want to dump. Here a
6162

6263
```shell
6364
# Windows
64-
robocopy /e <coreclr path>\bin\Product\Windows_NT.<arch>.Debug <app root>\bin\Release\netcoreapp2.0\<rid>\publish > NUL
65+
robocopy /e <coreclr path>\bin\Product\Windows_NT.<arch>.Release <app root>\bin\Release\netcoreapp2.0\<rid>\publish > NUL
66+
copy <coreclr path>\bin\Product\Windows_NT.<arch>.Debug\clrjit.dll <app root>\bin\Release\netcoreapp2.0\<rid>\publish > NUL
6567

6668
# Unix
67-
cp -rT <coreclr path>/bin/Product/<OS>.<arch>.Debug <app root>/bin/Release/netcoreapp2.0/<rid>/publish
69+
cp -rT <coreclr path>/bin/Product/<OS>.<arch>.Release <app root>/bin/Release/netcoreapp2.0/<rid>/publish
70+
cp <coreclr path>/bin/Product/<OS>.<arch>.Debug/libclrjit.so <app root>/bin/Release/netcoreapp2.0/<rid>/publish
6871
```
6972

7073
* Set the configuration knobs you need (see below) and run your published app. The info you want should be dumped to stdout.

Documentation/workflow/OfficalAndDailyBuilds.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ repositories. You can see what is available from
1616
* CoreCLR at <https://dotnet.myget.org/feed/dotnet-core/package/nuget/Microsoft.NETCore.Runtime.CoreCLR>
1717
* NETCore.App at <https://dotnet.myget.org/feed/dotnet-core/package/nuget/Microsoft.NETCore.App>
1818

19+
These builds have a version number that follows the the versioning scheme described below (month number/day of month),
20+
but they also will have a component that indicate which Git Branch the are working from (note these names were
21+
correct as of 1/2018 and may change but the concept of a suffix that designates the branch is likely to persist)
22+
23+
* preview1 - are daily builds from the 'release/\*' branch where \* is the next official version to be released
24+
* preview2 - are daily builds from the 'master' branch (where active work happens first (typically))
25+
1926
Thus if your goal is just to get the latest bug fixes and features, you don't need to build CoreCLR yourself you
2027
can simply add <https://dotnet.myget.org/F/dotnet-core/api/v3/index.json> to your Nuget Feed list and set the
2128
`RuntimeFrameworkVersion` in your project file to a `Microsoft.NETCore.App` version. You need to restore

ILAsmVersion.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.0-preview2-26324-04
1+
2.1.0-preview3-26329-01

build-test.cmd

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ set __ZipTests=
5151
set __TargetsWindows=1
5252
set __DoCrossgen=
5353

54+
@REM CMD has a nasty habit of eating "=" on the argument list, so passing:
55+
@REM -priority=1
56+
@REM appears to CMD parsing as "-priority 1". Handle -priority specially to avoid problems,
57+
@REM and allow the "-priority=1" syntax.
58+
set __Priority=0
59+
5460
:Arg_Loop
5561
if "%1" == "" goto ArgsDone
5662

@@ -75,6 +81,7 @@ if /i "%1" == "crossgen" (set __DoCrossgen=1&set processedArgs=!pro
7581
if /i "%1" == "runtimeid" (set __RuntimeId=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
7682
if /i "%1" == "targetsNonWindows" (set __TargetsWindows=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
7783
if /i "%1" == "Exclude" (set __Exclude=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
84+
if /i "%1" == "-priority" (set __Priority=%2&shift&set processedArgs=!processedArgs! %1=%2&shift&goto Arg_Loop)
7885

7986
if [!processedArgs!]==[] (
8087
set __UnprocessedBuildArgs=%__args%
@@ -87,6 +94,9 @@ if [!processedArgs!]==[] (
8794

8895
:ArgsDone
8996

97+
@REM Special handling for -priority=N argument.
98+
if %__Priority% GTR 0 (set "__UnprocessedBuildArgs=!__UnprocessedBuildArgs! -priority=%__Priority%")
99+
90100
if defined __BuildAgainstPackagesArg (
91101
if not defined __RuntimeID (
92102
echo %__MsgPrefix%Error: When building against packages, you must supply a target Runtime ID.
@@ -267,22 +277,43 @@ if not defined VSINSTALLDIR (
267277
echo %__MsgPrefix%Error: build-test.cmd should be run from a Visual Studio Command Prompt. Please see https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
268278
exit /b 1
269279
)
270-
280+
set __AppendToLog=false
271281
set __BuildLogRootName=Tests_Managed
272282
set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log
273283
set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn
274284
set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.err
275-
set __msbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%"
276-
set __msbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
277-
set __msbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
278285

279-
call "%__ProjectDir%\run.cmd" build -Project=%__ProjectDir%\tests\build.proj -MsBuildLog=!__msbuildLog! -MsBuildWrn=!__msbuildWrn! -MsBuildErr=!__msbuildErr! %__RunArgs% %__BuildAgainstPackagesArg% %__unprocessedBuildArgs%
280-
if errorlevel 1 (
281-
echo %__MsgPrefix%Error: build failed. Refer to the build log files for details:
282-
echo %__BuildLog%
283-
echo %__BuildWrn%
284-
echo %__BuildErr%
285-
exit /b 1
286+
REM Execute msbuild test build in stages - workaround for excessive data retention in MSBuild ConfigCache
287+
REM See https://github.com/Microsoft/msbuild/issues/2993
288+
289+
set __SkipPackageRestore=false
290+
set __SkipTargetingPackBuild=false
291+
set __BuildLoopCount=2
292+
set __TestGroupToBuild=1
293+
294+
if %__Priority% GTR 0 (set __BuildLoopCount=16&set __TestGroupToBuild=2)
295+
echo %__MsgPrefix%Building tests group %__TestGroupToBuild% with %__BuildLoopCount% subgroups
296+
297+
for /l %%G in (1, 1, %__BuildLoopCount%) do (
298+
299+
set __msbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%";Append=!__AppendToLog!
300+
set __msbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%";Append=!__AppendToLog!
301+
set __msbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%";Append=!__AppendToLog!
302+
303+
set TestBuildSlice=%%G
304+
call "%__ProjectDir%\run.cmd" build -Project=%__ProjectDir%\tests\build.proj -MsBuildLog=!__msbuildLog! -MsBuildWrn=!__msbuildWrn! -MsBuildErr=!__msbuildErr! %__RunArgs% %__BuildAgainstPackagesArg% %__unprocessedBuildArgs%
305+
306+
if errorlevel 1 (
307+
echo %__MsgPrefix%Error: build failed. Refer to the build log files for details:
308+
echo %__BuildLog%
309+
echo %__BuildWrn%
310+
echo %__BuildErr%
311+
exit /b 1
312+
)
313+
314+
set __SkipPackageRestore=true
315+
set __SkipTargetingPackBuild=true
316+
set __AppendToLog=true
286317
)
287318

288319
REM Prepare the Test Drop

build-test.sh

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ usage()
338338
echo "BuildType can be: debug, checked, release"
339339
echo "coverage - optional argument to enable code coverage build (currently supported only for Linux and OSX)."
340340
echo "ninja - target ninja instead of GNU make"
341-
echo "clangx.y - optional argument to build using clang version x.y."
341+
echo "clangx.y - optional argument to build using clang version x.y - supported version 3.5 - 6.0"
342342
echo "cross - optional argument to signify cross compilation,"
343343
echo " - will use ROOTFS_DIR environment variable if set."
344344
echo "crosscomponent - optional argument to build cross-architecture component,"
@@ -543,31 +543,46 @@ while :; do
543543
__VerboseBuild=1
544544
;;
545545

546-
clang3.5)
546+
clang3.5|-clang3.5)
547547
__ClangMajorVersion=3
548548
__ClangMinorVersion=5
549549
;;
550550

551-
clang3.6)
551+
clang3.6|-clang3.6)
552552
__ClangMajorVersion=3
553553
__ClangMinorVersion=6
554554
;;
555555

556-
clang3.7)
556+
clang3.7|-clang3.7)
557557
__ClangMajorVersion=3
558558
__ClangMinorVersion=7
559559
;;
560560

561-
clang3.8)
561+
clang3.8|-clang3.8)
562562
__ClangMajorVersion=3
563563
__ClangMinorVersion=8
564564
;;
565565

566-
clang3.9)
566+
clang3.9|-clang3.9)
567567
__ClangMajorVersion=3
568568
__ClangMinorVersion=9
569569
;;
570570

571+
clang4.0|-clang4.0)
572+
__ClangMajorVersion=4
573+
__ClangMinorVersion=0
574+
;;
575+
576+
clang5.0|-clang5.0)
577+
__ClangMajorVersion=5
578+
__ClangMinorVersion=0
579+
;;
580+
581+
clang6.0|-clang6.0)
582+
__ClangMajorVersion=6
583+
__ClangMinorVersion=0
584+
;;
585+
571586
ninja)
572587
__UseNinja=1
573588
;;
@@ -686,9 +701,9 @@ export __CMakeBinDir="$__BinDir"
686701

687702
if [ ! -d "$__BinDir" ] || [ ! -d "$__BinDir/bin" ]; then
688703

689-
echo "Cannot find build directory for the CoreCLR Product."
690-
echo "Please make sure CoreCLR is built before building tests."
691-
echo "Example use: './build.sh $__BuildArch $__BuildType'"
704+
echo "Cannot find build directory for the CoreCLR Product or native tests."
705+
echo "Please make sure CoreCLR and native tests are built before building managed tests."
706+
echo "Example use: './build.sh $__BuildArch $__BuildType' without -skiptests switch"
692707
exit 1
693708
fi
694709

build.cmd

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,6 @@ set __ThisScriptDir="%~dp0"
1212
call "%__ThisScriptDir%"\setup_vs_tools.cmd
1313
if NOT '%ERRORLEVEL%' == '0' exit /b 1
1414

15-
REM Make the work-around to a bug in the microsoft.dotnet.buildtools.coreclr package until it is fixed.
16-
reg query HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{3BFCEA48-620F-4B6B-81F7-B9AF75454C7D}\InprocServer32 > NUL: 2>&1
17-
if NOT '%ERRORLEVEL%' == '0' (
18-
echo.
19-
echo.**********************************************************************************
20-
echo.Error: We have detected that the msdia120.dll is not registered.
21-
echo.This is necessary for the build to complete without a Class_Not_Registered error.
22-
echo.
23-
echo.You can fix this by
24-
echo. 1. Launching the "Developer Command Prompt for VS2017" with Administrative privileges
25-
echo. 2. Running regsvr32.exe "%%VSINSTALLDIR%%\Common7\IDE\msdia120.dll"
26-
echo.
27-
echo.This will only need to be done once for the lifetime of the machine.
28-
echo.For more details see: https://github.com/dotnet/coreclr/issues/11305
29-
exit /b 1
30-
)
31-
3215
if defined VS150COMNTOOLS (
3316
set "__VSToolsRoot=%VS150COMNTOOLS%"
3417
set "__VCToolsRoot=%VS150COMNTOOLS%\..\..\VC\Auxiliary\Build"
@@ -39,6 +22,11 @@ if defined VS150COMNTOOLS (
3922
set __VSVersion=vs2015
4023
)
4124

25+
:: Work around Jenkins CI + msbuild problem: Jenkins sometimes creates very large environment
26+
:: variables, and msbuild can't handle environment blocks with such large variables. So clear
27+
:: out the variables that might be too large.
28+
set ghprbCommentBody=
29+
4230
:: Note that the msbuild project files (specifically, dir.proj) will use the following variables, if set:
4331
:: __BuildArch -- default: x64
4432
:: __BuildType -- default: Debug

0 commit comments

Comments
 (0)