Skip to content

Commit 51ce533

Browse files
committed
Use Inline assembly for msvc target from non-windows host
When cross-compiling for msvc from a non-windows host, inline assembly is typically supported (for example via clang or clang-cl). Given that clang also doesn't support masm or have ml.exe compatibility, it's best to use the C implementations of `util_helpers` and `aesni_helpers`.
1 parent a8e09a4 commit 51ce533

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ use std::env;
1010

1111
fn main() {
1212
let target = env::var("TARGET").unwrap();
13-
if target.contains("msvc") {
13+
let host = env::var("HOST").unwrap();
14+
if target.contains("msvc") && host.contains("windows") {
1415
let mut config = gcc::Config::new();
1516
config.file("src/util_helpers.asm");
1617
config.file("src/aesni_helpers.asm");

0 commit comments

Comments
 (0)