If -no-canonical-prefixes isn't used, the clang executable name used is the one of the actual executable, not the name of the symlink that the user invoked.
In these cases, the target prefix was overridden based on the clang executable name. (On the other hand the implicit -target option that such a symlink adds, is added as an actual command line parameter in tools/driver/driver.cop, before resolving the symlink and finding the actual clang executable.
Use the original ClangNameParts (set from argv[0] in tools/driver/driver.cpp) if it seems to be initialized propery.
All existing tests of this feature used -no-canonical-prefixes (possibly because it also makes the driver look in the directory of the symlink instead of the directory of the executable); add another one that uses --config-user-dir= to specify the directory instead. (For actual users of such symlinks, outisde of the test suite, the directory is probably the same for both.)
This makes this feature work more like what the documentation describes.