aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Compression.cpp
diff options
context:
space:
mode:
authorSjoerd Meijer <sjoerd.meijer@arm.com>2020-03-03 09:12:43 +0000
committerSjoerd Meijer <sjoerd.meijer@arm.com>2020-03-03 09:15:07 +0000
commit0a9fc9233e172601e26381810d093e02ef410f65 (patch)
treefe36f7ffe714f4db28e95c360d5cc6bc9c383a0d /llvm/lib/Support/Compression.cpp
parentd58e383f23d3a64b4ed71926217a6d36543e77c5 (diff)
downloadllvm-0a9fc9233e172601e26381810d093e02ef410f65.zip
llvm-0a9fc9233e172601e26381810d093e02ef410f65.tar.gz
llvm-0a9fc9233e172601e26381810d093e02ef410f65.tar.bz2
[Driver] Default to -fno-common for all targets
This makes -fno-common the default for all targets because this has performance and code-size benefits and is more language conforming for C code. Additionally, GCC10 also defaults to -fno-common and so we get consistent behaviour with GCC. With this change, C code that uses tentative definitions as definitions of a variable in multiple translation units will trigger multiple-definition linker errors. Generally, this occurs when the use of the extern keyword is neglected in the declaration of a variable in a header file. In some cases, no specific translation unit provides a definition of the variable. The previous behavior can be restored by specifying -fcommon. As GCC has switched already, we benefit from applications already being ported and existing documentation how to do this. For example: - https://gcc.gnu.org/gcc-10/porting_to.html - https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common Differential revision: https://reviews.llvm.org/D75056
Diffstat (limited to 'llvm/lib/Support/Compression.cpp')
0 files changed, 0 insertions, 0 deletions