-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Expand file tree
/
Copy pathargs.gni
More file actions
65 lines (52 loc) · 2.66 KB
/
args.gni
File metadata and controls
65 lines (52 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright (c) 2020-2022 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build_overrides/chip.gni")
import("${chip_root}/config/standalone/args.gni")
chip_device_project_config_include = "<CHIPProjectAppConfig.h>"
chip_project_config_include = "<CHIPProjectAppConfig.h>"
chip_system_project_config_include = "<SystemProjectConfig.h>"
chip_project_config_include_dirs =
[ "${chip_root}/examples/tv-casting-app/tv-casting-common/include" ]
chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ]
import("${chip_root}/examples/tv-casting-app/tv-casting-common/tv-casting-common.gni")
chip_enable_additional_data_advertising = true
chip_enable_rotating_device_id = true
chip_config_network_layer_ble = false
chip_max_discovered_ip_addresses = 20
enable_rtti = true
if (optimize_apk_size) {
# Size-optimized build: smaller APK, fewer debug features
# NOTE: matter_enable_tracing_support and matter_trace_config are
# passed as GN build args from android.py to properly override
# their declare_args() defaults in tracing_args.gni.
chip_build_libshell = false
optimize_for_size = true # -Os (size) instead of -O2 (speed)
symbol_level = 0 # -g0: no debug symbols
} else {
# Default development build: full debug features, fast compilation
chip_build_libshell = true
optimize_for_size = false # -O2 (speed) - faster compilation
symbol_level = 0 # -g0 (no debug symbols) - fastest compilation
}
# Symbol Level Options:
# 0 = No debug symbols (-g0): Fastest build, smallest binary, no crash stack traces
# 1 = Minimal symbols (-g1): Moderate build speed, crash reports with function names
# 2 = Full symbols (-g2): Slowest build, largest binary, full debugging capability
# Note: These settings affect C++ compilation only, not Java/Kotlin code
# is_debug Options:
# false = Release mode: Removes assert() checks, bounds checking, extra logging
# true = Debug mode: Keeps all safety checks, slower execution but catches bugs
# Default: true (if not specified, GN defaults to debug mode)
# Note: In size-optimized builds, is_debug=false is set by android.py as a
# GN build arg to properly override the declare_args() default.