opnsense-src/lib/clang
Jessica Clarke c1f7d8dd23 clang: Build with -fno-strict-aliasing when using GCC
Somewhat ironically, there are strict aliasing violations in Clang,
which can result in the following assertion failure:

  Assertion `*(NamedDecl **)&Data == ND && "PointerUnion mangles the NamedDecl pointer!"' failed.

Upstream's clang/CMakeLists.txt specifically (not LLVM as a whole)
passes -fno-strict-aliasing if the compiler is not Clang, and this fixes
the above issue.

This was seen when cross-building from Linux using a bootstrap
compiler, but likely also affects worlds built with a new enough
external GCC toolchain.

MFC after:	1 week
Reviewed by:	dim
Differential Revision:	https://reviews.freebsd.org/D31533
2021-08-24 15:04:25 +01:00
..
headers Merge llvm-project 12.0.1 rc2 2021-06-19 20:09:28 +02:00
include Follow-up to d69d07569e by bumping lld local version 2021-08-07 19:14:31 +02:00
libclang Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef 2021-06-13 21:37:19 +02:00
liblldb Merge llvm-project 12.0.0 release 2021-06-13 22:01:15 +02:00
libllvm Allow bootstrapping llvm-tblgen on macOS and Linux 2021-08-02 14:36:03 +01:00
libllvmminimal Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef 2021-06-13 21:37:19 +02:00
clang.build.mk clang: Build with -fno-strict-aliasing when using GCC 2021-08-24 15:04:25 +01:00
clang.pre.mk Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
freebsd_cc_version.h Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef 2021-06-13 21:37:19 +02:00
lldb.pre.mk Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
llvm.build.mk clang: Fix inverted condition in llvm.build.mk 2021-08-12 23:53:30 +01:00
llvm.pre.mk Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
Makefile Completely revamp the way llvm, clang and lldb are built. 2016-08-26 22:44:22 +00:00
Makefile.inc build: provide a default WARNS for all in-tree builds 2020-09-18 17:17:46 +00:00