Skip to content

Commit 13676df

Browse files
committed
Cleanup
1 parent 48da629 commit 13676df

File tree

5 files changed

+11
-24
lines changed

5 files changed

+11
-24
lines changed

Cargo.lock

+6-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ master = ["gccjit/master"]
2222
default = ["master"]
2323

2424
[dependencies]
25-
#gccjit = "2.1"
26-
gccjit = { git = "https://github.com/rust-lang/gccjit.rs" }
25+
gccjit = "2.2"
26+
#gccjit = { git = "https://github.com/rust-lang/gccjit.rs" }
2727

2828
# Local copy.
2929
#gccjit = { path = "../gccjit.rs" }

build_system/src/build.rs

-3
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ pub fn build_sysroot(env: &HashMap<String, String>, config: &ConfigInfo) -> Resu
136136
&"build",
137137
&"--target",
138138
&config.target,
139-
// TODO: remove this feature?
140-
&"--features",
141-
&"std/compiler-builtins-no-f16-f128",
142139
];
143140
for feature in &config.features {
144141
args.push(&"--features");

src/base.rs

-4
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,6 @@ pub fn compile_codegen_unit(
116116
context.add_command_line_option("-mavx");
117117
}
118118

119-
/*for feature in tcx.sess.opts.cg.target_feature.split(',') {
120-
println!("Feature: {}", feature);
121-
}*/
122-
123119
for arg in &tcx.sess.opts.cg.llvm_args {
124120
context.add_command_line_option(arg);
125121
}

src/declare.rs

+3-11
Original file line numberDiff line numberDiff line change
@@ -170,17 +170,9 @@ fn declare_raw_fn<'gcc>(
170170
if name.starts_with("llvm.") {
171171
let intrinsic = match name {
172172
"llvm.fma.f16" => {
173-
let param1 = cx.context.new_parameter(None, cx.double_type, "x");
174-
let param2 = cx.context.new_parameter(None, cx.double_type, "y");
175-
let param3 = cx.context.new_parameter(None, cx.double_type, "z");
176-
cx.context.new_function(
177-
None,
178-
FunctionType::Extern,
179-
cx.double_type,
180-
&[param1, param2, param3],
181-
"fma",
182-
false,
183-
)
173+
// fma is not a target builtin, but a normal builtin, so we handle it differently
174+
// here.
175+
cx.context.get_builtin_function("fma")
184176
}
185177
_ => llvm::intrinsic(name, cx),
186178
};

0 commit comments

Comments
 (0)