<div dir="ltr"><div>Hi all,</div><div><br></div><div>I'm currently trying to use clang to build a largish project on Windows using MinGW. I'm currently performing all of the compilation using g++, and then linking with clang++ with lld (due to separate issues I'm having with compiling with clang with MinGW). Compiling with g++ and then linking with clang+lld seems to work fine for small programs.<br></div><div><br></div><div>I'm invoking clang++ something like this:</div><div>$ clang++ -target x86_64-pc-windows-gnu -fuse-ld=lld {lots of linker parameters} @{path to a response file}</div><div><br></div><div>I then receive an error message:<br></div>clang++: error: unable to execute command: Couldn't execute program '(path to ld.lld)': The filename or extension is too long.<br><div><div><br></div><div>If I then rerun clang++ with -v, I get the full command line passed to lld (which is approximately 44KB). It looks like there was previously a patch that tried to address this issue for certain platforms (<a href="https://reviews.llvm.org/rL334295">https://reviews.llvm.org/rL334295</a>) but this doesn't seem to have fixed the issue in my case. <br></div><div><br></div><div>Is there some way to work around this issue? Since the decision of whether to use a response file or not seems to be based on a heuristic ('keep half of the space available for environment variables'), perhaps an option should be provided to force a response file to be used?<br></div><div><br></div><div>Thanks,</div><div>Harry Wagstaff<br></div></div></div>