Auto merge of #5458 - alexcrichton:track-panic, r=matklad
authorbors <bors@rust-lang.org>
Wed, 2 May 2018 16:35:38 +0000 (16:35 +0000)
committerbors <bors@rust-lang.org>
Wed, 2 May 2018 16:35:38 +0000 (16:35 +0000)
Track panic mode in fingerprint

Ensure that if we've previously compiled a crate with panic=abort and we later
need it for panic=unwind we correctly recompile it.

Closes #5445

1  2 
src/cargo/core/compiler/fingerprint.rs

index 78b18af265f6fe4e126b9468732932f1eb88ed5f,c91d35093236559486ebbd576b90e4b72445cb9d..551aab14347c9ff657c9455dd68d7cdecfceeb8d
@@@ -457,11 -455,12 +457,12 @@@ fn calculate<'a, 'cfg>
      let profile_hash = util::hash_u64(&(
          &unit.profile,
          unit.mode,
 -        cx.extra_args_for(unit),
 +        bcx.extra_args_for(unit),
          cx.incremental_args(unit)?,
+         cx.used_in_plugin.contains(unit), // used when passing panic=abort
      ));
      let fingerprint = Arc::new(Fingerprint {
 -        rustc: util::hash_u64(&cx.build_config.rustc.verbose_version),
 +        rustc: util::hash_u64(&bcx.build_config.rustc.verbose_version),
          target: util::hash_u64(&unit.target),
          profile: profile_hash,
          // Note that .0 is hashed here, not .1 which is the cwd. That doesn't