-
Notifications
You must be signed in to change notification settings - Fork 419
Bump CargoKit to latest and update it for Android 16KB pages #3170
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
Changes from 2 commits
c56fdeb
669d1e3
6eb09c0
2d3256e
81c1f94
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -189,7 +189,21 @@ class AndroidEnvironment { | |
| if (rustFlags.isNotEmpty) { | ||
| rustFlags = '$rustFlags\x1f'; | ||
| } | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir'; | ||
| if (["arm64-v8a", "x86_64"].contains(target.android)) { | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir\x1f'; | ||
|
|
||
| const pageSizeArgs = [ | ||
| "-C", | ||
| "link-arg=-Wl,--hash-style=both", | ||
| "-C", | ||
| "link-arg=-Wl,-z,max-page-size=16384" | ||
| ]; | ||
| final pageSizeArgsString = pageSizeArgs.join("\x1f"); | ||
|
|
||
| rustFlags = '$rustFlags$pageSizeArgsString'; | ||
| } else { | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir'; | ||
| } | ||
|
Comment on lines
+192
to
+206
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This logic can be simplified by unconditionally appending the workaround directory flag first, and then conditionally appending the 16KB page size flags if the target is rustFlags = '$rustFlags-L\\x1f$workaroundDir';
if (['arm64-v8a', 'x86_64'].contains(target.android)) {
const pageSizeArgs = [
'-C',
'link-arg=-Wl,--hash-style=both',
'-C',
'link-arg=-Wl,-z,max-page-size=16384',
];
rustFlags = '$rustFlags\\x1f${pageSizeArgs.join("\\x1f")}';
}References
|
||
| return rustFlags; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -189,7 +189,21 @@ class AndroidEnvironment { | |
| if (rustFlags.isNotEmpty) { | ||
| rustFlags = '$rustFlags\x1f'; | ||
| } | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir'; | ||
| if (["arm64-v8a", "x86_64"].contains(target.android)) { | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir\x1f'; | ||
|
|
||
| const pageSizeArgs = [ | ||
| "-C", | ||
| "link-arg=-Wl,--hash-style=both", | ||
| "-C", | ||
| "link-arg=-Wl,-z,max-page-size=16384" | ||
| ]; | ||
| final pageSizeArgsString = pageSizeArgs.join("\x1f"); | ||
|
|
||
| rustFlags = '$rustFlags$pageSizeArgsString'; | ||
| } else { | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir'; | ||
| } | ||
|
Comment on lines
+192
to
+206
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This logic can be simplified by unconditionally appending the workaround directory flag first, and then conditionally appending the 16KB page size flags if the target is rustFlags = '$rustFlags-L\\x1f$workaroundDir';
if (['arm64-v8a', 'x86_64'].contains(target.android)) {
const pageSizeArgs = [
'-C',
'link-arg=-Wl,--hash-style=both',
'-C',
'link-arg=-Wl,-z,max-page-size=16384',
];
rustFlags = '$rustFlags\\x1f${pageSizeArgs.join("\\x1f")}';
}References
|
||
| return rustFlags; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -189,7 +189,21 @@ class AndroidEnvironment { | |
| if (rustFlags.isNotEmpty) { | ||
| rustFlags = '$rustFlags\x1f'; | ||
| } | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir'; | ||
| if (["arm64-v8a", "x86_64"].contains(target.android)) { | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir\x1f'; | ||
|
|
||
| const pageSizeArgs = [ | ||
| "-C", | ||
| "link-arg=-Wl,--hash-style=both", | ||
| "-C", | ||
| "link-arg=-Wl,-z,max-page-size=16384" | ||
| ]; | ||
| final pageSizeArgsString = pageSizeArgs.join("\x1f"); | ||
|
|
||
| rustFlags = '$rustFlags$pageSizeArgsString'; | ||
| } else { | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir'; | ||
| } | ||
|
Comment on lines
+192
to
+206
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This logic can be simplified by unconditionally appending the workaround directory flag first, and then conditionally appending the 16KB page size flags if the target is rustFlags = '$rustFlags-L\\x1f$workaroundDir';
if (['arm64-v8a', 'x86_64'].contains(target.android)) {
const pageSizeArgs = [
'-C',
'link-arg=-Wl,--hash-style=both',
'-C',
'link-arg=-Wl,-z,max-page-size=16384',
];
rustFlags = '$rustFlags\\x1f${pageSizeArgs.join("\\x1f")}';
}References
|
||
| return rustFlags; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -189,7 +189,21 @@ class AndroidEnvironment { | |
| if (rustFlags.isNotEmpty) { | ||
| rustFlags = '$rustFlags\x1f'; | ||
| } | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir'; | ||
| if (["arm64-v8a", "x86_64"].contains(target.android)) { | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir\x1f'; | ||
|
|
||
| const pageSizeArgs = [ | ||
| "-C", | ||
| "link-arg=-Wl,--hash-style=both", | ||
| "-C", | ||
| "link-arg=-Wl,-z,max-page-size=16384" | ||
| ]; | ||
| final pageSizeArgsString = pageSizeArgs.join("\x1f"); | ||
|
|
||
| rustFlags = '$rustFlags$pageSizeArgsString'; | ||
| } else { | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir'; | ||
| } | ||
|
Comment on lines
+192
to
+206
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This logic can be simplified by unconditionally appending the workaround directory flag first, and then conditionally appending the 16KB page size flags if the target is rustFlags = '$rustFlags-L\\x1f$workaroundDir';
if (['arm64-v8a', 'x86_64'].contains(target.android)) {
const pageSizeArgs = [
'-C',
'link-arg=-Wl,--hash-style=both',
'-C',
'link-arg=-Wl,-z,max-page-size=16384',
];
rustFlags = '$rustFlags\\x1f${pageSizeArgs.join("\\x1f")}';
}References
|
||
| return rustFlags; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -189,7 +189,21 @@ class AndroidEnvironment { | |
| if (rustFlags.isNotEmpty) { | ||
| rustFlags = '$rustFlags\x1f'; | ||
| } | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir'; | ||
| if (["arm64-v8a", "x86_64"].contains(target.android)) { | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir\x1f'; | ||
|
|
||
| const pageSizeArgs = [ | ||
| "-C", | ||
| "link-arg=-Wl,--hash-style=both", | ||
| "-C", | ||
| "link-arg=-Wl,-z,max-page-size=16384" | ||
| ]; | ||
| final pageSizeArgsString = pageSizeArgs.join("\x1f"); | ||
|
|
||
| rustFlags = '$rustFlags$pageSizeArgsString'; | ||
| } else { | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir'; | ||
| } | ||
|
Comment on lines
+192
to
+206
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This logic can be simplified by unconditionally appending the workaround directory flag first, and then conditionally appending the 16KB page size flags if the target is rustFlags = '$rustFlags-L\\x1f$workaroundDir';
if (['arm64-v8a', 'x86_64'].contains(target.android)) {
const pageSizeArgs = [
'-C',
'link-arg=-Wl,--hash-style=both',
'-C',
'link-arg=-Wl,-z,max-page-size=16384',
];
rustFlags = '$rustFlags\\x1f${pageSizeArgs.join("\\x1f")}';
}References
|
||
| return rustFlags; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -189,7 +189,21 @@ class AndroidEnvironment { | |
| if (rustFlags.isNotEmpty) { | ||
| rustFlags = '$rustFlags\x1f'; | ||
| } | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir'; | ||
| if (["arm64-v8a", "x86_64"].contains(target.android)) { | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir\x1f'; | ||
|
|
||
| const pageSizeArgs = [ | ||
| "-C", | ||
| "link-arg=-Wl,--hash-style=both", | ||
| "-C", | ||
| "link-arg=-Wl,-z,max-page-size=16384" | ||
| ]; | ||
| final pageSizeArgsString = pageSizeArgs.join("\x1f"); | ||
|
|
||
| rustFlags = '$rustFlags$pageSizeArgsString'; | ||
| } else { | ||
| rustFlags = '$rustFlags-L\x1f$workaroundDir'; | ||
| } | ||
|
Comment on lines
+192
to
+206
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This logic can be simplified by unconditionally appending the workaround directory flag first, and then conditionally appending the 16KB page size flags if the target is rustFlags = '$rustFlags-L\\x1f$workaroundDir';
if (['arm64-v8a', 'x86_64'].contains(target.android)) {
const pageSizeArgs = [
'-C',
'link-arg=-Wl,--hash-style=both',
'-C',
'link-arg=-Wl,-z,max-page-size=16384',
];
rustFlags = '$rustFlags\\x1f${pageSizeArgs.join("\\x1f")}';
}References
|
||
| return rustFlags; | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic can be simplified by unconditionally appending the workaround directory flag first, and then conditionally appending the 16KB page size flags if the target is
arm64-v8aorx86_64. This avoids duplicating the-L\x1f$workaroundDirstring and simplifies the control flow. Additionally, using single quotes for string literals is preferred in Dart.References