Skip to content

Commit 994dc90

Browse files
authored
Use specified include directories prior to CFLAGS (#1043)
1 parent 7649f12 commit 994dc90

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,17 +1773,17 @@ impl Build {
17731773
cmd.push_cc_arg(format!("-std{}{}", separator, std).into());
17741774
}
17751775

1776+
for directory in self.include_directories.iter() {
1777+
cmd.args.push("-I".into());
1778+
cmd.args.push(directory.as_os_str().into());
1779+
}
1780+
17761781
if let Ok(flags) = self.envflags(if self.cpp { "CXXFLAGS" } else { "CFLAGS" }) {
17771782
for arg in flags {
17781783
cmd.push_cc_arg(arg.into());
17791784
}
17801785
}
17811786

1782-
for directory in self.include_directories.iter() {
1783-
cmd.args.push("-I".into());
1784-
cmd.args.push(directory.as_os_str().into());
1785-
}
1786-
17871787
// If warnings and/or extra_warnings haven't been explicitly set,
17881788
// then we set them only if the environment doesn't already have
17891789
// CFLAGS/CXXFLAGS, since those variables presumably already contain

0 commit comments

Comments
 (0)