Skip to content

Remove GetCommandLineW from PAL#125386

Merged
jkotas merged 32 commits into
dotnet:mainfrom
huoyaoyuan:pal/commandline
Jun 6, 2026
Merged

Remove GetCommandLineW from PAL#125386
jkotas merged 32 commits into
dotnet:mainfrom
huoyaoyuan:pal/commandline

Conversation

@huoyaoyuan
Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions Bot added the area-PAL-coreclr only for closed issues label Mar 10, 2026
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Mar 10, 2026
Comment thread src/coreclr/vm/ceeload.cpp
Comment thread src/coreclr/vm/ceeload.cpp Outdated
@jkoritzinsky
Copy link
Copy Markdown
Member

@dotnet/dotnet-diag-contrib for the EventPipe impact

@lateralusX
Copy link
Copy Markdown
Member

lateralusX commented Mar 12, 2026

What is the motivation behind doing the change?

@huoyaoyuan
Copy link
Copy Markdown
Member Author

The motivation is to cleanup PAL layer and transit to minipal gradually.

Comment thread src/coreclr/vm/ceeload.cpp Outdated
Comment thread src/coreclr/vm/ceeload.cpp Outdated
Comment thread src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h Outdated
Comment thread src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h Outdated
Comment thread src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h Outdated
Comment thread src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the PAL-provided GetCommandLineW implementation (and its PALSuite test) and updates CoreCLR callers to avoid relying on PAL command-line storage on Unix, using minipal executable-path facilities as a diagnostics fallback instead.

Changes:

  • Remove GetCommandLineW and related command-line storage/cleanup from the Unix PAL implementation and headers.
  • Update CoreCLR diagnostics command line fallback on Unix to use minipal_getexepath() and clarify the “approximate” nature of the value.
  • Remove PALSuite coverage and build/list entries for the removed GetCommandLineW test.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h Clarifies diagnostics command line is an approximation.
src/coreclr/vm/ceeload.cpp Replaces Unix fallback from PAL GetCommandLineW to exe-path based fallback; updates command line construction on Unix.
src/coreclr/pal/tests/palsuite/paltestlist.txt Removes GetCommandLineW PALSuite test entry.
src/coreclr/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/test.cpp Deletes the GetCommandLineW PALSuite test source.
src/coreclr/pal/tests/palsuite/compilableTests.txt Removes GetCommandLineW test from compilable list.
src/coreclr/pal/tests/palsuite/CMakeLists.txt Stops building the removed GetCommandLineW test.
src/coreclr/pal/src/thread/process.cpp Removes PAL GetCommandLineW and command-line storage/cleanup helpers.
src/coreclr/pal/src/init/pal.cpp Removes argv→command-line formatting and updates PAL init path for CoreCLR initialization.
src/coreclr/pal/src/include/pal/procobj.hpp Removes InitializeProcessCommandLine declaration.
src/coreclr/pal/src/include/pal/process.h Removes PROCCleanupInitialProcess declaration.
src/coreclr/pal/inc/pal.h Updates PAL_InitializeCoreCLR signature and removes GetCommandLineW declaration/macro.
src/coreclr/dlls/mscoree/exports.cpp Updates coreclr_initialize to call new PAL_InitializeCoreCLR signature on Unix.

Comment thread src/coreclr/vm/ceeload.cpp
Comment thread src/coreclr/vm/ceeload.cpp
Comment thread src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h Outdated
Comment thread src/coreclr/pal/src/init/pal.cpp
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h Outdated
@jkotas
Copy link
Copy Markdown
Member

jkotas commented Jun 5, 2026

@huoyaoyuan Please take a look at the copilot feedback above

@jkotas
Copy link
Copy Markdown
Member

jkotas commented Jun 6, 2026

Could you please resolve conflicts?

Copy link
Copy Markdown
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thanks

@jkotas jkotas merged commit c0d7ef5 into dotnet:main Jun 6, 2026
112 of 114 checks passed
@huoyaoyuan huoyaoyuan deleted the pal/commandline branch June 7, 2026 01:19
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview6 milestone Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-PAL-coreclr only for closed issues community-contribution Indicates that the PR has been added by a community member EventPipe

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants