<div dir="ltr">Hi,<div><br></div><div>I am having some trouble to understand how the clang driver works for OpenMP offloading.</div><div><br></div><div>For example, if I run the following command (with the -v flag):</div><div><br></div><div>clang -v -g -fopenmp offloading_success.c -o offloading_success</div><div><br></div><div>I can see the invocations that clang does and if I run those command one by one I can successfully compile my program.</div><div><br></div><div>Now, if I do the same but with the offloading option, as in the following command:</div><div><br></div><div>clang -v -g -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda offloading_success.c -o offloading_success<br></div><div><br></div><div>the command works, compiles correctly, and when I run the program, it successfully run on the device.</div><div>However, if I show the invocations with "-v" and try to run the commands one by one it does not work and in particular I get an error with the last command which is the linking part with "ld".</div><div>The error i get is the following:</div><div><br></div><div><div>/usr/bin/ld: cannot open linker script file /tmp/<a href="http://offloading_success-2b4739.lk">offloading_success-2b4739.lk</a>: No such file or directory</div></div><div><br></div><div>Where is this ".lk" file generated? Is there a missing commands in the invocations?</div><div><br></div><div>I attached a file with the full invocation.</div><div><br></div><div>Thanks!</div><div>Best,</div><div>Simone</div><div><br></div><div><br></div></div>