Remove GetCommandLineW from PAL#125386
Merged
Merged
Conversation
huoyaoyuan
commented
Mar 10, 2026
Member
|
@dotnet/dotnet-diag-contrib for the EventPipe impact |
Member
|
What is the motivation behind doing the change? |
Member
Author
|
The motivation is to cleanup PAL layer and transit to minipal gradually. |
This was referenced Mar 12, 2026
Open
noahfalk
reviewed
Mar 12, 2026
3 tasks
jkotas
reviewed
Jun 4, 2026
jkotas
reviewed
Jun 4, 2026
jkotas
reviewed
Jun 5, 2026
jkotas
reviewed
Jun 5, 2026
jkotas
reviewed
Jun 5, 2026
Contributor
There was a problem hiding this comment.
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
GetCommandLineWand 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
GetCommandLineWtest.
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. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
jkotas
reviewed
Jun 5, 2026
Member
|
@huoyaoyuan Please take a look at the copilot feedback above |
Member
|
Could you please resolve conflicts? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.