You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switch mono to use cmake-detected objcopy (#83903)
We use `configuretools.cmake` in `coreclr`, native `libs` (for both runtimes), `corehost` and `tests` to locate tools most suitable for the selected toolchain. However for `mono`, we manually specify a hardcoded list of `objcopy` names which require extra step in _each_ cross Dockerfile (e.g. [when distro package provides cross arch binutils](https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/b5ebe26fee6823afc3154d3da8e8540321496ca4/src/ubuntu/22.04/cross/arm64/Dockerfile#L4-L7) and [when distro package doesn't provide one](https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/b5ebe26fee6823afc3154d3da8e8540321496ca4/src/ubuntu/22.04/cross/ppc64le-alpine/Dockerfile#L3-L20)). This manual work is redundant and adds complexity for someone working on porting runtime to a new platform or creating a docker image with runtime build prereqs.
This PR brings mono to the same plan as rest of the native subsets by re-using `configuretools.cmake` in mono for `objcopy` detection and `install_with_stripped_symbols` function out of `functions.cmake`, which takes care of stripping the binaries without dealing with platform differences at call-sites.
ps - moving mono to fully utilize `configurecompiler.cmake` as rest of the native subsets is ultimate goal, but it is non-trivial to accomplish in a single PR.
0 commit comments