<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57285>57285</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Set output location of `-ftime-trace` in command line
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          martinlicht
      </td>
    </tr>
</table>

<pre>
    The .json file produced by `-ftime-trace` should be at a location that can be controlled by command line. 

A possible command line option could be `-ftime-trace-path=/path/to/file`.

The compilation process then produces `file.json` at `/path/to/`, possibly with a time tag, `file-abc123.json`. If no path is provided, just produce the .json file at the default location.

Example application: I use clang via MinGW-w64 and the .json files are located in the /tmp/ directory. That directory itself is located at a somewhat obscure place in the Windows file system. Putting them in the project directory, for example, not only helps keeping track of them. It also greatly simplifies the cleaning process, since you don't risk cleaning out .jsons that aren't in the project. 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxtU8Fu2zAM_Rr7QsRw5MSJDz506zL0MGDACvQsW3SsVpYMU2qWvx9l121T7CKZJvn4Hkk1Tl3rxx4heyZnodMGYZycCi0qaK6QlPmm83rAjZ9ki2wC9S4YdiJIDxKMa6XXnOt7tltpo6d11k_OmAWkdcMgrQKjLWaQ5PdJfrecdzA6It0YvAkCN86Q7VrpC43NKH2fFPeJOM1f4uQdH5E9R2afK0RtDD1qs7BkcS0SMVu0q1KK-DF5bkLUyEr4-gI___m-Mr7CRfueGxBpgZfn6HvD2cim3YpihcvgoQPrIIKBplj2VStUMeM5kF95RFKfB8Es4h-FnQzGv3f6Rt-Pv3IYY-w4Gr34k-IOHiAQCzfSnuFVS_il7c-nzaXcQezxbR0COeGCzvPSdnZH0cPIJyg9YevddM3gMY743QbtCU0XFa3J80aQG_ASI11DbWDo0fDMVuAnbZW70KKQruRxyOB38F4zVQ4Y1kBuyjMX-qgX29W5CXCRHE3ruIrlWfRoRoIXxHGG4SV5AdfNeNx9ZmXIwXlC6TmYNOfrTuO8BtwllDamve1GBCZtmfLVBVDcUHHwMGl6-Qh1wS8dpGXvuYNL2C35DFKst2W5FXl12BWpqgtVFZVMvfYG6z_oI9IYPoYbWf_n0Wl780DSMJm6934kHnZcTXE68zaGJuMoNox5Xa_NGxU2NVFAlnfaH8Rxn_a17MptUzWHY1HlalvkuG32pSrlrs3LRjVVamSDhupk_y0RwuIFZgj-Tvb3qa5FLkR-FEIUeZUX2a4rRVEdd8h3e2xlsstxkNpkkUfmpnM61TOlJpyJnUaTpw-n5Hd1tohzOcaXwfduqgc58W7wcvc-ncvXM_1_okuYEg">