File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
super_native_extensions/rust Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,19 @@ mod gen_keyboard_map;
3
3
4
4
fn main ( ) {
5
5
let target_system = std:: env:: var ( "CARGO_CFG_TARGET_OS" ) . unwrap ( ) ;
6
+ let target_arch = std:: env:: var ( "CARGO_CFG_TARGET_ARCH" ) . unwrap ( ) ;
7
+
6
8
// keyboard map is currently only supported on desktop.
7
9
match target_system. as_str ( ) {
8
10
"macos" | "linux" | "windows" => {
9
11
gen_keyboard_map:: generate_keyboard_map ( & target_system) . unwrap ( ) ;
10
12
}
11
13
_ => { }
12
14
}
15
+
16
+ // Add support for the maximum page size of 16 KB for Android (only on the arm64 and x86_64 platforms).
17
+ // see: https://developer.android.com/guide/practices/page-sizes#other-build-systems
18
+ if target_system == "android" && ( target_arch == "aarch64" || target_arch == "x86_64" ) {
19
+ println ! ( "cargo:rustc-link-arg=-Wl,-z,max-page-size=16384" ) ;
20
+ }
13
21
}
You can’t perform that action at this time.
0 commit comments