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>
|
|
|
|
* 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
|
|
|
|
|
|
|
|
* 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)
|
|
* 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
|
|
|
|
|
|
system is untouched (#49906)
|
|
Co-authored-by: Juan Hoyos <juan.hoyos@microsoft.com>
|
|
|
|
|
|
Initial support for Mac Catalyst for mono subset. This enables building runtime packs and working jobs, but right now the `tests` subset needs some work to allow library test runs in CI
|
|
* Adhoc codesign corrupt signatures
* PR Feedback
|
|
* Replace AWK with Bash scripts
* Replace awk usage with Bash or POSIX tr
* Simplify genmoduleindex.sh
|
|
into static host. (#45995)
* System.Net.Security.Native
* System.Native
* fix for OSX
* fix for wasm
* fix for IOS
* Fix for FreeBSD
* System.Security.Cryptography.Native.OpenSsl
* fix OSX
* Add script to validate entrypoints.c against dll entries
* add missing CryptoNative entries
* Added verification in more projects
* Add missing entries in other files
* System.Security.Cryptography.Native.Apple
* fix for IOS/TVOS
* Change .py verification script to bash
* Update the verify_entrypoints.sh to not to use awk and work on macOS
* PR feedback
* reduce exports of System.IO.Compression.Native.dll on Windows to what is actually used and to match Unix.
* unixexports for System.IO.Compression.Native
* trying to fix IOS/TVOS
* move awk and linker flavor detection to configuretools.cmake
Co-authored-by: Jan Vorlicek <janvorli@microsoft.com>
|
|
XCode linker adhoc signs binaries. Stripping the symbols
corrupts the signature. Replace the adhoc signature
after stripping the symbols.
|
|
When building on Apple Silicon the stripping pass warns about breaking signing
despite not having signed the binary yet. Disable the warning
|
|
of the sdk for platform specific tfms. (#43651)
* eng change
* coreclr change
* libraries change
* tests change
* installer & mono change
* py files changed
* .md change
* .yml change
* remove redundant targetos property
* Windows_NT -> windows after ninja change
* fixing runtime build failure
|
|
(#41897)
* Move DacTableGen out of the CMake build and into tools-local.
* Attempt: usenmakefiles means ninja.
* Make changes to Windows build to support non-VS generators like ninja.
* Use CMake 3.16 PCHs.
* Remove explicit process count.
* Build and run DacTableGen via the .NET CLI we pull down for the build instead of via CMake.
* Update configurecompiler.cmake to specify language (needed for Ninja).
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Get Ninja build working again.
* Pass configuration to cmake configure step for Ninja build.
* Rename flag
* Fix configure step for cross-arch native build
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Support building via Ninja for coreclr via an MSBuild property
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Implement support for opening the CoreCLR solution in VS via the -vs flag.
* Fix setting generator to Ninja.
* Merge libraries gen-buildsys-win.bat with runtime gen-buildsys.cmd to share windows cmake configure infra.
* Enable building libraries native build with ninja.
* Centralize setting CMAKE_SYSTEM_VERSION for windows builds.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Update host build to use shared gen-buildsys.cmd
* Fix multi-config generator detection.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Exit with success when we build successfully.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Enable and fix up Ninja build for hosts.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Only link delayimp.lib on Windows
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Remove "overriding /W3 with /W1" warning in Ninja build of hosts by turning on /W3 and disabling any new warnings we hit.
* Reduce command line override warnings by adopting the MSVC_RUNTIME_LIBRARY abstraction feature in CMake 3.14+ (below the minimum requirement on Windows).
* Use the delayed expansion syntax to correctly pass in the config to cmake.
* Move all usages of MSVC runtime library selection to the CMake abstraction to reduce console spew about overridden flags.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Condition the rest of the compiler options correctly so they don't show up as invalid parameter warnings for assembly builds.
* Correctly build DIALib and DacTableGen as AnyCPU
* Fix WRITE_BARRIER_CHECK define
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Fix passing arch for MSBuild build.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Configure ASM compiler command line format in configurecompiler.cmake and use CMake's assembly compilation step to build ASM files for ARM/ARM64 instead of manually building them and adding the generated files as additional sources.
* Cleanup after fixing ARM/ARM64 support.
* Rename variable
* Condition PCH's for C++-only as needed to fix using them on non-Windows (where we compile C as C instead of as C++).
* Fix CoreCLR native test build on windows to point to new gen-buildsys location.
* Add missing compilation options in Ninja build that are implicitly defined in the MSBuild build.
* Disable analyzers for DacTableGen. Remove /MAP linker flag (that's for local testing).
* Upgrade to CMake 3.16.4
* Don't warn on unused variables in CMake (these usually vary on platform/config)
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Manually compile ARM and ARM64 asm files when using the VS generator since it doesn't support emitting MARMASM item types in projects (and as a result cannot compile ARM or ARM64 asm without assistance).
* Enable CMake policy in test build to use CMAKE_MSVC_RUNTIME_LIBRARY variable.
* Update initially disabled warnings in host.
* Add -ninja arg to root scripts to enable using Ninja.
* Enable using Ninja in CoreCLR CI.
* Try to fix passing the -ninja arg in yaml.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Add ninja to the Windows invocation
* Fix 2-phase cross targeting to do one phase at a time and initialize the VC++ environment for the correct build tools each time instead of interleaving them and relying on Visual Studio to handle the differing targets.
* Restore old /Ox optimization setting for Release.
* Fix typos, don't pass exception flags to C files.
* Remove unneeded pragma.
* Fix .pgd file installation.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Add mention of the `-ninja` flag in the Building CoreCLR documentation.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Mention installation locations for Ninja and warn while building if CMake is older than 3.16.0.
* Update docs/workflow/requirements/windows-requirements.md
|
|
When packaging .NET for Linux distributions, the package builders
generally use a different workflow for shipping symbols to users:
1. The package maintainer builds code with the debug flags (such as
`-g`) to generate full native debug info and symbols.
2. Nothing is stripped from build by the package maintainer.
3. The build system (`rpmbuild`, `debuild`) removes the debug
info (or debug symbols) from the code and creates separate
`-debuginfo` or `-debug` packages that contain just the debug
symbols.
4. These debug packages are then distributed along with the normal
packages using the normal Linux distribution mechanisms. This lets
users install the exact set of debug symbols matching their other
package.
To support this workflow in dotnet/runtime, we need to add optional
support for not stripping debug symbols. I used it has follows:
CFLAGS=-g CXXFLAGS=-g ./build.sh --keepnativesymbols true
After this build, the built binaries include all debug symbols.
I can then rely on the distro package build system to identify, strip,
package and ship the debug info/symbols separately.
See https://github.com/dotnet/runtime/issues/3781 and
https://github.com/dotnet/source-build/issues/267 for more details on
the background and motivation.
For some related fixes, see:
- https://github.com/dotnet/coreclr/pull/3445
- https://github.com/dotnet/corefx/pull/24979
|
|
Refactor the PAL test framework to be useable in our CI system, and enable it for testing
The existing PAL tests are problematic in a few ways for our CI.
1. They are large in terms of disk space used per test, this interferes with building them properly, especially as they are part of the product build, and not of the test build
2. While part of the product build, the option to build them was well hidden.
3. The tests are not related to our existing tests, and in particular are not driven from managed xunit wrappers.
The change here has 4 components
1. Reduce the volume of the binaries such that they can be passed from a product build to a test job effectively. This is done by merging all tests which are not strictly dependent on secondary libraries.
- This was done via a tool which parsed and replaced all of the CMakeFiles.txt
- And then manual editing to remove all duplicate global symbols
2. The build flag for building the tests has been exposed as a first class option to build-runtime, as well as through the subset mechanism. As of this change, developers who wish to build the tests should use the clr.paltests subset to build the tests.
3. As the tests do not have normal xunit wrappers, but they *do* have a script which will generate xunit output, they cannot quite be run in the existing helix pathway. Add a separate path for launch the appropriate helix workitem as part of outerloop test runs.
4. A new issue exclusion mechanism has been built. Add exclusions by modifying src/coreclr/src/pal/tests/palsuite/issues.targets
- There are a number of failures in the current test suite that should probably be investigated, but making meaningful changes to the tests should not be part of this change.
|
|
* Strip binaries more aggressively
We are currently stripping only debug symbols, but there are also other
symbols that can be stripped without affecting debuggability or anything
else. We were stripping the binaries in corefx that way in the past,
but some time ago we have unified the stripping between the former
three repos and started to strip just the debugging symbols.
This change strips all unneeded symbols, which results in significant
reduction of the binaries sizes. For example, libcoreclr.so went down
from 8732272 to 7027024 or libSystem.Security.Cryptography.Native.OpenSsl.so
went down from 163376 to 120952.
* Fix FreeBSD
* Fix FreeBSD and OSX
We use nm command to extract g_dacTable symbol value from libcoreclr
for the DAC purposes. On OSX, there are no dynamic symbols, on
FreeBSD, the stripping strips all regular symbols and leaves
dynamic ones only. So the nm needs to get a -D argument for
non OSX.
|
|
We were incorrectly adding the version.c source to all coreclr
libraries and not just the shared ones. That caused multiple
occurences of the version string in coreclr shared libraries
composed of sublibraries.
This change fixes it by adding that source file for shared
libraries only.
I've also discovered that libcoreclrtraceptprovider.so was
missing the version string completely, so I've added it there.
|
|
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
Co-authored-by: Jan Vorlicek <janvorli@microsoft.com>
|
|
* make all-inclusive coreclr_static.lib and link into singlefilehost
* Disable superhost linking on windows for now (issues with mixed Debug-on-Release builds)
* shim coreclr policy between singlefile and standalone hosts
* enable exports on singlefilehost executable
* export __progname, perhaps it will make FreeBSD happy.
* add environ too
* mergeable wks and jit
* ignore empty clr_path in single_file_bundle
* hide R2R specific assert behind R2R ifdef
* produce separate obj files from platform specific asm files for mergeable WKS - to make CMake happy
* remove libcoreclr and libclrjit from netcoreapp/pkg
* temporary disable setting up GS cookie on OSX superhost
* renamed clrjit_static folder dll->static
* extract JIT dllmain.cpp and eliminate clrjit_mergeable
* make coreclr_static dependent on def/exports files instead of coreclr.
* reducing double-build in cee_wks to just few files. Most of cee_wks is built once as an obj library and reused.
* bring back cee_wks_mergeable and push shared object lib stuff lower to cee_wks_core
* A comment about FreeBSD-specific workaround.
* move finding unwind libs to a CMake function
* since we have files compiled differently between embedded and standalone coreclr, we do not need EMBEDDED_RUNTIME marker.
* renamed host_resolver_t.h and host_resolver_t.cpp to not have "_t"
* path separating slash when forming CORECLR_STATIC_LIB_LOCATION
|
|
|
|
* hostfxr: Build most of hostfxr as a static library
This is part of the work to create an apphost that bundles both hostfxr
and hostpolicy. The main distinction between the static and shared
versions of hostfxr is that the static version contains a hostpolicy
resolver that references the hostpolicy symbols directly rather than
loading them from a DLL.
* hostpolicy: Build as a static library
This change is part of the work to enable an apphost that bundles both
hostfxr and hostpolicy. There's no distinction between hostpolicy
that's built as a shared library and as a static library: the shared
library is built by linking an empty object file with the static
library.
* corehost: Allow linking of hostfxr and hostpolicy with apphost
Provide a hostfxr_iface class, that abstracts how the hostfxr functions called
by the early stage in the hosting layer is resolved.
* dotnet: Teach the muxer binary about hostfxr_iface
* apphost: Teach apphost about hostfxr_iface
This provides two implementations of hostfxr_iface: one for the static
apphost, which bundles hostfxr and hostpolicy, and another for the
conventional apphost, which loads them dynamically on startup.
* Add exports for hostfxr and policy
* Exports for unix
* EXPORTS_LINKER_OPTION
* use generateversionscript.awk from ENG
* Move fxr files out of static
* Fixes for Linux
* Fix for win-x86
* move HEADERS next to SOURCES similarly to other files.
* PR feedback (simplifying hostpolicy_resolver::try_get_dir for static host)
* Publish static_apphost to Microsoft.NETCore.App.Host
* bind to entry points without probing, when in a static host.
* Add a test case
* renamed hostfxr_iface --> hostfxr_resolver_t
* renamed shared --> standalone
* rename static_apphost --> singlefilehost
* Signing exclusions for singlefilehost
* switched StaticHost tst to a different asset (mostly a copy of StandaloneApp)
* get_method_module_path
Co-authored-by: Leandro Pereira <leandro.pereira@microsoft.com>
Co-authored-by: Swaroop Sridhar <swaroop.sridhar@microsoft.com>
|
|
(#36076)
This reverts commit f6e5219b13f4bb9d6c1c9f80fd6ca6c594c6c7f8.
|
|
* hostfxr: Build most of hostfxr as a static library
This is part of the work to create an apphost that bundles both hostfxr
and hostpolicy. The main distinction between the static and shared
versions of hostfxr is that the static version contains a hostpolicy
resolver that references the hostpolicy symbols directly rather than
loading them from a DLL.
* hostpolicy: Build as a static library
This change is part of the work to enable an apphost that bundles both
hostfxr and hostpolicy. There's no distinction between hostpolicy
that's built as a shared library and as a static library: the shared
library is built by linking an empty object file with the static
library.
* corehost: Allow linking of hostfxr and hostpolicy with apphost
Provide a hostfxr_iface class, that abstracts how the hostfxr functions called
by the early stage in the hosting layer is resolved.
* dotnet: Teach the muxer binary about hostfxr_iface
* apphost: Teach apphost about hostfxr_iface
This provides two implementations of hostfxr_iface: one for the static
apphost, which bundles hostfxr and hostpolicy, and another for the
conventional apphost, which loads them dynamically on startup.
* Add exports for hostfxr and policy
* Exports for unix
* EXPORTS_LINKER_OPTION
* use generateversionscript.awk from ENG
* Move fxr files out of static
* Fixes for Linux
* Fix for win-x86
* move HEADERS next to SOURCES similarly to other files.
* PR feedback (simplifying hostpolicy_resolver::try_get_dir for static host)
* Publish static_apphost to Microsoft.NETCore.App.Host
* bind to entry points without probing, when in a static host.
* Add a test case
* renamed hostfxr_iface --> hostfxr_resolver_t
* renamed shared --> standalone
* rename static_apphost --> singlefilehost
* Signing exclusions for singlefilehost
* switched StaticHost tst to a different asset (mostly a copy of StandaloneApp)
Co-authored-by: Leandro Pereira <leandro.pereira@microsoft.com>
Co-authored-by: Swaroop Sridhar <swaroop.sridhar@microsoft.com>
|
|
The strip command we invoke was stripping even the information that
is necessary for the debugger to find the separate .dwarf files,
so these symbol files had to be loaded manually into lldb. With
this fix, lldb loads them automatically.
|
|
This change replaces managed GetModuleIndex tool by shell scripts using
native tools.
|
|
|
|
|
|
* Fix debug symbol generation
The debug symbol generation got recently broken. For most of the
shared libraries, the debug symbols were stripped twice due to
the fact that install_clr for them was invoked twice - once for
the default install location and once for the sharedFramework
location and the stripping was executed in both of them. First
stripping stripped the symbols off the target binary and set
so called debuglink in the binary to point to the symbol file.
This debuglink includes a crc32 of the dbg symbols file.
The second stripping tried to strip symbols from the already
stripped binary. That resulted in a small dbg symbols file
that didn't actually contain any useful symbols. Moreover,
it is not possible to set a debuglink in a binary if it is
already set there. So the second attempt failed and the crc
was left set to the crc of the previous debug. Thus when
debugger loads such a binary, it cannot find the debug symbols
file, as the crc doesn't match. And even if it matched, the
data would have no value.
The fix is to modify install_clr so that it has an extra
optional argument to specify the secondary install location and
use just one install_clr per target. The function then does the
stripping just once and the actual installation once or twice
depending on the secondary location argumenbt presence.
* Fix libraries and installer
* Fix installer placement of lib files
|
|
https://github.com/dotnet/runtime/pull/33716 set TARGET_DARWIN for iOS too but most of the logic is really OSX-specific.
Unset TARGET_DARWIN for iOS and rename the rest of the occurrences to TARGET_OSX.
|
|
* Unify some cmake function definitions
* Address CR feedback
* Make installers /Zc:strictStrings compatible
* Make installer /Gz compatible
* Remove skip-strip internal implementation
* Use CLR_CMAKE_TARGET_DARWIN
* Establish iOS to Darwin relationship
* Simplify iOS conditions
|
|
* Fix native components build for Android
* Add cmake introspection for pthread_setcancelstate
* Address CR feedback
* Use calculated eth speed for Android
* Use #ifdef FEATURE_EVENT_TRACE
|
|
|
|
* Unify build_native via eng/native/build-commons
In order to add new platform, architecture, compiler or its newer
version, there are currently multiple places to update, which can be
deduplicated.
This patch unifies:
* directories creation
* prerequisites checking
* `version.c` generation
* native build invocation
* common argument parsing
* building help menu
for various build scripts under coreclr, installer and libraries.
The common entry-point script is now `eng/native/build-commons.sh` and
rest of the scripts under `eng/native` are implementation detail.
Also extracted CMake platform detection in
`eng/native/configureplatform.cmake`, to share with coreclr and
`installer/corehost`.
* Use if [[ cond ]] in all places
|