Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Prevent aggressive project rebuilding by retaining RUSTFLAGS order #349

Merged
merged 1 commit into from
Jun 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use self::syntax::codemap::{FileLoader, RealFileLoader};

use config::Config;

use std::collections::HashMap;
use std::collections::{HashMap, BTreeMap};
use std::env;
use std::ffi::OsString;
use std::fs::{read_dir, remove_file};
Expand Down Expand Up @@ -759,7 +759,8 @@ fn dedup_flags(flag_str: &str) -> String {
// values and dedup any duplicate keys, using the last value in flag_str.
// This is a bit complicated because of the variety of ways args can be specified.

let mut flags = HashMap::new();
// Retain flags order to prevent complete project rebuild due to RUSTFLAGS fingerprint change
let mut flags = BTreeMap::new();
let mut bits = flag_str.split_whitespace().peekable();

while let Some(bit) = bits.next() {
Expand Down