Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
antoyo committed Sep 27, 2024
1 parent 48da629 commit f16e6f7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 30 deletions.
10 changes: 6 additions & 4 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
10 changes: 1 addition & 9 deletions build_system/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
14 changes: 3 additions & 11 deletions src/declare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};
Expand Down

0 comments on commit f16e6f7

Please sign in to comment.