-
Notifications
You must be signed in to change notification settings - Fork 13.5k
llvm-ar fails to handle long paths on Windows #54559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-tools-llvm-ar-llvm-ranlib |
It appears that long paths are also not handled for input paths. |
@bgamari, do the test scripts in #54559 (comment) actually demonstrate the bug? If I use the second, |
Ah, hold on. It appears that the version of LLVM that I'm using has something to do with it. First, let me alter the script a bit: #!/usr/bin/env python
from pathlib import Path
tmp = Path('/'.join('a'*32 for j in range(16)))
if not tmp.exists():
tmp.mkdir(True, True)
Path('hi.c').write_text('int main() { return 0; }')
import subprocess
subprocess.run(['llvm-ar', '--version'], shell=True)
res = subprocess.run(['llvm-ar', 'rc', tmp / 'out.a', 'hi.c'], shell=True)
if res.returncode == 0:
print('llvm-ar successfully used a long path') I've changed this such that:
If I run this script with
On the other hand, if I use
So perhaps this issue has been fixed already? |
Oh dear, good catch @RyanGlScott ! Good news that this is already fixed. |
It appears that
llvm-ar.exe
(version 13.0.1) fails to accept long paths on Windows. For instance,clang
can output to a long path without any trouble:whereas asking
ar
to write an archive to a long path fails:The text was updated successfully, but these errors were encountered: