Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.

Commit c2cd29d

Browse files
ahomescugeofft
authored andcommitted
Manually pass the correct target to bindgen/clang in the top-level build script
1 parent 98f137d commit c2cd29d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

build.rs

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ fn main() {
5959
)
6060
.unwrap();
6161

62+
builder = builder.clang_arg("--target=x86_64-linux-kernel-module");
6263
for arg in shlex::split(&output).unwrap() {
6364
builder = builder.clang_arg(arg.to_string());
6465
}
@@ -88,6 +89,7 @@ fn main() {
8889
let mut builder = cc::Build::new();
8990
println!("cargo:rerun-if-env-changed=CLANG");
9091
builder.compiler(env::var("CLANG").unwrap_or("clang".to_string()));
92+
builder.target("x86_64-linux-kernel-module");
9193
builder.warnings(false);
9294
builder.file("src/helpers.c");
9395
for arg in shlex::split(&output).unwrap() {

0 commit comments

Comments
 (0)