Skip to content

Commit

Permalink
Merge pull request #568 from rust-lang/update-gcc
Browse files Browse the repository at this point in the history
Update GCC version with the removal of supports_128bit_int
  • Loading branch information
antoyo authored Oct 17, 2024
2 parents d00f1ec + 8cd325d commit 764770d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
8 changes: 4 additions & 4 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 @@ -22,7 +22,7 @@ master = ["gccjit/master"]
default = ["master"]

[dependencies]
gccjit = "2.2"
gccjit = "2.3"
#gccjit = { git = "https://github.com/rust-lang/gccjit.rs" }

# Local copy.
Expand Down
2 changes: 1 addition & 1 deletion libgccjit.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c16f53a752ed2b679fafe88d4ec795fe54a245ac
29901846ff610daab8a80436cfe36e93b4b5aa1e
3 changes: 2 additions & 1 deletion src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,13 @@ pub fn compile_codegen_unit(
let f32_type_supported = target_info.supports_target_dependent_type(CType::Float32);
let f64_type_supported = target_info.supports_target_dependent_type(CType::Float64);
let f128_type_supported = target_info.supports_target_dependent_type(CType::Float128);
let u128_type_supported = target_info.supports_target_dependent_type(CType::UInt128t);
// TODO: improve this to avoid passing that many arguments.
let cx = CodegenCx::new(
&context,
cgu,
tcx,
target_info.supports_128bit_int(),
u128_type_supported,
f16_type_supported,
f32_type_supported,
f64_type_supported,
Expand Down
18 changes: 9 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,15 @@ impl TargetInfo {
false
}

fn supports_128bit_int(&self) -> bool {
self.supports_128bit_integers.load(Ordering::SeqCst)
}

fn supports_target_dependent_type(&self, _typ: CType) -> bool {
fn supports_target_dependent_type(&self, typ: CType) -> bool {
match typ {
CType::UInt128t | CType::Int128t => {
if self.supports_128bit_integers.load(Ordering::SeqCst) {
return true;
}
}
_ => (),
}
false
}
}
Expand All @@ -159,10 +163,6 @@ impl LockedTargetInfo {
self.info.lock().expect("lock").cpu_supports(feature)
}

fn supports_128bit_int(&self) -> bool {
self.info.lock().expect("lock").supports_128bit_int()
}

fn supports_target_dependent_type(&self, typ: CType) -> bool {
self.info.lock().expect("lock").supports_target_dependent_type(typ)
}
Expand Down

0 comments on commit 764770d

Please sign in to comment.