summaryrefslogtreecommitdiff
path: root/zephyr/cmake/compiler/clang/compiler_flags.cmake
blob: 6b86a8705a26f4fd7c95d4c1857bbc041b0dc683 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

include("${ZEPHYR_BASE}/cmake/compiler/clang/compiler_flags.cmake")

# Disable -fno-freestanding.
set_compiler_property(PROPERTY hosted)

# Disable position independent code.
add_compile_options(-fno-PIC)

check_set_compiler_property(APPEND PROPERTY warning_extended -Wunused-variable
	-Werror=unused-variable -Werror=missing-braces
	-Werror=sometimes-uninitialized -Werror=unused-function
	-Werror=array-bounds)