about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAntoni Boucher <bouanto@zoho.com>2024-09-27 12:37:56 -0400
committerAntoni Boucher <bouanto@zoho.com>2024-09-27 14:04:23 -0400
commit12575df6ba2d897f7d8a91c252ca0af4451f5024 (patch)
tree610a6182dec695a1c8ede38e4130026328474d78
parent117cf3e3cd292c6c18454dcab3eec73ef090b323 (diff)
downloadrust-12575df6ba2d897f7d8a91c252ca0af4451f5024.tar.gz
rust-12575df6ba2d897f7d8a91c252ca0af4451f5024.zip
Cleanup
-rw-r--r--Cargo.lock10
-rw-r--r--Cargo.toml4
-rw-r--r--build_system/src/build.rs10
-rw-r--r--src/base.rs4
-rw-r--r--src/declare.rs14
5 files changed, 12 insertions, 30 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 42528419a25..f2a368395b2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -79,16 +79,18 @@ dependencies = [
 
 [[package]]
 name = "gccjit"
-version = "2.1.0"
-source = "git+https://github.com/rust-lang/gccjit.rs#4fbe2023250357378fb2faf6f484b34cb8f8ebc3"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4bb376e98c82d9284c3a17fc1d6bf9bc921055418950238d7a553c27a7e1f6ab"
 dependencies = [
  "gccjit_sys",
 ]
 
 [[package]]
 name = "gccjit_sys"
-version = "0.2.0"
-source = "git+https://github.com/rust-lang/gccjit.rs#4fbe2023250357378fb2faf6f484b34cb8f8ebc3"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93b4b1be553b5df790bf25ca2a1d6add81727dc29f8d5c8742468ed306d621d1"
 dependencies = [
  "libc",
 ]
diff --git a/Cargo.toml b/Cargo.toml
index 67a90cc34ee..22b953cd2d1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,8 +22,8 @@ master = ["gccjit/master"]
 default = ["master"]
 
 [dependencies]
-#gccjit = "2.1"
-gccjit = { git = "https://github.com/rust-lang/gccjit.rs" }
+gccjit = "2.2"
+#gccjit = { git = "https://github.com/rust-lang/gccjit.rs" }
 
 # Local copy.
 #gccjit = { path = "../gccjit.rs" }
diff --git a/build_system/src/build.rs b/build_system/src/build.rs
index d5d099fb14c..d0ced211a61 100644
--- a/build_system/src/build.rs
+++ b/build_system/src/build.rs
@@ -131,15 +131,7 @@ pub fn build_sysroot(env: &HashMap<String, String>, config: &ConfigInfo) -> Resu
         rustflags.push_str(" -Csymbol-mangling-version=v0");
     }
 
-    let mut args: Vec<&dyn AsRef<OsStr>> = vec![
-        &"cargo",
-        &"build",
-        &"--target",
-        &config.target,
-        // TODO: remove this feature?
-        &"--features",
-        &"std/compiler-builtins-no-f16-f128",
-    ];
+    let mut args: Vec<&dyn AsRef<OsStr>> = vec![&"cargo", &"build", &"--target", &config.target];
     for feature in &config.features {
         args.push(&"--features");
         args.push(feature);
diff --git a/src/base.rs b/src/base.rs
index b8f511b73a0..2eaab3ed00c 100644
--- a/src/base.rs
+++ b/src/base.rs
@@ -116,10 +116,6 @@ pub fn compile_codegen_unit(
             context.add_command_line_option("-mavx");
         }
 
-        /*for feature in tcx.sess.opts.cg.target_feature.split(',') {
-            println!("Feature: {}", feature);
-        }*/
-
         for arg in &tcx.sess.opts.cg.llvm_args {
             context.add_command_line_option(arg);
         }
diff --git a/src/declare.rs b/src/declare.rs
index cbf82918a9c..aa7709488e6 100644
--- a/src/declare.rs
+++ b/src/declare.rs
@@ -170,17 +170,9 @@ fn declare_raw_fn<'gcc>(
     if name.starts_with("llvm.") {
         let intrinsic = match name {
             "llvm.fma.f16" => {
-                let param1 = cx.context.new_parameter(None, cx.double_type, "x");
-                let param2 = cx.context.new_parameter(None, cx.double_type, "y");
-                let param3 = cx.context.new_parameter(None, cx.double_type, "z");
-                cx.context.new_function(
-                    None,
-                    FunctionType::Extern,
-                    cx.double_type,
-                    &[param1, param2, param3],
-                    "fma",
-                    false,
-                )
+                // fma is not a target builtin, but a normal builtin, so we handle it differently
+                // here.
+                cx.context.get_builtin_function("fma")
             }
             _ => llvm::intrinsic(name, cx),
         };