Age | Commit message (Collapse) | Author |
|
* Don't pass --minimize to Xcode 13.3 dsymutil
Fixes https://github.com/dotnet/runtime/issues/66770
New xcode command line tools dropped support for the `--minimize` option (which
is now the default).
The related LLVM change is https://github.com/llvm/llvm-project/commit/5d07dc897707f877c45cab6c7e4b65dad7d3ff6d
* fix build with older Xcodes
use a list of options, not a single option with a space in it
Co-authored-by: Kevin Jones <vcsjones@github.com>
|
|
script (#67108)
|
|
When cmake configuration fails due to missing dependency or manually terminated in the middle (Ctrl+C) for some reason, re-running the build command fails with these messages:
```
CMake command line is unchanged. Reusing previous cache instead of regenerating.
Unable to find generated build files for "native libraries component" project!
```
The workaround is to delete artifacts directory and rerun the build command, which is wasteful (as it repreforms all the previous steps including rebuilding the previous subsets). cmake has its own up-to-date caching mechanism which works well on Unix (it has some issues on Windows/MSBuild), so deleting the custom sentinel-based cache on Unix makes it more robust and saves some time. The one in `gen-buildsys.cmd` for Windows is kept intact.
|
|
|
|
(#66677)
* Use managed sourcelink infrastructure to allow for win native sourcelink
|
|
* Reenable 4701
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
|
|
|
|
* Update repo CMake configuration to target /W4 by default
Disable all failing warnings.
* Mono API tests only use W3
|
|
|
|
* Add linux-musl entry for FALLBACK_HOST_RID
* Stay consistent about host vs. target
* Classify linux-musl agnostic of distro
|
|
|
|
|
|
* Check for CMAKE_C_COMPILER_ID not CXX
In some cases, CMAKE_CXX_COMPILER_ID might not be populated,
which causes the toolchaine prefix checks to be ignored, which
causes the build to look for `ranlib` not `llvm-ranlib`, which
causes it to use XCode ranlib instead of Android NDK ranlib for
builds, which doesn't work.
Hopefully (we'll see what CI says) this doesn't regress other builds.
Closes: #55412
* Update eng/native/configuretools.cmake
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
* Use llvm-objcopy, not GNU, on Android
It's available in r21 (which we use today) and works for r23
(which has no GNU objcopy any more and breaks without this change)
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
|
|
* Initial ARMv6 arch addition. Builds mono runtime, not CoreCLR (Mono already supports the CPU arch subset used by Raspberry Pi, whilst porting CoreCLR to e.g. VFPv2 would be major work)
* Build small clr subset on ARMv6, it's needed for SDK and we want to check it works
|
|
* Convert h2inc to a cmake function
* Reuse preprocess_file
|
|
|
|
When user passes versioned native compiler argument such as
`-clang10.1` or `-gcc9.2` to the top-level `:/build.sh`,
`:/eng/build.sh` transforms that to msbuild property called
`<Compiler>` with raw/unprocessed value.
In coreclr, libs, corehost and tests partitions, we end up calling
`:/eng/native/build-commons.sh`, which slices the compiler name, major
and minor versions, then calls `:/eng/native/gen-buildsys.sh` with
individual components. That is just a pass-thru script for the final
`:/eng/common/native/init-compiler.sh`, where those arguments are
actually used.
In `mono.proj` and `NativeExports.csproj`, we do not use
`build-commons` script, but instead, invoke `init-compiler.sh` directly
with the raw `<Compiler>` property. That causes an error when versioned
native compiler is specified on the command line.
This PR fixes this issue by pushing version parsing code into
`init-compiler.sh` so all its consumers get the same behavior.
|
|
In our cross-build setup, we use different heuristics to identify the
target platform first for ourselves, to be then able to set "toolchain
file" settings. Sometimes it is a file that is known to exist in
platform's sysroot directory pointed by `ROOTFS_DIR` (FreeBSD and
illumos), and for Tizen and Android it is `__DistroRid` environment
variable which is used for detection. This environment variable is set
only during the non-portable build.
In NativeExport.csproj, we call toolchain.cmake via
`output-toolchain-info.cmake` using `Exec` task to prepare native
compiler and linker arguments for DNNE project. It is invoked in script
mode where cmake engine does not initialize its built-in modules. For
the handful of build-in modules that we use in `toolchain.cmake`, we
have custom macros in `output-toolchain-info.cmake`.
Tizen build was broken because a) `__DistroRid` was not propagated in
the `Exec` task, b) we were missing custom macro for
`include_directories`.
This delta addresses the issue a) by unifying how different platforms
are detected in toolchain file and forgoes reliance of `__DistroRid`
which is an archiac concept when non-portable builds were the only
option, and issue b) by defining `include_directores` macro.
|
|
The macOS arm64 was using a new mechanism to implement FlushProcessWriteBuffers
because the original one based on a wired memory page doesn't work on arm64.
We have seen people hitting problems with the wired memory page allocation on
x64 in the past due to the fact that wired memory is a scarce resource and
in some cases, e.g. in presence of apps that greedily grab all of the available
wired memory pages, we were unable to initialize coreclr and execute any .NET
application.
This change switches x64 to the same mechanism as arm64 to prevent that issue
from happening and updates the minimum supported x64 macOS to 10.14. That's the
version required for the new APIs the change is using. Apple stopped supporting
10.13 a year ago anyways.
|
|
The top level `Directory.Build.props` imports eng/native/naming.props,
which defines platform specific naming conventions. Use that in places
where locally defined props are used and delete the redundant props.
|
|
|
|
|
|
* Fix a few syntax issues in shell scripts
* Cleanup trailing whitespace in changed files
```sh
# git remote add dotnet https://github.com/dotnet/runtime && git pull --rebase dotnet main
if uname 2>/devnull | grep -q Darwin; then
space=" "
fi
git show --name-only --pretty="" HEAD...dotnet/main |\
xargs -I{} sh -c "test -f {} && sed -i$space'' 's/[[:space:]]*$//' {}"
```
* Address CR feedback
|
|
* Reorganize libs.native
* Fix darwin build
* Fix wasm-win32 build
* Fix pipelines path evaluation
|
|
|
|
This fixes failures encountered when building CoreCLR using the fallback files.
|
|
Co-authored-by: Juan Hoyos <juan.s.hoyos@outlook.com>
|
|
(#58674)
* 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>
|
|
|
|
* Add tizen amrel build CI
* Fix some errors
* Fix platform-matrix.yml
* Skip tests for tizen-armel
* Fix typo
* Introduce a paramter to skip tests
* Update osGroup to Tizen
* Fix an error
* Update fix
|
|
* Fix build with clang 13
Tested with:
```sh
$ clang --version | head -1
Ubuntu clang version 13.0.0-++20211006103153+fd1d8c2f04dd-1~exp1~20211006223759.3
```
* Fix gcc build
* Unify supressions
* Fix Clang 13 -Wcast-function-type warning
`cast from 'void (*)(int, siginfo_t *, void *)' to 'void (*)(int)' converts to incompatible function type`
But going through an intermediate `void (*) (void)` function type is allowed.
Co-authored-by: Aleksey Kliger <aleksey@lambdageek.org>
|
|
|
|
That is, optimize for speed, not for size.
Don't do this for Windows x86, due to
https://github.com/dotnet/runtime/issues/59845
|
|
|
|
* Rocky Linux support
* Remove references to Rocky Linux minor version 8.4
|
|
|
|
|
|
|
|
* Share init-compiler with arcade
* Fixup merge conflict
* typo
|
|
|
|
|
|
* Share compiler configurations across libs & coreclr
* Add comment about suppression
* Address CR feedback
|
|
* Make isMSBuildOnNETCoreSupported return true on s390x
(fixes generating version headers)
* Add s390x platform-specific library name in find_unwind_libs
(enables linking against system-provided libunwind)
|
|
* Fixes for building for FreeBSD x64
Cross-build on Linux for FreeBSD x64 now uses LLVM provided lld
linker to create valid FreeBSD binaries.
find-native-compiler.sh will now look for clang versions 10, 11
and 12. init-compiler.sh will also look for version 12.
The cmake test for HAVE_ALLOC_H in eglib-config.h.cmake.in
would fail if it wasn't defined. The fix was to convert to
an normal C preprocessor #ifdef
Update the docker container to use the most recent version of
ubuntu-18.04-cross-freebsd-12
* Enable cross-build FreeBSD on Linux to find inotify library
Adjusted CMake settings to search the crossrootfs path
for libinotify.so
|
|
dotnet/arcade dotnet/runtime-assets dotnet/hotreload-utils (#57627)
* Update dependencies from https://github.com/dotnet/arcade build 20210817.1
Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
From Version 6.0.0-beta.21413.4 -> To Version 6.0.0-beta.21417.1
* Removed pinned compiler
* Update source-index-stage1.yml
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20210817.5
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21416.5 -> To Version 1.0.0-prerelease.21417.5
* Update dependencies from https://github.com/dotnet/arcade build 20210817.1
Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
From Version 6.0.0-beta.21413.4 -> To Version 6.0.0-beta.21417.1
* Update dependencies from https://github.com/dotnet/runtime-assets build 20210818.1
Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Windows.Extensions.TestData
From Version 6.0.0-beta.21416.1 -> To Version 7.0.0-beta.21418.1
* Update dependencies from https://github.com/dotnet/hotreload-utils build 20210817.1
Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
From Version 1.0.2-alpha.0.21413.1 -> To Version 1.0.2-alpha.0.21417.1
* Update dependencies from https://github.com/dotnet/arcade build 20210818.12
Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
From Version 6.0.0-beta.21413.4 -> To Version 6.0.0-beta.21418.12
* Add dotnet7 feeds
* Update NuGet.config
* Delete source-index.yml
* Update source-index template addition
* Fix Cmake warning about mismatching arguments
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20210818.4
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21416.5 -> To Version 1.0.0-prerelease.21418.4
* Fix extracting string in IJW.cmake
The InitializeDotNetCli function now prints additional messages which means we need to only extract the string we want from getRefPackFolderFromSdk.ps1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
|
|
* Enable `EHCONT` and `CETCOMPAT` for some binaries on Windows
- Followup to https://github.com/dotnet/runtime/pull/55942
- Intended to be merged into a PR that updates to use new PGO profile data collected with the above change
- Enabled `/guard:ehcont` as a linker option for EXEs and DLLs
- Enabled `/cetcompat` as a linker option for DLLs
|
|
Fixes #57062
|
|
* Fix RHEL 8 ARM64
Clang on ARM64 places the .rodata section into the same segment
as .text. On RHEL 8 ARM64, the kernel is configured for 64kB
memory pages. When we flip the page protection of the page containing
the GS cookie to RW and back to RO, we assume that the cookie lives
in a non-executable memory. This assumption is broken on RHEL 8 and
we end up setting protection of a part of the coreclr code to read
only instead of back to RX.
This change switches the linker we use to lld from the previously
used gnu linker. That linker places .rodata into a different segment
than .text by default. Moreover, I was planning to move to using
lld anyways to use all build tools from LLVM.
* Fix ARM build to use PC relative addresses only
The lld linker has revealed that we were using absolute addresses in some
asm helpers and so load time relocation was necessary. This change fixes
it by replacing all of those by PC relative ones.
* Update docker images used for building runtime
Use new images that have lld linker
* Disable lld linker for s390x
|
|
* Enable `EHCONT` for some DLLs and for PGO instrumentation
- PGD files used for PGO optimziation need to be collected/produced against binaries with identical compiler features
- Enabled `/guard:ehcont` as a compiler option but not as a linker option
- Enabled `/guard:ehcont` and `/cetcompat` as a linker options for PGO instrumentation only for now
- Once new profile data is published, another PR would follow to enable `/guard:ehcont` and `/cetcompat` as linker options
* Fix build
|
|
few cases on Windows (#55649)
* Use alternatives to redirecting threads via IP changes in the context, for a few cases on Windows
- For GC/debugger suspension, a new variant of an APC is used to interrupt the thread
- For hardware exceptions, an exception is raised from the vectored exception handler instead of redirecting and then raising an exception
- Made changes to enable /guard:ehcont and /cetcompat for binaries, but commented out the enablement for now since it looks like we will first need .pgd files generated with /guard:ehcont and published for release builds to succeed
|