diff --git a/.cargo/config.toml b/.cargo/config.toml index 28ddf10aaa..5e70ede61c 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -5,3 +5,12 @@ rustflags = [ ] runner = 'wasm-bindgen-test-runner' +[target.aarch64-apple-darwin] +rustflags = [ + # We can guarantee that this target will always run on a CPU with _at least_ + # these capabilities, so let's optimize for them + "-Ctarget-cpu=apple-m1" +] + +[target.x86_64-pc-windows-gnu] +lto = true diff --git a/Cargo.toml b/Cargo.toml index 77bd586f5a..159a0aaeaf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,7 +65,7 @@ tracing = "0.1.40" objc = "0.2.7" [profile.release] -lto = true +lto = "thin" strip = true debug = "limited" codegen-units = 1