Revert "cmake: compiler/xcc: omit -g if needed for Clang"
This reverts commit deeb98da53
.
A less invasive change has been implemented which does not
require changes to the GCC compiler flag file. So revert
the commit.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
0b09ca8cd0
commit
5c037fe122
2 changed files with 5 additions and 11 deletions
|
@ -162,14 +162,12 @@ check_set_compiler_property(APPEND PROPERTY hosted -fno-freestanding)
|
|||
# gcc flag for a freestandingapplication
|
||||
set_compiler_property(PROPERTY freestanding -ffreestanding)
|
||||
|
||||
if(NOT DEFINED GCC_NO_G_FLAG)
|
||||
# Flag to enable debugging
|
||||
set_compiler_property(PROPERTY debug -g)
|
||||
# Flag to enable debugging
|
||||
set_compiler_property(PROPERTY debug -g)
|
||||
|
||||
# GCC 11 by default emits DWARF version 5 which cannot be parsed by
|
||||
# pyelftools. Can be removed once pyelftools supports v5.
|
||||
check_set_compiler_property(APPEND PROPERTY debug -gdwarf-4)
|
||||
endif()
|
||||
# GCC 11 by default emits DWARF version 5 which cannot be parsed by
|
||||
# pyelftools. Can be removed once pyelftools supports v5.
|
||||
check_set_compiler_property(APPEND PROPERTY debug -gdwarf-4)
|
||||
|
||||
set_compiler_property(PROPERTY no_common -fno-common)
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
# No special flags are needed for xcc.
|
||||
# Only select whether gcc or clang flags should be inherited.
|
||||
if(CC STREQUAL "clang")
|
||||
if($ENV{XCC_NO_G_FLAG})
|
||||
set(GCC_NO_G_FLAG 1)
|
||||
endif()
|
||||
|
||||
include(${ZEPHYR_BASE}/cmake/compiler/clang/compiler_flags.cmake)
|
||||
|
||||
# Now, let's overwrite the flags that are different in xcc/clang.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue