Skip to content

Commit d296579

Browse files
authored
[native_toolchain_c] Use -encryptable linker flag (dart-lang#2982)
1 parent bf77b81 commit d296579

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

‎pkgs/native_toolchain_c/CHANGELOG.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
## 0.17.5-wip
22

33
- Search for NDK in `ANDROID_HOME` and `ANDROID_NDK` environment variables.
4+
- On iOS and macOS, use the `-encryptable` linker flag. This resolves an
5+
[issue](https://github.com/dart-lang/native/issues/2973) with app store
6+
rejections.
47

58
## 0.17.4
69

‎pkgs/native_toolchain_c/lib/src/cbuilder/run_cbuilder.dart‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ class RunCBuilder {
302302
// Support Android 15 page size by default, can be overridden by
303303
// passing [flags].
304304
if (codeConfig.targetOS == OS.android) '-Wl,-z,max-page-size=16384',
305+
if (codeConfig.targetOS == OS.iOS || codeConfig.targetOS == OS.macOS)
306+
'-Wl,-encryptable',
305307
...flags,
306308
for (final MapEntry(key: name, :value) in defines.entries)
307309
if (value == null) '-D$name' else '-D$name=$value',

0 commit comments

Comments
 (0)