* Enable AddressSanitizer in CoreCLR, Libs, and Host and update runtime-sanitized to run tests with ASAN on Linux and Mac
* Unify on HAS_ADDRESS_SANITIZER define name
Centralize setting up sanitizer flags.
Remove last usage of CLR_CMAKE_ENABLE_ASAN outside of eng/native
Remove unnecessary diffs
Use the cpuid intrinsic and enable ASAN on InitJitHelpers1.
Add comments for the places where we have ASAN disabled
Undo changes to src/coreclr/jit/CMakeLists.txt
Add docs and fix the docs in the build script.
Add docs for the SkipVCEnvInit hook
* Remove CRT runtime changes. We won't need this when we finally onboard to Windows with some changes they have coming down the pipeline, so remove them for now to reduce the diff of this PR.
* Remove suppression now that we've fixed the underlying issue.
* Remove some Windows-only sanitizer CMake that we won't need when ASAN is ready for us to consume on Windows.
* Set schedule for runtime-sanitized pipeline
* Remove workaround in JIT memory set/copy helpers now that the JIT bug has been fixed.
* Add missing helix queues setup template.
* Fix missing command to build nativeaot runtime tests as nativeaot.
* Add a scenario name to trigger the extended timeout in the libraries test helix configuration.
* Remove extraneous whitespace.
* Fix using the cross-targetting ILC when sanitizers are enabled. Also pass through our TargetOS and TargetArchitecture variables to the publish command for our native sanitizers targets to correctly do their extra logic.
* Disable LSAN on the CustomMain test.
* Disable some tests on sanitized runtimes.
* Copy the sanitizer runtime for OSX NativeAOT runtime tests.
* A little cleanup to try to get the build right now that we are always doing cross-builds on Linux.
* Fix crossgen-corelib.proj syntax.
* Fix cross-os dac builds to not include the host architecture in the output path.
* Split the debugger components into a separate component and make the "unsanitized cross components" build into an "unsanitized debugger components" build as it can't be part of the regular cross-components build
* Always write out the host-arch path on Windows and update the cross-dac build script to expect that.
* Change to use the dynamic runtime on Windows, as ASAN in VS is moving to a dynamic-only model.
* Update docker images to include the sanitizer runtimes in the crossrootfs images.
* Fix explicit image tags
* The unsanitized build should be of the target architecture, not the host architecture. As a result, we still need a cross-arch build for the cross-arch use cases when sanitized, as well as an unsanitized target arch build for the debugger tools.
* Turn off using the sigaltstack for NativeAOT tests that don't use the asansupport.cpp default options
* Make sure the shared ASAN runtime is present for the nativeaot/SmokeTests/SharedLibrary test.
* Disable crossgen2 tests with sanitizers as they don't get us interesting coverage.
* Fix custom default options and disable some more crossgen2-based tests.
* Simplify lookup of asan runtime on mac and fix copying the shared runtime for the SharedLibrary NativeAOT test.
* Disable test that's failing for weird reasons.
* Fix one more alloc-dealloc mismatch that only started to show up after test merging increased allocations in the runtime
* Disable the System.Text.Json test suite on sanitized builds as it causes SO failures on Mac
* Fix test exclusion
* PR feedback.
* Fix mac build
* Do review changes
* Add libbootstrapper object files to the platform manifest now that NativeAOT has
* Disable tests that check size on sanitized builds
* Use the built-in `include_guard` option
* Disable use-after-return checking in ASAN. CoreCLR doesn't do well with parallel stacks.
* Only pass the no UAR flag on C and CXX with Clang (not AppleClang).
Follow-up on #32451
Follow-up on #80074
In #43651, the "Windows" OS name was lowercased to achieve target frameworks with RIDs in them. At that time, the original plan was to lowercase all TargetOS values but that had to be cut because of resources. This PR finishes that and updates build systems, YML, markdowns and managed components.
To not break existing developer workflows, the passed-in -os value is automatically lower-cased in the script entry points and validated in the msbuild entry point.
* Update libraries' building docs for native components
Also added a (short) ReadMe.md to src/native/libs.
* Removed trailing whitespace
* Update src/native/libs/ReadMe.md
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Move optdata and version file generation from the native build scripts up into the managed scripts. The native build scripts will now by default copy a fallback version file in place if the version files do not exist and will disable PGO if no pgo file path is passed in to the build-runtime scripts.
This removes all cases of build-runtime calling into MSBuild.
* Update CI to use the new prereqs model.
* Remove some old MSBuild arg pass-through that's no longer needed as build-runtime no longer calls into any MSBuild processes.
* Apply suggestions from code review
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Move some targets around based on feedback.
* Output version files in the artifacts/obj dir so they can be easily shared.
* Move native pgo into a targets file instead of being a separate project to be more static-graph friendly.
* Fix subsets.
* Share version file path by default
* Fix VER_FILEDESCRIPTION_STR
* Fix version fallback copies.
* Fix include path for the version headers.
* Update src/coreclr/dlls/mscordac/CMakeLists.txt
Co-authored-by: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com>
* Enable easily sharing the fallback version files between all components of the repo.
* Remove some now-unused command-line options from our build scripts.
* Bump importance output to pass the pgo path between steps.
* Add eval statement to run copy_version_files script
* Rename some files and and standardize on a _version.c file name for Linux.
* Remove temp proj ref.
* Fix permissions
* Reference targets to produce version file in libraries native build.
* Fix CoreCLR build breaks
* Generate the version files for Mono
* include configurepaths.cmake on the Windows CoreFX build.
* Restore mono.proj when building it through monoaotcross.proj.
* Update copy script to work on macos.
* Make sure mono pulls in the shared version files.
* Add artifcats/obj dir as include dir for CoreCLR diagonstic components included in Mono
* Add artifacts/obj include for the whole mono build.
* Update CMakeLists.txt
* Fix NativeVersion.rc path on Windows.
* Fix linux version parsing to point at the right file.
* Fix mono version parsing (apparently the quotes make a difference here)
* Update src/coreclr/build-runtime.sh
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
* Update eng/native/version/copy_version_files.sh
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
* Update copy_version_files.sh to insert the current commit hash into _version.c.
* Apply suggestions from code review
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
* Update the _version.c writing script to only update the placeholder version file if it actually is a placeholder (not a real generated file).
* Generate the version files for wasm/browser as well.
* Fix Mono WASM cross build.
* Update eng/nativepgo.targets
Co-authored-by: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com>
* Fix comparison for NativeOptimizationDataSupported.
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com>
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
* Remove EOL tfms and upgrade to net7.0
* Make linker tests net7 aware
Make installer tests run on net7.0
Don't attempt to use live apphost
Fix payloads
Regenerate test files
Fix package testing
Bumps emscripten to 2.0.23
The Browser AOT tests now use `-Wl,-lto-O0` option to reduce memory usage of `wasm-ld` tool, which was in some cases going over avaiable 8GB on helix machines.
* Revert "Add ActiveIssue to the MemoryMappedFiles tests"
This reverts commit ec1ae530606ef1061680600fc046226cc1c4cbc3.
* Revert "Add ActiveIssue attr to the FileSystem tests"
This reverts commit 356b3ff2a703980ac01b9df697a594e8c341c436.
* Bump emscripten version to 2.0.23
* Use newer docker images with 2.0.23
* Update docs
* Use 2.0.23 emscripten nuget packages
* Revert "Revert "Add ActiveIssue attr to the FileSystem tests""
This reverts commit eb2f9548b08c114b359fab8d867ba50de098fe48.
The fix is not present in 2.0.23
* Revert "Revert "Add ActiveIssue to the MemoryMappedFiles tests""
This reverts commit 8be39f583499a8d8451034c65260a785330b0795.
The fix is not present in 2.0.23
* Increase timeout for AOT tests
* Add description of emscripten bump to README
* Try to get information about resources
* Get all limits
* Escape & chars
* Reduce platform matrix
* Lets try one more build with doubled timeout
* Revert "Lets try one more build with doubled timeout"
This reverts commit 67dd7754bb79218b2c6b687034162d041715093e.
* Try -Wl,-O0 on CI
To be sure it behaves the same as in local build
* Use -Wl,-lto-O0 do lower link time optimization
It looks like it reduces the memory load a lot
* Set EmccLinkOptimizationFlag for AOT tests
And reset the default value
* Escape commas
* Revert "Reduce platform matrix"
This reverts commit fec0e557208eb165824e75cd57b895a74d164de4.
* Remove resource info retrieval
* Bump emsdk versions
Co-authored-by: Larry Ewing <lewing@microsoft.com>
* Bump emscripten version
* Rename __padding to _padding to avoid warnings
And errors as we use `-Werror`:
error G94F6014A: identifier '__padding' is reserved because it starts with '__'
C99 and C++ standard defines indentifiers with `__` prefix as reserved.
* Fix cast warning/error
With latest emscripten we get this warning (and error as we use
`-Werror`):
src/libraries/Native/Unix/System.Native/pal_process.c(374,92): error G3DC5E52A: cast from 'void (*)(int, siginfo_t *, void *)' to 'void (*)(int)' converts to incompatible function type [-Werror,-Wcast-function-type]
void (*oldhandler)(int) = (((unsigned int)sa_old.sa_flags) & SA_SIGINFO) ? (void (*)(int))sa_old.sa_sigaction : sa_old.sa_handler;
* Add `-s DISABLE_EXCEPTION_CATCHING=0`
when building dotnet.js
* Use EMSDK_PYTHON
* Use delayed expansion
Before the `EMSDK_PYTHON` was evaluated before running
the `emsdk_env.bat` script.
* Replace deprecated EXTRA_EXPORTED_RUNTIME_METHODS
with EXPORTED_RUNTIME_METHODS
Build warning/error:
emcc : warning : EXTRA_EXPORTED_RUNTIME_METHODS is deprecated, please use EXPORTED_RUNTIME_METHODS instead [-Wdeprecated]
* Don't need to cast anymore
* 2.0.21 was just released, so try our luck ;-)
* Use new docker images with 2.0.21
* Use the sys includes fix on all platforms
* Remove deprecated --llvm-opts usage
Context: 0691cc68ee
* Update emscripten version in the workload manifest
* Update emscripten versions in the docs
* Update eng/ versions
* Add ActiveIssue attr in the MemoryCacheTest
* Add ActiveIssue attr to the FileSystem tests
* Update after merge
* Resolve one more conflict
* Add ActiveIssue to the MemoryMappedFiles tests
* Revert "Fix cast warning/error"
This reverts commit 0a1aa4a88c07bc48d3d35c68369d1dca4897d849.
* Unset HAVE_FORK for Browser
* Remove active issue
Fixed by 93cf5df65f
* Set HAVE_FORK to 0
* Set HAVE_FORK to 0 instead if unsetting
* Remove -s DISABLE_EXCEPTION_CATCHING=0
It might not be needed anymore
* Improve generated dump debugging instructions
* Update eng/testing/debug-dump-template.md
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Update eng/testing/debug-dump-template.md
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Update eng/testing/debug-dump-template.md
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Update debug-dump-template.md
* Fix ```
* fix some ```cmd
* Reverse .cmd to .bat
* Open only for reading
* Improve foldername
* Install only one SOS
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Add a subset for compiling only the wasm runtime: `mono.wasmruntime`
This allows us to rebuild the wasm runtime without building the full libraries subset.
Updated documentation with new guidance.
Updated how we build the dotnet.timezones.blat.
* Trim trailing whitespaces
* Match raw with rendered
* Delete extra asterisks and |
* Update ELT Hooks - tail calls.md
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
- Remove depprojs which currently binplace external references into the RefPath folders in favor of PackageReference and PackageDownload items.
- Build all configurations by default when building an individual project (either on the CLI or inside VS) same as with the official SDK. This enables .NETFramework Test Explorer support.
- Centrally define libraries that compose the shared framework instead of in each Directory.Build.props file to be able to build the targeting pack first and consume it in the OOB libraries.
- Use ProjectReferences to reference OOB projects. Compile against the reference assembly but use the implementation assembly app-local during runtime.
- Remove OOBs from the testhost and remove the testhost folder for .NETFramework as it isn't required anymore.
- Only binplace for $(NetCoreAppCurrent) to compose a) the targeting pack, b) the runtime pack, c) the testhost, d) a full closure for the shims.
- Use Targeting Packs for OOB projects (with their implicit assembly references) but still explicitly define granular references for .NETCoreApp configurations (DisableImplicitAssemblyReferences switch). Use the implicit targeting pack references in some Microsoft.Extensions.* cases.
- Remove placeholder configurations as they aren't needed anymore with explicit P2Ps vs Targeting Pack references.
- Remove implicit assembly references (ie for .NETFramework, mscorlib)
- Remove AssemblySearchPath hacks that were introduced with b7c4cb7 as the targeting pack is now used by default.
- Reduce unnecessary .NETFramework configurations that were added to run tests in favor of the already existing ref&src configurations.
- Stop hardcoding the paths for wasm assemblies and use the returned TargetPath of the ProjectReferences.
- Addressed formatting (ItemGroups, References at the bottom of the project file, ordering of references, use LibrariesProjectRoot instead of a relative path, unnecessary AssemblyName and RootNamespace properties which are identical to the project name, ordering of tfms)
- Revert "fix clean (#33758)"
* Enable dotnet test
* Update docs
* Use vstest in F5 scenarios
* Make dotnet test without framework switch work
* Code cleanup
* Only run code coverage conditionally
* Fix F5 condition for netcoreapp
* Downgrade sdk to check for helix submission failures
* Fix wrong conditions
* Add blame data collector
* Redesign subset feature and remove subsetcategory
Implement proposal from https://github.com/dotnet/runtime/issues/34403.
Remove subsetcategory and allow all subsets to specified via the -subset
switch.
- Use RestoreUseStaticGraphEvaluation which improves no-op restore by 10-15x down to 10-20 seconds.
- .builds msbuild files renamed to .proj as RestoreUseStaticGraphEvaluation throws for non .proj files without an env var set.
- Introducing subsets for libraries and mono and replacing -buildtests switch which was only working for libraries in favor of the subset switch -subset tests which works consistently.
- Fixing the Microsoft.DotNet.CodeAnalysis analyzer which wasn't running and adding missing exclusions.
- Separating restore and build phases in different parts in the repo (ie for installer.tasks) as generated props and targets need to be imported which requires a reevaluation in the build phase.
- Fix eng/docker/build-docker-sdk.ps1 by using the official build entrypoints (cc @alnikola)
- Remove a few depprojs in favor of project restore (faster restore :))
- Fix root code coverage measurement not working correctly
- Traversal support instead of dir.traversal.targets or manual build target defines.
- Introduce a root Build.proj entrypoint which is responsible for building and restoring the repository. This is necessary to enable the new NuGet fast restore which works best and fastest with a single entrypoint.
- Avoid binclashes in libraries and between libraries and installer (netstandard.depproj vs netstandard.csproj)
- Upgrading the SDK to 5.0 latest
- Code cleanup