Cleanup
This commit is contained in:
parent
117cf3e3cd
commit
12575df6ba
10
Cargo.lock
generated
10
Cargo.lock
generated
@ -79,16 +79,18 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gccjit"
|
name = "gccjit"
|
||||||
version = "2.1.0"
|
version = "2.2.0"
|
||||||
source = "git+https://github.com/rust-lang/gccjit.rs#4fbe2023250357378fb2faf6f484b34cb8f8ebc3"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4bb376e98c82d9284c3a17fc1d6bf9bc921055418950238d7a553c27a7e1f6ab"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gccjit_sys",
|
"gccjit_sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gccjit_sys"
|
name = "gccjit_sys"
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
source = "git+https://github.com/rust-lang/gccjit.rs#4fbe2023250357378fb2faf6f484b34cb8f8ebc3"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "93b4b1be553b5df790bf25ca2a1d6add81727dc29f8d5c8742468ed306d621d1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
@ -22,8 +22,8 @@ master = ["gccjit/master"]
|
|||||||
default = ["master"]
|
default = ["master"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
#gccjit = "2.1"
|
gccjit = "2.2"
|
||||||
gccjit = { git = "https://github.com/rust-lang/gccjit.rs" }
|
#gccjit = { git = "https://github.com/rust-lang/gccjit.rs" }
|
||||||
|
|
||||||
# Local copy.
|
# Local copy.
|
||||||
#gccjit = { path = "../gccjit.rs" }
|
#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");
|
rustflags.push_str(" -Csymbol-mangling-version=v0");
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut args: Vec<&dyn AsRef<OsStr>> = vec![
|
let mut args: Vec<&dyn AsRef<OsStr>> = vec![&"cargo", &"build", &"--target", &config.target];
|
||||||
&"cargo",
|
|
||||||
&"build",
|
|
||||||
&"--target",
|
|
||||||
&config.target,
|
|
||||||
// TODO: remove this feature?
|
|
||||||
&"--features",
|
|
||||||
&"std/compiler-builtins-no-f16-f128",
|
|
||||||
];
|
|
||||||
for feature in &config.features {
|
for feature in &config.features {
|
||||||
args.push(&"--features");
|
args.push(&"--features");
|
||||||
args.push(feature);
|
args.push(feature);
|
||||||
|
@ -116,10 +116,6 @@ fn module_codegen(
|
|||||||
context.add_command_line_option("-mavx");
|
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 {
|
for arg in &tcx.sess.opts.cg.llvm_args {
|
||||||
context.add_command_line_option(arg);
|
context.add_command_line_option(arg);
|
||||||
}
|
}
|
||||||
|
@ -170,17 +170,9 @@ fn declare_raw_fn<'gcc>(
|
|||||||
if name.starts_with("llvm.") {
|
if name.starts_with("llvm.") {
|
||||||
let intrinsic = match name {
|
let intrinsic = match name {
|
||||||
"llvm.fma.f16" => {
|
"llvm.fma.f16" => {
|
||||||
let param1 = cx.context.new_parameter(None, cx.double_type, "x");
|
// fma is not a target builtin, but a normal builtin, so we handle it differently
|
||||||
let param2 = cx.context.new_parameter(None, cx.double_type, "y");
|
// here.
|
||||||
let param3 = cx.context.new_parameter(None, cx.double_type, "z");
|
cx.context.get_builtin_function("fma")
|
||||||
cx.context.new_function(
|
|
||||||
None,
|
|
||||||
FunctionType::Extern,
|
|
||||||
cx.double_type,
|
|
||||||
&[param1, param2, param3],
|
|
||||||
"fma",
|
|
||||||
false,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
_ => llvm::intrinsic(name, cx),
|
_ => llvm::intrinsic(name, cx),
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user