Commit graph

574 commits

Author SHA1 Message Date
Dimitry Andric f3fd488f1e Merge llvm-project release/15.x llvmorg-15.0.6-0-g088f33605d8a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.6-0-g088f33605d8a.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:05:19 +01:00
Dimitry Andric 6246ae0b85 Merge llvm-project release/15.x llvmorg-15.0.2-10-gf3c5289e7846
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.2-10-gf3c5289e7846.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:05:09 +01:00
Dimitry Andric a4a491e223 Merge llvm-project release/15.x llvmorg-15.0.0-9-g1c73596d3454
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.0-9-g1c73596d3454.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:05:02 +01:00
Dimitry Andric 61cfbce334 Merge llvm-project release/15.x llvmorg-15.0.0-rc2-40-gfbd2950d8d0d
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.0-rc2-40-gfbd2950d8d0d.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:04:56 +01:00
Dimitry Andric 972a253a57 Merge llvm-project main llvmorg-15-init-17826-g1f8ae9d7e7e4
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-17826-g1f8ae9d7e7e4, the last commit before
the upstream release/16.x branch was created.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:04:48 +01:00
Dimitry Andric fcaf7f8644 Merge llvm-project main llvmorg-15-init-17485-ga3e38b4a206b
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-17485-ga3e38b4a206b.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:04:38 +01:00
Dimitry Andric 753f127f3a Merge llvm-project main llvmorg-15-init-16436-g18a6ab5b8d1f
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-16436-g18a6ab5b8d1f.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:03:59 +01:00
Dimitry Andric 81ad626541 Merge llvm-project main llvmorg-15-init-15358-g53dc0f10787
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-15358-g53dc0f10787.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:02:26 +01:00
Kyle Evans ed7910fbac Revert "Avoid using TARGET_ARCH in llvm.build.mk"
This reverts commit 8534e6be81, and adds
a cautionary note that there are dragons about that should be considered
when changing it.

PR:		267026
Reviewed by:	dim, imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D36981
2022-10-13 22:04:47 -05:00
Brooks Davis 77becb9325 Rename MACHINE_ABI and TARGET_ABI
The MACHINE_ABI and TARGET_ABI variables are used to set the middle of
the target triple (e.g., "-unknown-" or "-gnueabihf-"). They are not set
by any tool in the base system and I've only found the latter mentioned
in one review online. As such, rename them to to MACHINE_TRIPLE_ABI and
TARGET_TRIPLE_ABI to clear the way to use MACHINE_ABI as a supplement to
MACHINE_CPU, etc.

Reviewed by:	imp, jhb
Obtained from:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D36420
2022-10-05 17:27:44 +01:00
Dimitry Andric 8534e6be81 Avoid using TARGET_ARCH in llvm.build.mk
Apparently the TARGET_ARCH macro is not supposed to be used outside of
the top-level Makefiles. Directly use MACHINE_ARCH instead.

Noticed by:	imp, jrtc27
MFC after:	1 week
2022-08-14 13:11:52 +02:00
Dimitry Andric 56f451bb3b Merge llvm-project release/14.x llvmorg-14.0.5-0-gc12386ae247c
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.5-0-gc12386ae247c, aka 14.0.5 release.

PR:		261742
MFC after:	3 days
2022-06-12 20:53:16 +02:00
Dimitry Andric 809922b010 Update rest of llvm-project build glue for 14.0.4
I completely forgot about updating the generated llvm-project config
files, which also contain version numbers, etc. Sorry for the churn.

PR:		261742
Fixes:		ab9d54731f
MFC after:	3 days
2022-06-05 18:39:43 +02:00
Dimitry Andric ab9d54731f Bump versions llvm-project release/14.x llvmorg-14.0.4-0-g29f1039a7285
Somehow git rebase made this squashed commit disappear. Restore it.

PR:		261742
MFC after:	3 days
2022-06-04 15:22:44 +02:00
Dimitry Andric 4b1174e27a llvm MIPS target: add missed source file
Otherwise, linking llvm binaries with this target enabled (which is not
the default) will fail with a number of undefined symbol errors:

  ld: error: undefined symbol: llvm::initializeMipsMulMulBugFixPass(llvm::PassRegistry&)
  ld: error: undefined symbol: llvm::createMipsMulMulBugPass()

MFC after:	3 days
2022-05-31 17:41:51 +02:00
Dimitry Andric 3a9a9c0ca4 Merge llvm-project release/14.x llvmorg-14.0.3-0-g1f9140064dfb
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.3-0-g1f9140064dfb.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:46:42 +02:00
Dimitry Andric dbc822f3bc Merge llvm-project release/14.x llvmorg-14.0.0-2-g3f43d803382d
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.0-2-g3f43d803382d.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:46:31 +02:00
Dimitry Andric fb03ea46eb Merge llvm-project release/14.x llvmorg-14.0.0-rc4-2-gadd3ab7f4c8a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.0-rc4-2-gadd3ab7f4c8a.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:46:23 +02:00
Dimitry Andric d781ede639 Merge llvm-project release/14.x llvmorg-14.0.0-rc2-12-g09546e1b5103
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.0-rc2-12-g09546e1b5103.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:46:11 +02:00
Dimitry Andric d56accc7c3 Merge llvm-project release/14.x llvmorg-14.0.0-rc1-74-g4dc3cb8e3255
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.0-rc1-74-g4dc3cb8e3255.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:45:57 +02:00
Dimitry Andric 1838bd0f48 Merge llvm-project release/14.x llvmorg-14-init-18315-g190be5457c90
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-18315-g190be5457c90.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:45:25 +02:00
Dimitry Andric 1fd87a682a Merge llvm-project main llvmorg-14-init-18294-gdb01b123d012
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-18294-gdb01b123d012, the last commit before
the upstream release/14.x branch was created.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:44:47 +02:00
Dimitry Andric 04eeddc0aa Merge llvm-project main llvmorg-14-init-17616-g024a1fab5c35
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-17616-g024a1fab5c35.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:44:34 +02:00
Dimitry Andric 0eae32dcef Merge llvm-project main llvmorg-14-init-13186-g0c553cc1af2e
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-13186-g0c553cc1af2e.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:44:01 +02:00
Dimitry Andric 4824e7fd18 Merge llvm-project main llvmorg-14-init-11187-g222442ec2d71
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-11187-g222442ec2d71.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:43:49 +02:00
Dimitry Andric 5e801ac66d Merge llvm-project main llvmorg-14-init-10223-g401b76fdf2b3
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-10223-g401b76fdf2b3.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:43:32 +02:00
Alfredo Dal'Ava Junior f9ee415674 build target triple variable from sys/conf/newvers.sh
Retrieve FreeBSD revision number directly from sys/conf/newvers.sh
when building the compiler target triple value, avoiding manual
intervention on other files every new release.

Reviewed by:	imp
MFC after:	2 months
Sponsored by:	Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D34429
2022-05-03 08:09:38 -03:00
Piotr Kubaj 0b2d2290fe powerpc: Enable LLDB on all powerpc architectures
While LLDB on powerpc and powerpcspe builds as-is, on powerpc64 and
powerpc64le it requires adding a couple of additional source files
to build.

Differential review:	https://reviews.freebsd.org/D34043
Approved by:	dim, imp, emaste
2022-01-26 15:03:27 +01:00
Ed Maste adc88b9c01 Build libclang also if LLDB is enabled
LLDB depends on libclang as it uses Clang as the expression parser.
Previously setting WITHOUT_CLANG but leaving LLDB enabled (as default)
resulted in a build failure.

Users who set WITHOUT_CLANG in order to reduce build time or size
might want to set WITHOUT_LLDB in addition to WITHOUT_CLANG, or use
WITHOUT_TOOLCHAIN instead.

PR:		260993
Reported by:	eugen
Reviewed by:	dim
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2022-01-07 15:23:55 -05:00
Dimitry Andric 28a41182c0 Merge llvm-project 13.0.0 release
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-0-gd7b669b3a303, aka 13.0.0 release.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:49:29 +01:00
Dimitry Andric 8c6f6c0c80 Merge llvm-project release/13.x llvmorg-13.0.0-rc3-8-g08642a395f23
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-rc3-8-g08642a395f23.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:46:08 +01:00
Dimitry Andric 69ade1e033 Merge llvm-project release/13.x llvmorg-13.0.0-rc2-43-gf56129fe78d5
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-rc2-43-gf56129fe78d5.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:45:49 +01:00
Dimitry Andric 6e75b2fbf9 Merge llvm-project release/13.x llvmorg-13.0.0-rc1-97-g23ba3732246a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-rc1-97-g23ba3732246a.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:42:03 +01:00
Dimitry Andric fe6060f10f Merge llvm-project main llvmorg-13-init-16847-g88e66fa60ae5
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13-init-16847-g88e66fa60ae5, the last commit before
the upstream release/13.x branch was created.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:39:49 +01:00
Dimitry Andric d30dc78f79 llvm BPF target: add missed source files
Otherwise, linking llvm binaries with this target enabled (which is not
the default) will fail with a number of undefined symbol errors:

  ld: error: undefined symbol: llvm::initializeBPFAdjustOptPass(llvm::PassRegistry&)
  ld: error: undefined symbol: llvm::initializeBPFCheckAndAdjustIRPass(llvm::PassRegistry&)
  ld: error: undefined symbol: llvm::createBPFCheckAndAdjustIR()
  ld: error: undefined symbol: llvm::createBPFAdjustOpt()
  ld: error: undefined symbol: llvm::BPFAdjustOptPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&)

Reported by:	Michael Dexter <editor@callfortesting.org>
MFC after:	3 days
2021-11-02 17:49:50 +01:00
Dimitry Andric 79239b5b47 llvm-readobj: Add missed source file
In some configurations (e.g. powerpc64) the llvm-readobj tool also needs
contrib/llvm-project/llvm/BinaryFormat/MsgPackWriter.cpp, so add it to
libllvm.

Reported by:	Shawn Webb <shawn.webb@hardenedbsd.org>
Fixes:		1b85b68da0
2021-10-16 23:16:46 +02:00
Cameron Katri 1b85b68da0 llvm-readobj: Attach to buildsystem
Also install it as readelf when MK_LLVM_BINUTILS is set.

Reviewed By:	dim, arichardson
Differential Revision: https://reviews.freebsd.org/D32058
2021-10-14 17:18:05 +01:00
Alex Richardson 021385aba5 Add WITH_LLVM_BINUTILS to install LLVM binutils instead of Elftoolchain
When WITH_LLVM_BINUTILS is set, we will install the LLVM binutils as
ar/ranlib/nm/objcopy/etc. instead of the elftoolchain ones.
Having the LLVM binutils instead of the elftoolchain ones allows us to use
features such as LTO that depend on binutils that understand LLVM IR.
Another benefit will be an improved user-experience when compiling with
AddressSanitizer, since ASAN does not symbolize backtraces correctly if
addr2line is elftoolchain addr2line instead of llvm-symbolizer.
See https://lists.freebsd.org/archives/freebsd-toolchain/2021-July/000062.html
for more details.

This is currently off by default but will be turned on by default at some
point in the near future.

Reviewed By:	emaste

Differential Revision: https://reviews.freebsd.org/D31060
2021-09-06 09:49:49 +01:00
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
Jessica Clarke 5ff5d1177b clang: Fix inverted condition in llvm.build.mk
Fixes:		31ba4ce889 ("Allow bootstrapping llvm-tblgen on macOS and Linux")
MFC after:	1 week
2021-08-12 23:53:30 +01:00
Dimitry Andric cd38d9cf26 Follow-up to d69d07569e by bumping lld local version
This makes it easier to detect that lld's support for compressed input
sections on BE targets is fixed.

MFC after:	3 days
X-MFC-With:	d69d07569e
2021-08-07 19:14:31 +02:00
Alex Richardson 9f1db6c555 Add missing bsd.linker.mk include after 31ba4ce889
This is needed for -DWITH_CLEAN builds since the cleandir phase does not
include bsd.linker.mk from bsd.compiler.mk
2021-08-02 16:38:39 +01:00
Alex Richardson 31ba4ce889 Allow bootstrapping llvm-tblgen on macOS and Linux
This is needed in order to build various LLVM binutils (e.g. addr2line)
as well as clang/lld/lldb.

Co-authored-by: Jessica Clarke <jrtc27@FreeBSD.org>
Test Plan:	Compiles on ubuntu 18.04 and macOS 11.4
Reviewed By:	dim
Differential Revision: https://reviews.freebsd.org/D31057
2021-08-02 14:36:03 +01:00
Dimitry Andric 4652422eb4 Merge llvm-project 12.0.1 release
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.1-0-gfed41342a82f, a.k.a. 12.0.1 release.

PR:		255570
MFC after:	6 weeks
2021-07-16 18:29:42 +02:00
Dimitry Andric 23408297fb Merge llvm-project 12.0.1 rc2
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.1-rc2-0-ge7dac564cd0e, a.k.a. 12.0.1 rc2.

PR:		255570
MFC after:	6 weeks
2021-06-19 20:09:28 +02:00
Dimitry Andric f336b45e94 Undefine HAVE_(DE)REGISTER_FRAME in llvm's config.h on arm
Otherwise, the lli tool (enable by WITH_CLANG_EXTRAS) won't link on arm,
stating that __register_frame is undefined. This function is normally
provided by libunwind, but explicitly not for the ARM Exception ABI.

Reported by:	oh
PR:		255570
MFC after:	6 weeks
2021-06-16 20:27:39 +02:00
Dimitry Andric d409305fa3 Merge llvm-project 12.0.0 release
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.0-0-gd28af7c654d8, a.k.a. 12.0.0 release.

PR:		255570
MFC after:	6 weeks
2021-06-13 22:01:15 +02:00
Dimitry Andric e8d8bef961 Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12-init-17869-g8e464dd76bef, the last commit before the
upstream release/12.x branch was created.

PR:		255570
MFC after:	6 weeks
2021-06-13 21:37:19 +02:00
Jessica Clarke 48397f6c7d libllvmminimal: Add missing Support/ABIBreak.cpp
When building natively on RISC-V, linking the bootstrap clang-tblgen
fails with:

  ld: error: undefined symbol: llvm::EnableABIBreakingChecks
  >>> referenced by PrettyStackTrace.cpp
  >>>               PrettyStackTrace.o:(.sdata+0x0) in archive
  /usr/obj/usr/src/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a
  >>> referenced by Signals.cpp
  >>>               Signals.o:(.sdata+0x8) in archive
  /usr/obj/usr/src/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a
  >>> referenced by Timer.cpp
  >>>               Timer.o:(.sdata+0x28) in archive
  /usr/obj/usr/src/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a

This is likely due to Error.h's inclusion of abi-breaking.h. It's
unclear why this only affects RISC-V, but perhaps relates to its more
eager use of .sdata due to the ABI's support for linker relaxations.
Regardless, this is theoretically an issue for all architectures.

Reported by:	Dennis Clarke <dclarke@blastwave.org>
Reviewed by:	dim
Tested by:	mhorne
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D28367
2021-01-27 19:19:00 +00:00
Glen Barber f9a66922c9 fix incorrect LLD_VERSION_STRING from previous commit
Reported by:	Oliver Pinter
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-01-21 19:49:30 -05:00
Glen Barber a53ce3fc49 Bump CURRENT to 14.0
This one goes to 14.

Approved by:	re (implicit)
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-01-21 19:10:07 -05:00
Dimitry Andric 39b7445e15 Merge llvm-project llvmorg-11.0.1-0-g43ff75f2c3f (aka 11.0.1 release)
There were no functional changes after 11.0.1 rc2, so only the version
strings changed.

MFC after:      4 weeks
X-MFC-With:     r364284
2021-01-14 21:46:44 +01:00
Dimitry Andric eaeb601bd6 Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.1-rc2-0-g43ff75f2c3f (aka 11.0.1 rc2).

MFC after:	4 weeks
X-MFC-With:	r364284
2021-01-03 13:54:24 +01:00
Dimitry Andric f91b0c1c18 Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.0-0-g176249bd673 (aka 11.0.0 release).

MFC after:	4 weeks
X-MFC-With:	r364284
2020-10-12 21:35:29 +00:00
Dimitry Andric 8833aad7be Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.0-rc5-0-g60a25202a7d.

MFC after:	4 weeks
X-MFC-With:	r364284
2020-10-01 19:06:07 +00:00
Kyle Evans fe815331bb build: provide a default WARNS for all in-tree builds
The current default is provided in various Makefile.inc in some top-level
directories and covers a good portion of the tree, but doesn't cover parts
of the build a little deeper (e.g. libcasper).

Provide a default in src.sys.mk and set WARNS to it in bsd.sys.mk if that
variable is defined. This lets us relatively cleanly provide a default WARNS
no matter where you're building in the src tree without breaking things
outside of the tree.

Crunchgen has been updated as a bootstrap tool to work on this change
because it needs r365605 at a minimum to succeed. The cleanup necessary to
successfully walk over this change on WITHOUT_CLEAN builds has been added.

There is a supplemental project to this to list all of the warnings that are
encountered when the environment has WARNS=6 NO_WERROR=yes:
https://warns.kevans.dev -- this project will hopefully eventually go away
in favor of CI doing a much better job than it.

Reviewed by:	emaste, brooks, ngie (all earlier version)
Reviewed by:	emaste, arichardson (depend-cleanup.sh change)
Differential Revision:	https://reviews.freebsd.org/D26455
2020-09-18 17:17:46 +00:00
Dimitry Andric 16d6b3b3da Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.0-rc2-91-g6e042866c30.

MFC after:	6 weeks
X-MFC-With:	r364284
2020-09-16 16:58:29 +00:00
Dimitry Andric a2a9ef4beb Add a few more files to libllvm, which are required when doing sanitized
builds, for example with -fsanitize=undefined.

MFC after:	6 weeks
X-MFC-With:	r364284
2020-09-03 18:27:13 +00:00
Dimitry Andric 75b4d546cd Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.0-rc2-0-g414f32a9e86.

MFC after:	6 weeks
X-MFC-With:	r364284
2020-08-24 17:43:23 +00:00
Dimitry Andric 1c1ab42925 Add a missed source file for LLVM's BPF target. This target is not
enabled by default, so I forgot about it, apologies for the breakage.

Reported by:	hrs
MFC after:	6 weeks
X-MFC-With:	r364284
2020-08-22 15:31:56 +00:00
Dimitry Andric 7eee172052 Fix the mips64 world build after r364284.
Linking the full version of clang 11 results in errors similar to:

lld: error: /usr/src/contrib/llvm-project/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:736:(.text._ZN5clang4ento22CreateAnalysisConsumerERNS_16CompilerInstanceE+0xE0): relocation R_MIPS_CALL16 out of range: 48920 is not in [-32768, 32767]; references operator new(unsigned long)

Add -mxgot to the compilation flags for llvm libraries to work around
this error. This may be too big of a hammer, but it can always be
refined later.

MFC after:	6 weeks
2020-08-19 17:05:30 +00:00
Dimitry Andric 1106035d5b Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.0-rc1-47-gff47911ddfc.
2020-08-15 12:29:55 +00:00
Dimitry Andric 9a282b3eb9 Re-add generated arm_neon.h header, which was accidentally dropped while
refactoring lib/clang/headers/Makefile in r363984.
2020-08-07 18:12:37 +00:00
Dimitry Andric 20885331a9 Put clang/lib/Tooling/Core/Replacement.cpp under SRCS_MIN, since it is
required by both the static analyzer (MK_CLANG_FULL) and clang-format
(MK_CLANG_FORMAT). We could also invent yet another SRCS variant, but
that seems a bit overkill.
2020-08-06 20:55:18 +00:00
Dimitry Andric 48aaf27bca Update Makefiles under lib/clang and usr.bin/clang for 11.0.0 builds,
and also bump the version in the mtree files.
2020-08-06 19:30:00 +00:00
Dimitry Andric 0bbb5849a3 Regenerate lib/clang/liblldb/LLDBWrapLua.cpp with swig 4.0.2. 2020-08-06 19:28:00 +00:00
Dimitry Andric 5f24ef21be Update generated llvm-project related version headers, config.h files
and add a newly generated lldb Plugins.def file too.
2020-08-06 19:27:03 +00:00
Dimitry Andric 716df522b8 Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
10.0.1 final (aka llvmorg-10.0.1-0-gef32c611aa2).

There were no changes since rc2, except in the upstream regression
tests, which we do not ship.

Relnotes:	yes
MFC after:	immediately (no material changes except tag)
2020-07-21 17:34:05 +00:00
Dimitry Andric 62cfcf62f6 Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.1-rc2-0-g77d76b71d7d.

Also add a few more llvm utilities under WITH_CLANG_EXTRAS:

* llvm-dwp, a utility for merging DWARF 5 Split DWARF .dwo files into
  .dwp (DWARF package files)
* llvm-size, a size(1) replacement
* llvm-strings, a strings(1) replacement

MFC after:	3 weeks
2020-06-28 07:43:43 +00:00
Dimitry Andric 0946e70a3b Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.0-129-gd24d5c8e308. Getting closer to 10.0.1-rc2.

MFC after:	3 weeks
2020-06-25 08:15:10 +00:00
Conrad Meyer 0a9ab9f549 Add WITH_CLANG_FORMAT option
clang-format is enabled conditional on either WITH_CLANG_EXTRAS or
WITH_CLANG_FORMAT.  Some sources in libclang are build conditional on
either rule, and obviously the clang-format binary itself depends on the
rule.

clang-format could still use a manual page.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D25427
2020-06-24 17:03:42 +00:00
Dimitry Andric e837bb5cfb Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.0-97-g6f71678ecd2 (not quite 10.0.1 rc2, as more fixes are
still pending).

MFC after:	3 weeks
2020-06-20 20:06:52 +00:00
Dimitry Andric d65cd7a57b Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.1-rc1-0-gf79cd71e145 (aka 10.0.1 rc1).

MFC after:	3 weeks
2020-05-23 10:32:18 +00:00
Kyle Evans 147d7b567f llvm: add a build knob for enabling assertions
For head/, this will remain eternally default-on to maintain the status quo.
For stable/ branches, it should be flipped to default-off to maintain the
status quo.

There's value in being able to flip it one way or the other easily on head
or stable branches, whether you want to gain some performance back on head/
(for machines there's little chance you'll actually hit an assertion) or
potentially diagnose a problem with the version of llvm on an older branch.

Currently, stable branches get the CFLAGS+= -ndebug line uncommented; going
forward, they will instead have the default of LLVM_ASSERTIONS flipped.

Reviewed by:	dim, emaste, re (gjb)
MFC after:	1 week
MFC note:	flip the default of LLVM_ASSERTIONS
Differential Revision:	https://reviews.freebsd.org/D24264
2020-04-06 01:27:17 +00:00
Ed Maste 652a974885 lldb: build and enable lua script bindings
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24266
2020-04-03 16:54:13 +00:00
Ed Maste 31c5c437cc lldb: commit generated LLDBWrapLua.cpp 2020-04-03 15:55:58 +00:00
Ed Maste f0d060f91b lldb: add rule to generate LLDBWrapLua.cpp
Building lldb's lua/python bindings requires swig, but we do not want to
include it in the FreeBSD base system (as a build tool) because it has
non-trivial dependencies.  As a workaround, add a make rule to generate
LLDBWrapLua.cpp, and we will commit the generated file.

Requires the swig30 package.

Reviewed by:	brooks
Discussed with:	dim
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24265
2020-04-03 15:52:44 +00:00
Dimitry Andric aec4c088fd Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.0-0-gd32170dbd5b (aka 10.0.0 release).

PR:		244251
MFC after:	6 weeks
X-MFC-With:	358851
2020-03-26 17:46:32 +00:00
Warner Losh 3b7fd87cbf Remove sparc support from clang build infrastructure. Any remaining sparc files
will be mopped up in future imports.

Differential Revision: https://reviews.freebsd.org/D24128
2020-03-20 15:07:15 +00:00
Dimitry Andric cd675bb60e Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.0-rc4-5-g52c365aa9ca.  The actual release should follow Real
Soon Now.

PR:             244251
MFC after:      6 weeks
2020-03-18 18:26:53 +00:00
Dimitry Andric 4d4aa25694 Move another file in libllvm from sources required for world, to sources
required for bootstrap, as the PowerPC builds need this.

Reported by:	bdragon
PR:		244251
MFC after:	6 weeks
X-MFC-With:	358851
2020-03-10 20:25:36 +00:00
Dimitry Andric 0f1174c5e1 Add one additional file to libllvmminimal, to help the ppc64 bootstrap.
Reported by:	bdragon
PR:		244251
MFC after:	6 weeks
X-MFC-With:	358851
2020-03-10 20:01:52 +00:00
Dimitry Andric da759cfa32 Remove -mlong-calls vhen building arm libraries and llvm.
Clang from 9.0.0 onwards already has the necessary relocation range
extenders, so this workaround is no longer needed (it produces longer
and slower code). Tested on real hardware, and in cross-compile
environment.

Submitted by:	mmel
2020-03-10 06:49:43 +00:00
Dimitry Andric 8c27c5541e Merge ^/vendor/llvm-project/release-10.x up to its last change (upstream
commit llvmorg-10.0.0-rc3-1-gc290cb61fdc), and bump versions.
2020-03-05 18:11:47 +00:00
Dimitry Andric 4739579419 Merge ^/vendor/llvm-project/release-10.x up to its last change (upstream
commit llvmorg-10.0.0-rc2-70-ge5cb70267e7), and bump versions.
2020-02-27 19:04:39 +00:00
Dimitry Andric c0ac260c74 Instead of using just the long upstream commit hash for LLVM component
versions, use "git describe --tags --long" output, which is more
descriptive.  E.g., "90c78073f73eac58f4f8b4772a896dc8aac023bc" becomes
"llvmorg-10.0.0-rc2-0-g90c78073f73".
2020-02-24 19:18:50 +00:00
Dimitry Andric 054f98174b Work around riscv buildworld failure where it cannot link the final
clang binary, with:

ld: error: undefined symbol: llvm::EnableABIBreakingChecks
>>> referenced by PlistDiagnostics.cpp
>>>               PlistDiagnostics.o:(.sdata+0x0) in archive /usr/obj/usr/src/riscv.riscv64/lib/clang/libclang/libclang.a
[... many more like this ...]
2020-02-17 18:51:52 +00:00
Dimitry Andric 13138422bc Merge ^/vendor/llvm-project/release-10.x up to its last change (upstream
commit llvmorg-10.0.0-rc2-0-g90c78073f73), bump versions, and update
build glue.
2020-02-15 14:58:40 +00:00
Dimitry Andric f46f1d2836 Update build glue for lldb (MK_LLDB=yes). Also update lldb's generated
Config.h, disable a few more parts in the code we don't use, and add a
pre-generated man page.
2020-01-27 16:52:44 +00:00
Dimitry Andric b1ae91026f Update build glue for extra clang/llvm tools (MK_CLANG_EXTRAS=yes). 2020-01-26 20:57:29 +00:00
Dimitry Andric d311d024d0 Update build glue for a world stage, e.g. when not only clang, but also
llvm-ar, llvm-nm, llvm-objdump and llvm-symbolizer are built.
2020-01-26 18:57:12 +00:00
Dimitry Andric c357f7d2a2 Update build glue for a full build (MK_CLANG_FULL=yes) of the clang
executable.
2020-01-26 17:22:05 +00:00
Dimitry Andric 9771cac291 Update build glue for a minimal build of the clang executable. 2020-01-26 00:21:30 +00:00
Dimitry Andric 38b6f45657 Adjust libllvmminimal and tblgen Makefiles so all the tblgen executables
build.
2020-01-25 16:46:39 +00:00
Dimitry Andric 9814c8e0d3 From 10.0.0 onwards, llvm requires C++14 to build. 2020-01-25 16:45:34 +00:00
Dimitry Andric 0b37c15904 * Bump version numbers to 10.0.0
* Update UPDATING
* Update (Optional)ObsoleteFiles.inc
* Update VCS(Revision|Version) files
* Update generated config headers
* Update clang internal headers Makefile
2020-01-25 16:23:49 +00:00
Brandon Bergren 6f5bc35d94 [PowerPC] Fix libllvmminimal build when building from powerpc64 ELFv1.
When bootstrapping on powerpc64 ELFv1, it is necessary to use binutils
ld.bfd from ports for the bootstrap, as this is the only modern linker for
ELFv1 host tools.

As binutils ld.bfd is rather strict in its handling of undefined symbols,
it is necessary to pull in Support/Atomic.cpp to avoid an undefined symbol.

Reviewed by:	dim, emaste
Sponsored by:	Tag1 Consulting, Inc.
Differential Revision:	https://reviews.freebsd.org/D23072
2020-01-07 22:45:02 +00:00
Dimitry Andric c14a5a8800 Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
9.0.1 final release c1a0a213378a458fbea1a5c77b315c7dce08fd05.

Release notes for llvm, clang, lld and libc++ 9.0.1 will become
available here:

https://releases.llvm.org/9.0.1/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/clang/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/lld/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/projects/libcxx/docs/ReleaseNotes.html

PR:		240629
MFC after:	1 month
2019-12-22 11:50:44 +00:00
Dimitry Andric 0b57cec536 Move all sources from the llvm project into contrib/llvm-project.
This uses the new layout of the upstream repository, which was recently
migrated to GitHub, and converted into a "monorepo".  That is, most of
the earlier separate sub-projects with their own branches and tags were
consolidated into one top-level directory, and are now branched and
tagged together.

Updating the vendor area to match this layout is next.
2019-12-20 19:53:05 +00:00
Dimitry Andric a9365f4a17 Add a few missed source files to libllvm, for the MK_LLVM_TARGET_BPF=yes
case.  Otherwise, linking of clang and other llvm based executables
would complain about missing symbols.

Reported by:	rstone
MFC after:	1 month
X-MFC-With:	r353358
2019-12-10 22:10:25 +00:00