How SCons hardlinks sources in variant directory?
<p>I tested SCons default hardlink behavior. </p>

<p>I am expecting that a modification in the hardlinked file in the variant dir is reflected also in the original file. But this doesn't happen.</p>

<p>Is hardlinking really a default behavior as stated in SCons doc or it is just copying the files in the variant directory ?</p>

<p><strong>EDIT:</strong> </p>

<p>Details about my implementations/configurations:</p>

<p>I am using VariantDir with one SConscript in the root of the project</p>

<p>Duplicate option is on in VariantDir</p>

<p>No duplicate option in cmd line (default).</p>

<p>I am using my own custom tools. I am using only the program builder from the builders available by default in SCons.</p>

<p>I tried the following flags: hard-soft-copy (the default), soft-hard-copy, hard-copy, soft-copy or copy. </p>

<p>None of them will provide me a real hard link copy.</p>

<p>I expect the following:</p>

<p>When I change a source file in variant dir the change will be reflected in the original file (at the original location) since the file in variant dir is a hard link.</p>

<p>Instead a change in the source file in the variant dir won't be reflected in the original file.</p>

<p><strong>EDIT 2:</strong></p>

<p>After running --debug=duplicate I got for each file considered in the dependency cycle a message similar to this:</p>

<pre><code>dup: relinking variant 'relative_path_to_file' from 'absolute_path'
</code></pre>

<p>As stated in the corresponding <a href="https://docs.python.org/2/library/os.html?highlight=os.link#os.link" rel="nofollow">Python reference docs</a>, the underlying <code>os.link</code> method, that SCons tries to find and use internally to create hard links, is not available under Windows. The same holds true for <code>os.symlink</code> (symbolic/soft links), so the only remaining option for SCons under Windows is to actually copy the files.</p>

python scons