Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / src / lib / core / core.gni
1 # Copyright (c) 2020-2021 Project CHIP Authors
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 declare_args() {
16   # Enable logging. Shorthand for chip_error_logging, etc.
17   chip_logging = true
18 }
19
20 declare_args() {
21   # Configure target tyle: unix, embedded.
22   chip_target_style = ""
23
24   # Enable error logging.
25   chip_error_logging = chip_logging
26
27   # Enable progress logging.
28   chip_progress_logging = chip_logging
29
30   # Enable detail logging.
31   chip_detail_logging = chip_logging
32
33   # Enable short error strings.
34   chip_config_short_error_str = false
35
36   # Enable argument parser.
37   chip_config_enable_arg_parser = true
38
39   # Memory management style: malloc, simple, platform.
40   chip_config_memory_management = "malloc"
41
42   # Memory management debug option: enable additional checks.
43   chip_config_memory_debug_checks = false
44
45   # Memory management debug option: use dmalloc
46   chip_config_memory_debug_dmalloc = false
47
48   # Overall experimental options for CHIP
49   chip_enable_interaction_model = false
50 }
51
52 if (chip_target_style == "") {
53   if (current_os != "freertos" && current_os != "zephyr") {
54     chip_target_style = "unix"
55   } else {
56     chip_target_style = "embedded"
57   }
58 }
59
60 assert(chip_target_style == "unix" || chip_target_style == "embedded",
61        "Please select a valid target style: unix, embedded")
62
63 assert(
64     chip_config_memory_management == "malloc" ||
65         chip_config_memory_management == "simple" ||
66         chip_config_memory_management == "platform",
67     "Please select a valid memory management style: malloc, simple, platform")