File tree 4 files changed +48
-7
lines changed
4 files changed +48
-7
lines changed Original file line number Diff line number Diff line change @@ -325,4 +325,27 @@ jobs:
325
325
api-level : 31
326
326
arch : x86_64
327
327
profile : Nexus 6
328
- script : bash tool/scripts/run_android_integration_test.sh
328
+ script : bash tool/scripts/run_android_integration_test.sh
329
+
330
+ check_android15_16k_page_alignment :
331
+ name : Check android15 16k page size alignment
332
+ if : ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
333
+ strategy :
334
+ matrix :
335
+ version : ['3.x']
336
+ runs-on : ubuntu-latest
337
+ steps :
338
+ - uses : actions/checkout@v1
339
+ - uses : actions/setup-java@v1
340
+ with :
341
+ java-version : ' 11'
342
+ - uses : subosito/flutter-action@v2
343
+ with :
344
+ flutter-version : ${{ matrix.version }}
345
+ cache : true
346
+ - run : flutter pub get
347
+ - name : Run flutter build apk
348
+ run : flutter build apk
349
+ working-directory : example
350
+ - name : Check android15 16k page size alignment
351
+ run : bash tool/scripts/check_android15_16k_page_alignment.sh example/build/app/intermediates/merged_native_libs/release/out/lib/arm64-v8a/libiris_method_channel.so
Original file line number Diff line number Diff line change @@ -26,6 +26,6 @@ subprojects {
26
26
project. evaluationDependsOn(' :app' )
27
27
}
28
28
29
- task clean ( type : Delete ) {
29
+ tasks . register( " clean " , Delete ) {
30
30
delete rootProject. buildDir
31
31
}
Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ add_library(${LIBRARY_NAME} SHARED
27
27
${SOURCES}
28
28
)
29
29
30
- # set_target_properties(hello PROPERTIES
31
- # PUBLIC_HEADER hello.h
32
- # OUTPUT_NAME "hello"
33
- # )
34
-
35
30
target_compile_definitions (${LIBRARY_NAME} PUBLIC DART_SHARED_LIB)
31
+
32
+ if (ANDROID)
33
+ # Support Android 15 16k page size
34
+ target_link_options (${LIBRARY_NAME} PRIVATE "-Wl,-z,max-page-size=16384" )
35
+ endif ()
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # usage: check_android15_16k_page_alignment.sh path/to/lib.so
4
+
5
+ SO_FILE=" $1 "
6
+
7
+ RED=" \e[31m"
8
+ GREEN=" \e[32m"
9
+ ENDCOLOR=" \e[0m"
10
+
11
+ res=" $( objdump -p ${SO_FILE} | grep LOAD | awk ' { print $NF }' | head -1) "
12
+ if [[ $res =~ " 2**14" ]] || [[ $res =~ " 2**16" ]]; then
13
+ echo -e " ${SO_FILE} : ALIGNED ($res )"
14
+ exit 0
15
+ else
16
+ echo -e " ${SO_FILE} : UNALIGNED ($res )"
17
+ exit 1
18
+ fi
You can’t perform that action at this time.
0 commit comments