-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable depending on ring for x86, armv7 targets #347
Labels
Comments
Yes, with the following change, shadowsocks-rust works now on x86 android simulator. --- a/.cargo/config.toml @@ -3,7 +3,14 @@ rustflags = [
# "--print", "native-static-libs",
]
-[target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))']
+[target.'cfg(any(target_arch = "x86"))']
+rustflags = [
+ # "--print", "native-static-libs",
+ # "-C", "target-cpu=native",
+ "-C", "target-feature=+aes,+pclmul,+sse,+sse2,+sse3,+ssse3",
+]
+
+[target.'cfg(any(target_arch = "x86_64"))']
rustflags = [
# "--print", "native-static-libs",
# "-C", "target-cpu=native", --- a/shadowsocks/Cargo.toml @@ -87,10 +87,16 @@ tower = { git = "https://github.com/tower-rs/tower.git", optional = true }
ipnet = "2.3"
iprange = "0.6"
-[target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))'.dependencies]
+[target.'cfg(any(target_arch = "arm"))'.dependencies]
+shadowsocks-crypto = { version = "0.1" }
+
+[target.'cfg(any(target_arch = "x86"))'.dependencies]
+shadowsocks-crypto = { version = "0.1" }
+
+[target.'cfg(any(target_arch = "x86_64"))'.dependencies]
shadowsocks-crypto = { version = "0.1", features = ["ring"] }
-[target.'cfg(any(target_arch = "arm", target_arch = "aarch64"))'.dependencies]
+[target.'cfg(any(target_arch = "aarch64"))'.dependencies]
shadowsocks-crypto = { version = "0.1", features = ["ring"] }
[target.'cfg(not(any(target_arch = "x86", target_arch = "x86_64", target_arch = "arm", target_arch = "aarch64")))'.dependencies] |
Great. These changes will be included in v1.9.0 release. |
zonyitoo
added a commit
that referenced
this issue
Dec 14, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
shadowsocks/shadowsocks-android#2622
shadowsocks/crypto2#6
RUSTFLAGS
separately forx86
shadowsocks-rust/.cargo/config.toml
Lines 6 to 11 in d0fc263
ring
forx86
andarmv7
compile targetshadowsocks-rust/shadowsocks/Cargo.toml
Lines 90 to 94 in d0fc263
@madeye Please verify if these modification works for your x86 Android device.
The text was updated successfully, but these errors were encountered: