Cleanup
This commit is contained in:
parent
117cf3e3cd
commit
12575df6ba
10
Cargo.lock
generated
10
Cargo.lock
generated
@ -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",
|
||||
]
|
||||
|
@ -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" }
|
||||
|
@ -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);
|
||||
|
@ -116,10 +116,6 @@ fn module_codegen(
|
||||
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);
|
||||
}
|
||||
|
@ -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),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user