aboutsummaryrefslogtreecommitdiff
path: root/src/platform.rs
diff options
context:
space:
mode:
authorJack O'Connor <[email protected]>2020-08-31 16:55:48 -0400
committerJack O'Connor <[email protected]>2020-08-31 18:25:38 -0400
commita79fec7e392b93b1571bf835570249848be66a16 (patch)
tree75cb136255295a976f170e1c4f2f6b1f95130915 /src/platform.rs
parent8610ebda6a25b73dbebf656285725e3b1d255731 (diff)
fix a build break on x86 targets without guaranteed SSE2 support
This is quite hard to trigger, because SSE2 has been guaranteed for a long time. But you could trigger it this way: rustup target add i686-unknown-linux-musl RUSTFLAGS="-C target-cpu=i386" cargo build --target i686-unknown-linux-musl Note a relevant gotcha though: The `cross` tool will not forward environment variables like RUSTFLAGS to the container by default, so if you're testing with `cross` you'll need to use the `rustc` command to explicitly pass the flag, as I've done here in ci.yml. (Or you could create a `Cross.toml` file, but I don't want to commit one of those if I can avoid it.)
Diffstat (limited to 'src/platform.rs')
-rw-r--r--src/platform.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/platform.rs b/src/platform.rs
index c0eb21d..ee9c349 100644
--- a/src/platform.rs
+++ b/src/platform.rs
@@ -403,6 +403,8 @@ pub fn sse2_detected() -> bool {
{
return true;
}
+ #[allow(unreachable_code)]
+ false
}
#[inline(always)]