![]() * Add test * Add CHECKs * Build scripts and test settings * COMPlus -> DOTNET * Fix filenames * Missing > * Missing quotes * use %scriptPath% * Rework properties, start two examples * Arch demo * Cleanup * Remove tab * Easier environment variables. Undo precommand changes. * undo blank line * clean CHECKs * Draft of bash * Bash, conditionals * More variables, start on run.cmd/sh/py * another output * Support in cmd/bash for RunningDisasmChecks * copy, factor, formatting * Initial work to include FileCheck. Added SuperFileCheck. * Able to build SuperFileCheck * Do not DisasmCheck TypeEquality_r for now. Update some FileChecks to follow SuperFileCheck rules. * Partially wiring up SuperFileCheck to tests * Piping list of method names from SuperFileCheck to JitDisasm * Handling bash a little bit * Moving SuperFileCheck to tests/Common * Few tweaks * Building SuperFileCheck as part of the test build * Tweaking a few things * Fixed a bug * Moving SuperFileCheck back to src\coreclr\tools. Removed checks from TypeEquality_r. * Restore original logic in Runtime_73681 * Trying to add CI leg for disasmchecks * Use x64 package if x86 platform detected for JIT tools package * Remove innerloop for disasmchecks * Trying to fix build. Only run in Windows for now. * Update Runtime_73681.cs Trying to fail test * Trying to fix build * Update Runtime_73681.cs * Update Runtime_73681.cs * Fixing a few issues * Trying to run disasmchecks as part of CI * Trying to run disasmchecks * Trying to run disasmchecks * Trying to run disasmchecks * Revert a change * Trying to run disasmchecks * Trying to run disasmchecks * build SuperFileCheck on non-windows * few tweaks * Trying to fix CI * Including SuperFileCheck for tests * Cleanup * More cleanup * Cleanup * Changed SuperFileCheck to not publish everything. Changed SuperFileCheck's lookup for FileCheck. * Invoking SuperFileCheck using dotnet * Making the test pass * Only run disasm checks for coreclr and not mono * Using HasBatchDisasmCheck and HasBashDisasmCheck to determine to run the check * Enabling filecheck on linux and osx * Added more comments * Added ARM64 specific test. Do not run SuperFileCheck if no methods were found. * Added documentation. Changed disasm-output. * Minor doc tweak * Minor doc tweak * Minor doc tweak * Minor doc tweak * Minor doc tweak * Cleanup. Trying to fix linux * Fixing test * Add information on additional functionality * cleanup * Add FileCheck snippet * Undo environment variable changes * Feedback from Mark * Cleanup * Trying to fix linux test run * Trying to fix linux test run * A few missing changes from the original branch * Enable OSX for disasm checks * cleanup / comment * Force test failure * Update Runtime_73681.cs * Set env vars after errorlevel check * Reverting back on setting environment variables in test. Added new FileCheck test for mod optimization * Force a failure by changing the register * Ignore native binaries for superpmi collect * Update Runtime_34937.cs * Force the correct failure * Update Runtime_34937.cs * Update Runtime_34937.cs * Adding specific OS check prefixes. Changed dump-input context amount * Added getting fully qualified method names with wildcards for SuperFileCheck * More tests. Fixed a few issues with generics. * Disabling generic support * Error if it cannot find enclosing type declaration * Fixing build * Remove namespac * Bring generics back, but in a limited form Co-authored-by: Mark Plesko <markples@microsoft.com> |
||
---|---|---|
.. | ||
building | ||
ci | ||
debugging | ||
requirements | ||
testing | ||
trimming | ||
codespace-dev-container-configuration.png | ||
codespace-machine-size.png | ||
Codespaces.md | ||
editing-and-debugging.md | ||
README.md | ||
using-dotnet-cli.md |
Workflow Guide
The repo can be built for the following platforms, using the provided setup and the following instructions. Before attempting to clone or build, please check these requirements.
Build Requirements
Chip | Windows | Linux | macOS | FreeBSD |
---|---|---|---|---|
x64 | ✔ | ✔ | ✔ | ✔ |
x86 | ✔ | |||
ARM | ✔ | ✔ | ||
ARM64 | ✔ | ✔ | ✔ | |
Requirements | Requirements | Requirements | Requirements |
Before proceeding further, please click on the link above that matches your machine and ensure you have installed all the prerequisites for the build to work.
Additionally, keep in mind that cloning the full history of this repo takes roughly 400-500 MB of network transfer, inflating to a repository that can consume somewhere between 1 to 1.5 GB. A build of the repo can take somewhere between 10 and 20 GB of space for a single OS and Platform configuration depending on the portions of the product built. This might increase over time, so consider this to be a minimum bar for working with this codebase.
Concepts
The runtime repo can be built from a regular, non-administrator command prompt, from the root of the repo, as follows:
For Linux and macOS
./build.sh
For Windows:
build.cmd
This builds the product (in the default debug configuration), but not the tests.
For information about the different options available, supply the argument --help|-h
when invoking the build script:
build -h
On Unix like systems, arguments can be passed in with a single -
or double hyphen --
.
The repository currently consists of different major parts: the runtimes, the libraries, and the installer.
To build just one part you use the root build script (build.cmd/sh), and you add the -subset
flag.
Editing and Debugging
For instructions on how to edit code and debug your changes, see Editing and Debugging.
For instructions on using GitHub Codespaces, see Codespaces.
Configurations
You may need to build the tree in a combination of configurations. This section explains why.
A quick reminder of some concepts -- see the glossary for more on these:
- Debug Configuration -- Non-optimized code. Asserts are enabled.
- Checked Configuration -- Optimized code. Asserts are enabled. Only relevant to CoreCLR runtime.
- Release Configuration -- Optimized code. Asserts are disabled. Runs at the best speed, and suitable for performance profiling. You will have limited debugging experience.
When we talk about mixing configurations, we're discussing the following sub-components:
- Runtime is the execution engine for managed code and there are two different implementations available. Both are written in C/C++, therefore, easier to debug when built in a Debug configuration.
- CoreCLR is the comprehensive execution engine which, if built in Debug Configuration, executes managed code very slowly. For example, it will take a long time to run the managed code unit tests. The code lives under src/coreclr.
- Mono is portable and also slimmer runtime and it's not that sensitive to Debug Configuration for running managed code. You will still need to build it without optimizations to have good runtime debugging experience though. The code lives under src/mono.
- CoreLib (also known as System.Private.CoreLib) is the lowest level managed library. It has a special relationship to the runtimes and therefore it must be built in the matching configuration, e.g., if the runtime you are using was built in a Debug configuration, this must be in a Debug configuration. The runtime agnostic code for this library can be found at src/libraries/System.Private.CoreLib/src.
- Libraries is the bulk of the dlls that are oblivious to the configuration that runtimes and CoreLib were built in. They are most debuggable when built in a Debug configuration, and, happily, they still run sufficiently fast in that configuration that it's acceptable for development work. The code lives under src/libraries.
What does this mean for me?
At this point you probably know what you are planning to work on primarily: the runtimes or libraries.
- if you're working in runtimes, you may want to build everything in the Debug configuration, depending on how comfortable you are debugging optimized native code.
- if you're working in libraries, you will want to use debug libraries with a release version of runtime and CoreLib, because the tests will run faster.
- if you're working in CoreLib - you probably want to try to get the job done with release runtime and CoreLib, and fall back to debug if you need to. The Building Libraries document explains how you'll do this.
Now you know about configurations and how we use them, you will want to read how to build what you plan to work on. Pick one of these:
After that, here's information about how to run tests:
And how to measure performance: