File tree Expand file tree Collapse file tree 3 files changed +24
-25
lines changed
android/core/src/main/cpp Expand file tree Collapse file tree 3 files changed +24
-25
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ android_arm64:
2
2
dart ./setup.dart android --arch arm64
3
3
macos_arm64 :
4
4
dart ./setup.dart macos --arch arm64
5
+ android_app :
6
+ dart ./setup.dart android
5
7
android_arm64_core :
6
8
dart ./setup.dart android --arch arm64 --out core
7
9
macos_arm64_core :
Original file line number Diff line number Diff line change @@ -4,24 +4,25 @@ cmake_minimum_required(VERSION 3.22.1)
4
4
project ("core" )
5
5
6
6
7
- #if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
8
- # add_compile_options(-O3)
9
- #
10
- # add_compile_options(-flto)
11
- #
12
- # add_compile_options(-g0)
13
- #
14
- # add_compile_options(-ffunction-sections -fdata-sections)
15
- #
16
- # add_compile_options(-fno-exceptions -fno-rtti)
17
- #
18
- # add_link_options(
19
- # -flto
20
- # -Wl,--gc-sections
21
- # -Wl,--strip-all
22
- # -Wl,--exclude-libs=ALL
23
- # )
24
- #endif ()
7
+ if (NOT "${CMAKE_BUILD_TYPE} " STREQUAL "Debug" )
8
+ add_compile_options (-O3)
9
+
10
+ add_compile_options (-flto)
11
+
12
+ add_compile_options (-g0)
13
+
14
+ add_compile_options (-ffunction-sections -fdata-sections)
15
+
16
+ add_compile_options (-fno-exceptions -fno-rtti)
17
+
18
+ add_link_options (
19
+ -flto
20
+ -Wl,--gc-sections
21
+ -Wl,--strip-all
22
+ -Wl,--exclude -libs=ALL
23
+ )
24
+ endif ()
25
+
25
26
set (LIB_CLASH_PATH "${CMAKE_SOURCE_DIR} /../jniLibs/${ANDROID_ABI} /libclash.so" )
26
27
if (EXISTS ${LIB_CLASH_PATH} )
27
28
message (STATUS "Found libclash.so for ABI ${ANDROID_ABI} " )
Original file line number Diff line number Diff line change @@ -199,7 +199,6 @@ class Build {
199
199
required Mode mode,
200
200
required Target target,
201
201
Arch ? arch,
202
- bool stable = false ,
203
202
}) async {
204
203
final isLib = mode == Mode .lib;
205
204
@@ -238,17 +237,15 @@ class Build {
238
237
if (isLib) {
239
238
env["CGO_ENABLED" ] = "1" ;
240
239
env["CC" ] = _getCc (item);
241
- if (stable) {
242
- env["CFLAGS" ] = "-O3 -Werror" ;
243
- }
240
+ env["CFLAGS" ] = "-O3 -Werror" ;
244
241
} else {
245
242
env["CGO_ENABLED" ] = "0" ;
246
243
}
247
244
248
245
final execLines = [
249
246
"go" ,
250
247
"build" ,
251
- if (stable) "-ldflags=-w -s" ,
248
+ "-ldflags=-w -s" ,
252
249
"-tags=$tags " ,
253
250
if (isLib) "-buildmode=c-shared" ,
254
251
"-o" ,
@@ -473,7 +470,6 @@ class BuildCommand extends Command {
473
470
target: target,
474
471
arch: arch,
475
472
mode: mode,
476
- stable: env == "stable"
477
473
);
478
474
479
475
if (target == Target .windows) {
@@ -530,7 +526,7 @@ class BuildCommand extends Command {
530
526
target: target,
531
527
targets: "apk" ,
532
528
args:
533
- "--flutter-build-args split-per-abi --build-target-platform ${defaultTargets .join ("," )}" ,
529
+ ", split-per-abi --build-target-platform ${defaultTargets .join ("," )}" ,
534
530
env: env,
535
531
);
536
532
return ;
You can’t perform that action at this time.
0 commit comments