Skip to content

Conversation

@akoeplinger
Copy link
Member

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

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

/* clock_gettime () is found by configure on Apple builds, but its only present from ios 10, macos 10.12, tvos 10 and watchos 3 */
#if defined (HAVE_CLOCK_MONOTONIC) && (defined(TARGET_IOS) || defined(TARGET_OSX) || defined(TARGET_WATCHOS) || defined(TARGET_TVOS))
#if defined (HAVE_CLOCK_MONOTONIC) && (defined(HOST_IOS) || defined(HOST_OSX) || defined(HOST_WATCHOS) || defined(HOST_TVOS))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't HOST_DARWIN supposed to encompass all of these?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also: ios 10, macos 10.12, etc are pretty old. Do we still need this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minimum supported macOS version is 10.15 in .NET 6, per https://github.com/dotnet/core/blob/main/release-notes/6.0/supported-os.md#macos.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes HOST_DARWIN would work too, good point. I can change that in a separate cleanup since we have similar code elsewhere.

Regarding removing this altogether, we have #58737 which tracks removing it from Android/iOS but last time we tried we hit various issues (#62978) so it needs a bit more care.

Copy link
Member

@lateralusX lateralusX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I think it looks great, nice work!. Most comments are formatting and some around adapting ported code to EventPipe types where possible.

akoeplinger and others added 3 commits March 17, 2022 21:56
Co-authored-by: Johan Lorensson <lateralusx.github@gmail.com>
Fix more formatting.

Move initialization of num_main_args after setting main_args so we can use it as a cheap guard value (not totally thread-safe but good enough for our purposes)
Move cmdline formatting back into object.c
Fix bug return INVALID_HANDLE_VALUE instead of null in ep_rt_file_open_write
Copy link
Member

@lateralusX lateralusX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@akoeplinger akoeplinger merged commit 2637241 into dotnet:main Mar 18, 2022
@akoeplinger akoeplinger deleted the w32-cleanup branch March 18, 2022 15:36
radekdoulik pushed a commit to radekdoulik/runtime that referenced this pull request Mar 30, 2022
…tnet#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>
@ghost ghost locked as resolved and limited conversation to collaborators Apr 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants