Skip to content

Commit 8d7625c

Browse files
committed
Added Workaround For Mismatch of naming schemes of NDK
1 parent d2ae902 commit 8d7625c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gdnative-sys/build.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,18 +158,21 @@ mod header_binding {
158158
.to_string_lossy(),
159159
);
160160

161+
let target_triple = match target_triple.as_str() {
162+
"armv7-linux-androideabi" => "arm-linux-androideabi", // Workaround for different naming scheme with NDK
163+
_ => &target_triple,
164+
};
165+
161166
builder = builder.clang_arg("-I").clang_arg(
162167
Path::join(
163168
&android_ndk_root,
164169
format!(
165170
"toolchains/llvm/prebuilt/{host}/sysroot/usr/include/{target_triple}",
166171
host = &host_tag,
167-
target_triple = &target_triple,
168172
),
169173
)
170174
.to_string_lossy(),
171175
);
172-
173176
builder
174177
}
175178

0 commit comments

Comments
 (0)