Commit Graph

11617 Commits

Author SHA1 Message Date
Nico Weber d3a1dbc490 [gn build] port f7a33090a9 2022-08-18 15:48:22 -04:00
John Ericson f7a33090a9 [cmake] Use `CMAKE_INSTALL_LIBDIR` too
We held off on this before as `LLVM_LIBDIR_SUFFIX` conflicted with it.
Now we return this.

`LLVM_LIBDIR_SUFFIX` is kept as a deprecated way to set
`CMAKE_INSTALL_LIBDIR`. The other `*_LIBDIR_SUFFIX` are just removed
entirely.

I imagine this is too potentially-breaking to make LLVM 15. That's fine.
I have a more minimal version of this in the disto (NixOS) patches for
LLVM 15 (like previous versions). This more expansive version I will
test harder after the release is cut.

Reviewed By: sebastian-ne, ldionne, #libc, #libc_abi

Differential Revision: https://reviews.llvm.org/D130586
2022-08-18 15:33:35 -04:00
Vitaly Buka fae656b2dd [test] Add 'hwasan' feature and disable a test 2022-08-17 23:50:35 -07:00
Vitaly Buka 3f5f2905c4 [test] Propagate HWASAN_OPTIONS 2022-08-17 18:59:49 -07:00
Nico Weber b098407280 [gn build] build libclang_rt.ubsan_osx_dynamic.dylib on mac
For now, this only builds the dylib, so using `-fsanitize=undefined`
with `-static-libsan` or `fsanitize-minimal-runtime` still won't
work -- but the common case does work.

Differential Revision: https://reviews.llvm.org/D131969
2022-08-17 15:35:41 -04:00
Alexander Shaposhnikov d68ba43ad2 [Intrinsics] Add initial support for NonNull attribute
Add initial support for NonNull attribute.
(https://github.com/llvm/llvm-project/issues/57113)

Test plan:

verify that for
__thread int x;
int main() {

int* y = &x;
return *y;
}
(with this patch) clang -O -fsanitize=null -S -emit-llvm -o -
doesn't emit a null-pointer check

Differential revision: https://reviews.llvm.org/D131872
2022-08-16 21:28:23 +00:00
Nikita Popov 8f555a52e0 [cmake] Fix tablegen exports
This fixes some fallout from D131282. Currently, add_tablegen() will add the tablegen target to LLVM_EXPORTS and associates the install with LLVMExports. For non-standalone builds, this means that you end up with mlir-tblgen and clang-tblgen in LLVMExports.

However, these projects should instead be using MLIR_EXPORTS/MLIRTargets and CLANG_EXPORTS/ClangTargets. To fix this, add an extra EXPORT option and make use of get_target_export_arg() to create the correct export argument.

Reviewed By: ashay-github

Differential Revision: https://reviews.llvm.org/D131565
2022-08-16 14:17:23 +02:00
LLVM GN Syncbot f09f4b73fc [gn build] Port 5f300397c6 2022-08-16 01:39:36 +00:00
LLVM GN Syncbot a74b028f58 [gn build] Port 2f1fa6242a 2022-08-15 22:49:18 +00:00
Nico Weber 73f0ca806e [gn build] Try to unbreak mac after f56e486fdc 2022-08-15 18:22:08 -04:00
Rafael Auler e99490512e [test-release] Add option to build BOLT
Add a flag to enable BOLT. Should be used in x86-64 and
AArch64 linux builds only, since BOLT doesn't really support other
targets and is mostly tested on these two systems as hosts.

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D131703
2022-08-15 14:03:30 -07:00
Arthur Eubanks 6d17254df4 [gn build] Add ubsan libraries
clang -fsanitize=undefined works with this.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D131916
2022-08-15 13:55:36 -07:00
Kazu Hirata 6d9cd9199a Use llvm::all_of (NFC) 2022-08-14 16:25:36 -07:00
LLVM GN Syncbot e83408c6ee [gn build] Port 1cf81274f4 2022-08-14 17:56:25 +00:00
LLVM GN Syncbot 6b6e9d2268 [gn build] Port 7ae66e5e95 2022-08-14 08:35:03 +00:00
Nico Weber 6bb243bbdb [gn build] port 7260cdd2e1 more 2022-08-13 08:41:58 -04:00
Arthur Eubanks bd1f80f54e [llvm-reduce] Add delta pass to run IR passes
The exact IR passes run is customizable via `-ir-passes`.

Reviewed By: regehr

Differential Revision: https://reviews.llvm.org/D123749
2022-08-12 10:38:19 -07:00
Nico Weber 8b3c274efb [gn build] port 3e119c0efd (split-file move to utils/) 2022-08-12 08:20:08 -04:00
Markus Böck 3e119c0efd [llvm][CMake] Move `split-file` from tools to utils
It fittingly already makes use of add_llvm_utility during target creation and is usually only used in conjunction with other (test) related utilities such as FileCheck and not, which are already in utils.

Differential Revision: https://reviews.llvm.org/D131713
2022-08-12 14:16:48 +02:00
Nico Weber 3d53ecfc19 [gn build] port 74384c7fce 2022-08-12 08:10:16 -04:00
Nico Weber d299c033e6 [gn build] Make it possible to do PGO-optimized builds
This is fairly manual for now.

Differential Revision: https://reviews.llvm.org/D131710
2022-08-11 18:39:46 -04:00
LLVM GN Syncbot 88a521a048 [gn build] Port 9ae5896d96 2022-08-11 08:37:36 +00:00
LLVM GN Syncbot e04f8c81d5 [gn build] Port 7bece0f03b 2022-08-11 06:28:14 +00:00
LLVM GN Syncbot a5656496f0 [gn build] Port 7260cdd2e1 2022-08-11 06:28:12 +00:00
Tobias Hieta 70165c55dc
[release] Use threaded compression with xz
Use xz -T0 to use your threads

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D131470
2022-08-10 10:01:47 +02:00
Alex Richardson 9a2b14afa0 [ARM] Emit local aliases (.Lfoo$local) for functions
ARMAsmPrinter::emitFunctionEntryLabel() was not calling the base class
function so the $local alias was not being emitted. This should not have
any function effect right now since ARM does not generate different code
for the $local symbols, but it could be improved in the future.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D131392
2022-08-09 09:53:47 +00:00
Fangrui Song de9d80c1c5 [llvm] LLVM_FALLTHROUGH => [[fallthrough]]. NFC
With C++17 there is no Clang pedantic warning or MSVC C5051.
2022-08-08 11:24:15 -07:00
Nico Weber e4161e88f3 [gn build] port 59bb9e37c6 2022-08-08 14:16:30 -04:00
Simon Pilgrim 1f30ebc898 [llvm-tblgen] Fix copy+paste typo in CodeGenSchedModels::collectLoadStoreQueueInfo
Confirmed with @andreadb - repeated PM.LoadQueue->getLoc() should have been PM.StoreQueue->getLoc()

Found by coverity
2022-08-08 17:51:45 +01:00
Nico Weber cf7c8bd74e [gn build] (manually) port ace6e172bd 2022-08-07 22:02:51 -04:00
Ashay Rane d1bb3016dd
[mlir] fix `add_tablegen()` macro to allow installing mlir-pdll
Prior to this patch, the `add_tablegen()` macro in
llvm/cmake/modules/TableGen.cmake added the install rule only if
`project` matched `LLVM` or `MLIR`.  This patch adds an optional
`DESTINATION` argument, which, if non-empty, decides whether (and where)
to install the tablegen tool, thus eliminating the need for
project-specific overrides.  This patch also updates all other
invocations of the `add_tablegen()` macro.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D131282
2022-08-07 15:48:38 -07:00
Kazu Hirata a2d4501718 [llvm] Fix comment typos (NFC) 2022-08-07 00:16:14 -07:00
Nico Weber f489297501 [gn build] fix 547c551925 2022-08-06 08:36:01 -04:00
Nico Weber 547c551925 [gn build] Try to fix build on linux after std=c++17 switch
glibc annotates `process_vm_readv` with `__THROW`.
lldb/include/lldb/Host/linux/Uio.h and
lldb/source/Host/linux/LibcGlue.cpp don't.

Having a mismatch causes an error with c++17:

    ../../lldb/source/Host/linux/LibcGlue.cpp:18:9:
        error: 'process_vm_readv' is missing exception specification 'throw()'
    ssize_t process_vm_readv(::pid_t pid, const struct iovec *local_iov,
            ^
    ../../lldb/include/lldb/Host/linux/Uio.h:18:9:
        note: previous declaration is here
    ssize_t process_vm_readv(::pid_t pid, const struct iovec *local_iov,
            ^

The diagnostic is a bit misleading, since the previous declaration
in the sysroot (in usr/include/x76_64-linux-gnu/bits/uio-ext.h) is
what has the `__THROW`.

In the cmake build, cmake sets `HAVE_PROCESS_VM_READV` correctly based
on header probing.

In the GN build, just set it to 1 unconditionally on linux. If that
turns out to not be good enough everywhere, we'll have to add a GN arg
for this.

(I'm also setting it to 1 on Android. I'm not sure if that's correct --
but we don't build lldb for Android anyways.)
2022-08-06 08:34:24 -04:00
Nico Weber c59c8a515f [gn build] port b1356504e6 better (c++17) 2022-08-06 07:54:43 -04:00
Nico Weber 51a91d6c5d [gn build] port b1356504e6 (c++17) 2022-08-06 07:51:06 -04:00
Nico Weber 35cc173846 [gn build] port 976f37050d more
Follow-up to commit 51d84737b5.
2022-08-04 15:33:35 -04:00
LLVM GN Syncbot ffb8d4a958 [gn build] Port 4038c859e5 2022-08-04 18:26:38 +00:00
LLVM GN Syncbot 2d47e0fd27 [gn build] Port 2138c90645 2022-08-04 14:49:27 +00:00
LLVM GN Syncbot 2b0d5e9e79 [gn build] Port a203acb9dd 2022-08-04 09:46:03 +00:00
LLVM GN Syncbot ca8de2d242 [gn build] Port 0cb9746a7d 2022-08-03 23:20:59 +00:00
LLVM GN Syncbot 670122b92b [gn build] Port 36c746ca2d 2022-08-03 23:08:51 +00:00
Nico Weber 96faef0f6e [gn build] Set LLVM_TOOLS_INSTALL_DIR to bin for llvm-config
Matches the CMake build, and might help with a flaky test on Windows.
See https://bugs.chromium.org/p/chromium/issues/detail?id=1348730#c2
for details.
2022-08-03 09:51:14 -04:00
LLVM GN Syncbot 7e8bf0a320 [gn build] Port 68264b6494 2022-08-03 05:46:25 +00:00
LLVM GN Syncbot 75f6a10d52 [gn build] Port 6bdb642234 2022-08-03 05:36:28 +00:00
LLVM GN Syncbot 3ddc280c03 [gn build] Port f9b4ea0ce9 2022-08-02 23:57:33 +00:00
Tom Stellard 560efad701 workflows: Release Workflow - Avoid selecting random reviewers when no phab review
If you pass a NULL reivew ID to the differential.revision.search API,
it returns all revisions and we were just taking the first one and
assuming it was associated with the commit in the PR.

We need to exit early if we can't find a Phabricator review associated
with a commit.
2022-08-02 14:07:22 -07:00
LLVM GN Syncbot 577840bc7a [gn build] Port 95a92995d4 2022-08-02 21:01:56 +00:00
Kai Nacke d3c4609855 [GIsel] Add missing space between type and name in GICombinerHelperArg
When using AdditionalArguments in a GICombinerHelper, the generator
does not put a space between the type and the name.

E.g.

let AdditionalArguments = [GICombinerHelperArg<"bool", "IsSomething">];

ends up as

boolIsSomething) const;

in the generated file. This change adds a space between the type and the name.

Reviewed By: aemerson

Differential Revision: https://reviews.llvm.org/D130823
2022-08-02 13:35:25 -04:00
Tom Stellard e0a3964aff workflows: Fix error when searching for backport reviewers 2022-08-02 01:09:02 -07:00