Skip to content

Commit

Permalink
fix: unfork cc
Browse files Browse the repository at this point in the history
  • Loading branch information
Gankra committed Jul 7, 2024
1 parent e9e3e24 commit 0d2828d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ version = "0.3.0"

[workspace.dependencies]
camino = { version = "1.1.7", features = ["serde1"] }
cc = { version = "1.0.73", git = "https://github.com/Gankra/cc-rs" }
cc = { version = "1.0.73", features = ["stdout_to_stderr"], git = "https://github.com/Gankra/cc-rs", branch = "config-out" }
clap = { version = "4.5.4", features = ["cargo", "wrap_help", "derive"] }
console = "0.15.8"
kdl = "4.6.0"
Expand Down
16 changes: 11 additions & 5 deletions src/toolchains/c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,16 @@ impl CcToolchain {
}

impl CcToolchain {
pub fn new(_system_info: &Config, mode: &'static str) -> Self {
let cc_flavor = match mode {
TOOLCHAIN_GCC => CCFlavor::Gcc,
TOOLCHAIN_CLANG => CCFlavor::Clang,
let compiler = cc::Build::new()
.cargo_metadata(false)
.cargo_debug(false)
.cargo_warnings(false)
.cargo_output(cc::OutputKind::Stderr)
.get_compiler();
LCHAIN_CLANG => CCFlavor::Clang,
TOOLCHAIN_MSVC => CCFlavor::Msvc,
TOOLCHAIN_CC => {
let compiler = cc::Build::new().get_compiler();
let compiler = cc::Build::new().cargo_metadata(false).cargo_debug(false).cargo_warnings(false).cargo_output(cc::OutputKind::Stderr).get_compiler();
if compiler.is_like_msvc() {
CCFlavor::Msvc
} else if compiler.is_like_gnu() {
Expand Down Expand Up @@ -332,6 +335,9 @@ impl CcToolchain {
.file(src_path)
.opt_level(0)
.cargo_metadata(false)
.cargo_debug(false)
.cargo_warnings(false)
.cargo_output(cc::OutputKind::Stderr)
.target(built_info::TARGET)
.out_dir(out_dir)
// .warnings_into_errors(true)
Expand Down

0 comments on commit 0d2828d

Please sign in to comment.