Repository navigation
Conversation
…le, and one function names the running compiler (#2647) with_self_exe (LldDriver.w) took a bare argv[0] through PATH. cmd runs a bare `with.exe` from the current directory first, so a copy there re-invoked an older with.exe from PATH for its link ("error: unknown command '__ld'"), and every self-invocation (`__ar`, `with cc`, the runtime root, install-user's source) read the same answer. On Windows a bare name is now looked up in the current directory first. The c_import cache key (Frontend) had its own resolver, which split PATH on `:` even on Windows; it reads with_self_exe now and the duplicate is gone. SEED-BOUND: the OS's own answer (GetModuleFileNameW, _NSGetExecutablePath, /proc/self/exe) needs a runtime function src/ can call only once a seed carrying it is pinned. Test: test/internals/self_exe_names_running_binary_test.w.
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.
with_self_exe (LldDriver.w) took a bare argv[0] through PATH. cmd runs a
bare
with.exefrom the current directory first, so a copy therere-invoked an older with.exe from PATH for its link ("error: unknown
command '__ld'"), and every self-invocation (
__ar,with cc, theruntime root, install-user's source) read the same answer. On Windows a
bare name is now looked up in the current directory first. The c_import
cache key (Frontend) had its own resolver, which split PATH on
:even onWindows; it reads with_self_exe now and the duplicate is gone.
SEED-BOUND: the OS's own answer (GetModuleFileNameW, _NSGetExecutablePath,
/proc/self/exe) needs a runtime function src/ can call only once a seed
carrying it is pinned.
Test: test/internals/self_exe_names_running_binary_test.w.
Closes #2647