<div dir="ltr"><div>Can you run them via the loader directly without chmod-ing? i.e:<br><br>return self._execute_command_remote('/lib/ld-linux.so ' + cmd,<br>                                                target_cwd,<br>                                                env)<br></div><div><br></div><div>Jon</div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 18, 2019 at 12:16 PM Sergej Jaskiewicz via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">broadwaylamb marked 2 inline comments as done.<br>
broadwaylamb added inline comments.<br>
<br>
<br>
================<br>
Comment at: libcxx/utils/libcxx/test/executor.py:162<br>
+<br>
+            # When testing executables that were cross-compiled on Windows for<br>
+            # Linux, we may need to explicitly set the execution permission to<br>
----------------<br>
ldionne wrote:<br>
> Do I understand correctly: the problem is that files are created on Windows and then `scp`'d to Linux, but there is no executable bit set on Windows so the files arrive on Linux as not executable?<br>
Yes, exactly.<br>
<br>
<br>
================<br>
Comment at: libcxx/utils/libcxx/test/executor.py:165<br>
+            # avoid the 'Permission denied' error:<br>
+            chmod_cmd = ['chmod', '+x', target_exe_path]<br>
+<br>
----------------<br>
ldionne wrote:<br>
> You're assuming that we have `chmod` on the system, but what if we're instead remotely executing binaries compiled on Linux for Windows (not sure that's even a thing, but you get the point)?<br>
In D68275 I made `Executor` depend on the target info object, so we can ask if the target system is not Windows, and only then set the executable bit.<br>
<br>
But if there are better solutions, I'm ready to investigate them.<br>
<br>
<br>
Repository:<br>
  rG LLVM Github Monorepo<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D69170/new/" rel="noreferrer" target="_blank">https://reviews.llvm.org/D69170/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D69170" rel="noreferrer" target="_blank">https://reviews.llvm.org/D69170</a><br>
<br>
<br>
<br>
</blockquote></div></div>