summaryrefslogtreecommitdiffstats
path: root/third_party/rust/encoding_rs/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/encoding_rs/build.rs')
-rw-r--r--third_party/rust/encoding_rs/build.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/third_party/rust/encoding_rs/build.rs b/third_party/rust/encoding_rs/build.rs
new file mode 100644
index 0000000000..2e34279159
--- /dev/null
+++ b/third_party/rust/encoding_rs/build.rs
@@ -0,0 +1,12 @@
+fn main() {
+ // This does not enable `RUSTC_BOOTSTRAP=1` for `packed_simd`.
+ // You still need to knowingly have a setup that makes
+ // `packed_simd` compile. Therefore, having this file on
+ // crates.io is harmless in terms of users of `encoding_rs`
+ // accidentally depending on nightly features. Having this
+ // here means that if you knowingly want this, you only
+ // need to maintain a fork of `packed_simd` without _also_
+ // having to maintain a fork of `encoding_rs`.
+ #[cfg(feature = "simd-accel")]
+ println!("cargo:rustc-env=RUSTC_BOOTSTRAP=1");
+}