<p dir="auto">Consider the case of someone who wishes to test out a package built in a WIndows configuration on a Linux machine (using WINE.) To do so one should be able to pass in <code class="notranslate">--cfg 'target_os = "win32"'</code> and have it override the existing target_os. Suprisingly, instead both configurations are activated. That's okay but what is really bad is that one can't even pass in <code class="notranslate">--cfg 'not(target_os = "win32")'</code> and disable the old configuration.</p>
<p dir="auto">Normally, I build stage1 rustpkg to save time. With <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/833ed21f87e1994ec76a757f3cbf2b8deedf55e1/hovercard" href="https://github.com/rust-lang/rust/commit/833ed21f87e1994ec76a757f3cbf2b8deedf55e1"><tt>833ed21</tt></a> I get:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="compile_and_link: x86_64-apple-darwin/stage0/lib/rustc/x86_64-apple-darwin/lib/librustpkg.dylib
time: 0.043 s   parsing
time: 0.061 s   expansion
time: 0.006 s   configuration
time: 0.006 s   maybe building test harness
time: 0.003 s   intrinsic injection
time: 0.005 s   core injection
time: 0.008 s   ast indexing
time: 0.228 s   external crate/lib resolution
error: duplicate entry for `const`
error: duplicate entry for `copy`
error: duplicate entry for `owned`
error: duplicate entry for `drop`
error: duplicate entry for `add`
error: duplicate entry for `sub`
error: duplicate entry for `mul`
error: duplicate entry for `div`
error: duplicate entry for `rem`
error: duplicate entry for `neg`
error: duplicate entry for `not`
error: duplicate entry for `bitxor`
error: duplicate entry for `bitand`
error: duplicate entry for `bitor`
error: duplicate entry for `shl`
error: duplicate entry for `shr`
error: duplicate entry for `index`
error: duplicate entry for `eq`
error: duplicate entry for `ord`
error: duplicate entry for `str_eq`
error: duplicate entry for `uniq_str_eq`
error: duplicate entry for `annihilate`
error: duplicate entry for `log_type`
error: duplicate entry for `fail_`
error: duplicate entry for `fail_bounds_check`
error: duplicate entry for `exchange_malloc`
error: duplicate entry for `exchange_free`
error: duplicate entry for `malloc`
error: duplicate entry for `free`
error: duplicate entry for `borrow_as_imm`
error: duplicate entry for `borrow_as_mut`
error: duplicate entry for `return_to_mut`
error: duplicate entry for `check_not_borrowed`
error: duplicate entry for `strdup_uniq`
error: duplicate entry for `record_borrow`
error: duplicate entry for `unrecord_borrow`
error: duplicate entry for `start`"><pre class="notranslate"><code class="notranslate">compile_and_link: x86_64-apple-darwin/stage0/lib/rustc/x86_64-apple-darwin/lib/librustpkg.dylib
time: 0.043 s   parsing
time: 0.061 s   expansion
time: 0.006 s   configuration
time: 0.006 s   maybe building test harness
time: 0.003 s   intrinsic injection
time: 0.005 s   core injection
time: 0.008 s   ast indexing
time: 0.228 s   external crate/lib resolution
error: duplicate entry for `const`
error: duplicate entry for `copy`
error: duplicate entry for `owned`
error: duplicate entry for `drop`
error: duplicate entry for `add`
error: duplicate entry for `sub`
error: duplicate entry for `mul`
error: duplicate entry for `div`
error: duplicate entry for `rem`
error: duplicate entry for `neg`
error: duplicate entry for `not`
error: duplicate entry for `bitxor`
error: duplicate entry for `bitand`
error: duplicate entry for `bitor`
error: duplicate entry for `shl`
error: duplicate entry for `shr`
error: duplicate entry for `index`
error: duplicate entry for `eq`
error: duplicate entry for `ord`
error: duplicate entry for `str_eq`
error: duplicate entry for `uniq_str_eq`
error: duplicate entry for `annihilate`
error: duplicate entry for `log_type`
error: duplicate entry for `fail_`
error: duplicate entry for `fail_bounds_check`
error: duplicate entry for `exchange_malloc`
error: duplicate entry for `exchange_free`
error: duplicate entry for `malloc`
error: duplicate entry for `free`
error: duplicate entry for `borrow_as_imm`
error: duplicate entry for `borrow_as_mut`
error: duplicate entry for `return_to_mut`
error: duplicate entry for `check_not_borrowed`
error: duplicate entry for `strdup_uniq`
error: duplicate entry for `record_borrow`
error: duplicate entry for `unrecord_borrow`
error: duplicate entry for `start`
</code></pre></div>