Skip to content

Commit

Permalink
Merge pull request project-chip#91 from lukgni/fix_warning_number
Browse files Browse the repository at this point in the history
Fix too many warnings in Mbed variant of CHIP build
  • Loading branch information
pan- authored Mar 4, 2021
2 parents 771290b + beab961 commit f2e9bad
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ config("optimize_default") {
config("disabled_warnings") {
cflags = [
"-Wno-deprecated-declarations",
"-Wno-unknown-warning-option",
"-Wno-missing-field-initializers",
"-Wno-unused-parameter",
]
Expand All @@ -150,6 +149,9 @@ config("disabled_warnings") {
"-Wno-cast-function-type",
]
}
else {
cflags += [ "-Wno-unknown-warning-option" ]
}
}

config("strict_warnings") {
Expand Down
7 changes: 7 additions & 0 deletions config/mbed/chip-gn/.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/build.gni")

# The location of the build configuration file.
buildconfig = "//build/config/BUILDCONFIG.gn"

Expand All @@ -22,5 +24,10 @@ default_args = {
target_cpu = "arm"
target_os = "mbed"

default_configs_warnings = [
"${build_root}/config/compiler:warnings_default",
"//:chip_custom_cflags_config"
]

import("//args.gni")
}
5 changes: 5 additions & 0 deletions config/mbed/chip-gn/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ assert(current_os == "mbed")

declare_args() {
chip_build_libshell = false
chip_custom_build_cflags = []
}

config("chip_custom_cflags_config") {
cflags = chip_custom_build_cflags
}

group("mbed") {
Expand Down
7 changes: 7 additions & 0 deletions config/mbed/chip-gn/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ chip_project_config_include = ""
chip_system_project_config_include = ""
chip_device_project_config_include = ""

chip_custom_build_cflags = [
"-Wno-shadow",
"-Wno-conversion",
"-Wno-maybe-uninitialized",
"-Wno-return-type"
]

custom_toolchain = "//toolchain:mbed"
mbedtls_target = "//mbedtls:mbedtls"

Expand Down

0 comments on commit f2e9bad

Please sign in to comment.