Closed Un1q32 closed 2 months ago
While that might work for you it breaks all the logic that's there.
find_executable
should be adjusted instead to ignore ccache
when looking for the executable when an optional ignore_ccache
parameter is set.
What is the purpose of the realpath
use in find_executable
? Removing that is also good enough, since argv0 would be the name of the symlink instead of what it points to.
A quick ripgrep shows find_executable
is only used in the one spot in as. There's also a separate source file and header with the same function in ld64, and the header is included in ld.cpp, but the function isn't actually used anywhere, seems like something that was needed in older versions of the ld64 port but isn't anymore.
as seems to work fine with the realpath
removed, but maybe you can think of an edge case where it would break.
realpath
was used to ensure ld64
used the correct patched ldid
alongside cctools
/ld64
.
However, this behavior is no longer necessary.
Next time, please create a separate commit for the Automake-related changes. :-) Thanks.
fixes #138
argv0 must be "clang" for ccache to run the compiler
same as #139 and #142 but rebased on the new version