Skip to content

Commit

Permalink
Use specified include directories prior to CFLAGS (#1043)
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Apr 24, 2024
1 parent 7649f12 commit 994dc90
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib.rs
Expand Up @@ -1773,17 +1773,17 @@ impl Build {
cmd.push_cc_arg(format!("-std{}{}", separator, std).into());
}

for directory in self.include_directories.iter() {
cmd.args.push("-I".into());
cmd.args.push(directory.as_os_str().into());
}

if let Ok(flags) = self.envflags(if self.cpp { "CXXFLAGS" } else { "CFLAGS" }) {
for arg in flags {
cmd.push_cc_arg(arg.into());
}
}

for directory in self.include_directories.iter() {
cmd.args.push("-I".into());
cmd.args.push(directory.as_os_str().into());
}

// If warnings and/or extra_warnings haven't been explicitly set,
// then we set them only if the environment doesn't already have
// CFLAGS/CXXFLAGS, since those variables presumably already contain
Expand Down

0 comments on commit 994dc90

Please sign in to comment.