<div dir="ltr"><div dir="ltr">Yes, this solution would solve the current problem. But theoretically the uniqueness may be defined by the directory, where the file is located, not by the name. It looks very unlikely, but who knows...<div><br></div><div>I thought about what Stella have said, and it seems that I have found a good solution for this. We can use something like `tempfile` (<a href="https://docs.python.org/3.7/library/tempfile.html">https://docs.python.org/3.7/library/tempfile.html</a>) for every internally generated file of the script. It will guarantee us the uniqueness of the file. But for the uniqueness of files named by script parameters the script user will remain responsible.</div><div><br></div><div>What do you think about the such approach?</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Dec 5, 2018 at 11:55 PM Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I was thinking that we could just automatically compute the output file names as:<div><br></div><div>os.path.join(out_dir, basename(output_file) + '.' + basename(input_file) + '.obj')</div><div><br></div><div>Currently it's just </div><div><br></div><div><div>os.path.join(out_dir, basename(input_file) + '.obj')</div><br class="m_-1467412809351059518m_3834458412200668898inbox-inbox-Apple-interchange-newline"></div><div>which is why I think the problem occurs.</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Dec 5, 2018 at 12:47 PM Aleksandr Urakov <<a href="mailto:aleksandr.urakov@jetbrains.com" target="_blank">aleksandr.urakov@jetbrains.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>With such solution there would be even no need to change the current commit. But I'm not sure that it's trivial to do - the output file name may contain path with directories. May be we can replace slashes with underscores in the output file path and concatenate it with the object file name? Or even replace slashes in the source file path and concatenate it with the output file path - so object files will be located in the same place as the output file.<br><br><div class="gmail_quote"><div dir="ltr">Am Mi., 5. Dez. 2018, 23:30 hat Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> geschrieben:<br></div></div></div></div><div dir="auto"><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It is not possible to specify object file name in compile and link mode.  But perhaps we can just change the default object file name to include something from the output file as well <br><div class="gmail_quote"><div dir="ltr">On Wed, Dec 5, 2018 at 12:26 PM Aleksandr Urakov via Phabricator <<a href="mailto:reviews@reviews.llvm.org" rel="noreferrer" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">aleksandr.urakov added a subscriber: zturner.<br>
aleksandr.urakov added a comment.<br>
<br>
The similar problem with `typedefs.test` is here: <a href="http://lab.llvm.org:8014/builders/lldb-x64-windows-ninja/builds/1940/steps/test/logs/stdio" rel="noreferrer noreferrer" target="_blank">http://lab.llvm.org:8014/builders/lldb-x64-windows-ninja/builds/1940/steps/test/logs/stdio</a><br>
<br>
I have an assumption about the cause of the problem. Are the tests running in parallel? In this case `typedefs.test` and `enums-layout.test` are writing to the same object file together, because they both are compiled from the same source.<br>
<br>
@zturner Is it possible to specify object file's name in `compile-and-link` mode? Then we can specify different names in different tests for both object files and executables. But I think that splitting the source or combining the tests would be a better idea.<br>
<br>
I will fix it only tomorrow, because I'm already at home today. Feel free to revert it if needed.<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D54942/new/" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D54942/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D54942" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D54942</a><br>
<br>
<br>
<br>
</blockquote></div>
</blockquote></div></div></div></blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-1467412809351059518gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Aleksandr Urakov</div><div><span>Software Developer</span></div><div><span>JetBrains</span></div><div><span><a href="http://www.jetbrains.com" target="_blank">http://www.jetbrains.com</a></span></div><div><span>The Drive to Develop</span></div></div></div>