[mono] Move basic w32file* and w32process* functions to eventpipe (#66731)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Fri, 18 Mar 2022 15:36:38 +0000 (16:36 +0100)
committerGitHub <noreply@github.com>
Fri, 18 Mar 2022 15:36:38 +0000 (16:36 +0100)
commit26372410d43ebb19220cce868a6f87186f88b2ce
tree0e2daed3232cb958a775c7994fb5ea2216635bee
parentdaa320afa52ecd390782b1b54f92dc18448ab43b
[mono] Move basic w32file* and w32process* functions to eventpipe (#66731)

They are not used by the rest of the runtime and we only need a bare minimum of w32process and w32file in eventpipe (e.g. no file share/access logic).

Fix ep-test build and warnings, it was missing linking against libz and monoapi.

Fix host vs. target confusion in ep-rt-mono.c

Move initialization of num_main_args after setting main_args in object.c so we can use it as a cheap guard value (not totally thread-safe but good enough for our purposes).

Co-authored-by: Johan Lorensson <lateralusx.github@gmail.com>
32 files changed:
.github/CODEOWNERS
src/mono/cmake/config.h.in
src/mono/cmake/configure.cmake
src/mono/mono/eventpipe/ep-rt-mono.c
src/mono/mono/eventpipe/ep-rt-mono.h
src/mono/mono/eventpipe/test/CMakeLists.txt
src/mono/mono/eventpipe/test/ep-buffer-tests.c
src/mono/mono/metadata/CMakeLists.txt
src/mono/mono/metadata/appdomain.c
src/mono/mono/metadata/domain.c
src/mono/mono/metadata/environment-internals.h [deleted file]
src/mono/mono/metadata/environment.c
src/mono/mono/metadata/fdhandle.c [deleted file]
src/mono/mono/metadata/fdhandle.h [deleted file]
src/mono/mono/metadata/icall-decl.h
src/mono/mono/metadata/icall.c
src/mono/mono/metadata/object-internals.h
src/mono/mono/metadata/object.c
src/mono/mono/metadata/sgen-mono-ilgen.c
src/mono/mono/metadata/threads.c
src/mono/mono/metadata/w32file-unix.c [deleted file]
src/mono/mono/metadata/w32file-win32.c [deleted file]
src/mono/mono/metadata/w32file.h [deleted file]
src/mono/mono/metadata/w32process-unix-bsd.c [deleted file]
src/mono/mono/metadata/w32process-unix-default.c [deleted file]
src/mono/mono/metadata/w32process-unix-haiku.c [deleted file]
src/mono/mono/metadata/w32process-unix-internals.h [deleted file]
src/mono/mono/metadata/w32process-unix-osx.c [deleted file]
src/mono/mono/metadata/w32process.h [deleted file]
src/mono/mono/mini/driver.c
src/mono/mono/utils/mono-forward-internal.h
src/mono/mono/utils/mono-threads.h