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

    <tr>
        <th>Summary</th>
        <td>
            After 578a4716f Clang -MD by default produces different dependecies file. 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

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

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

<pre>
    commit 578a4716f549167165a2ec3bac89c86706136d4e
Author: Arthur Eubanks <aeubanks@google.com>

It appears that this commit unintentionally made -canonical-system-headers==true as default.
If anyone needs the old behavior he needs to specify -no-canonical-prefixes option.
Logically it should be visa-versa, if anyone needs the new behavior, let him use -canonical-prefixes option. 

This change in the clang default behavior causes some other tools that rely on the older format of the dependencies file to work incorrectly. (for example we have Visual Studio extension software that relies on the dependencies file) 

On Windows platform, if your system headers located a network drive or on drive that was created by the SUBST command
you will get a fully resolved real file path in the dependencies file

For example;
Lets assume that you have a network drive H: on which you have system headers.

before the commit a path to a include file in the dependencies file looked like:
```
H:\target\include\sdk_version.h
```
After the commit the include file path looks like that:
````
\\SERVERNAME\shared_folder\target\include\sdk_version.h
```
 
The situation becomes worse if a combined length of a shared folder on a network server and a include file path on a shared network drive is greater than 260 symbols (MAX_PATH limit on Windows). In this situation you will observe bogus include file paths in the  dependencies file.
(this problem probably should be a subject to another ticket)


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVV2P2jgX_jXm5giUOBDgggvKzKiV3r676nS7e1ed2CeJF8eObAeaf7-yE4aZTvdmJUQCcc7z4ecco_eqMUQHtvnANg8LHEJr3eFckbaixf6Mi8rK8SBs16kAm-0O19u8rDfrfV5u83KDnERRodjtxa7cZmVelHJNLHtg2fGYirHiCEcX2sHB41ChOXtgxQlpumfrrLG20bQStmPF4_Tm9P0pAPY9ofMQWgwQWuVhZjIYZQKZoKxB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