3202 Commits

Author SHA1 Message Date
Nico Weber
e5371e80a1 [gn build] Reformat all build files
Ran:

    git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format
2022-12-07 15:14:52 -05:00
LLVM GN Syncbot
e7569cb955 [gn build] Port d184958bad5c 2022-12-07 16:50:20 +00:00
Nico Weber
73b1f27137 [gn build] Port c9b325088d14 2022-12-07 08:27:50 -05:00
LLVM GN Syncbot
88594d1f85 [gn build] Port cb5b25c58783 2022-12-07 12:44:01 +00:00
Nico Weber
08a9b22df1 [gn build] port d62480c1995b (LoongArchTests) 2022-12-07 07:43:19 -05:00
Nico Weber
b58028831e [gn build] Add LoongArch target
Differential Revision: https://reviews.llvm.org/D139256
2022-12-06 16:11:52 -05:00
LLVM GN Syncbot
d216759f71 [gn build] Port d09d834bb980 2022-12-06 13:50:56 +00:00
LLVM GN Syncbot
cb74446acc [gn build] Port bc0617795f8b 2022-12-06 13:50:55 +00:00
LLVM GN Syncbot
f6f9caa580 [gn build] Port 200007ec85f8 2022-12-05 23:13:55 +00:00
Nico Weber
9ddbcb0182 [gn build] Fix build of merge-fdata in a clean build dir
merge-fdata doesn't depend on any libraries except Support,
but it includes headers that require Attributes.inc to exist.
Add a dep that ensures that it does exist.
Corresponds to the intrinsics_gen dep in CMake.
2022-12-05 15:44:30 -05:00
LLVM GN Syncbot
51e33ac9c7 [gn build] Port 5ecd36329508 2022-12-05 18:56:16 +00:00
LLVM GN Syncbot
d8ab7cf2d3 [gn build] Port dbe8c2c316c4 2022-12-05 14:27:33 +00:00
LLVM GN Syncbot
5fa43db46e [gn build] Port 122efef8ee9b 2022-12-05 00:11:52 +00:00
LLVM GN Syncbot
7724ac6163 [gn build] Port 17db0de330f9 2022-12-03 20:23:49 +00:00
LLVM GN Syncbot
e1da0e9ce0 [gn build] Port 89f36dd8f32f 2022-12-01 11:19:48 +00:00
LLVM GN Syncbot
9b8eb0cf05 [gn build] Port 65d6d67fc9a9 2022-12-01 11:19:48 +00:00
LLVM GN Syncbot
0926035ed5 [gn build] Port b95646fe7058 2022-11-30 22:46:01 +00:00
LLVM GN Syncbot
b802b537f8 [gn build] Port 77b220524541 2022-11-30 14:41:02 +00:00
LLVM GN Syncbot
9fa65ba155 [gn build] Port d3c851d3fc8b 2022-11-30 13:51:23 +00:00
LLVM GN Syncbot
1114d1a976 [gn build] Port 185d4964a158 2022-11-29 20:47:01 +00:00
Arthur Eubanks
16312c5d7a [MCJIT][test] Use new pass manager API 2022-11-28 12:23:42 -08:00
LLVM GN Syncbot
eddcc01f35 [gn build] Port ed34590c1acb 2022-11-25 13:20:54 +00:00
Nico Weber
4ffc6f3b83 [bolt] Stop setting config.llvm_plugin_ext in lit.site.cfg.py.in
config.llvm_plugin_ext is used by lit to set the %pluginext
substitution. bolt's tests don't use %pluginext, so they don't
need to set config.llvm_plugin_ext.

Differential Revision: https://reviews.llvm.org/D138325
2022-11-22 20:29:14 -05:00
Sami Tolvanen
cacd3e73d7 Add generic KCFI operand bundle lowering
The KCFI sanitizer emits "kcfi" operand bundles to indirect
call instructions, which the LLVM back-end lowers into an
architecture-specific type check with a known machine instruction
sequence. Currently, KCFI operand bundle lowering is supported only
on 64-bit X86 and AArch64 architectures.

As a lightweight forward-edge CFI implementation that doesn't
require LTO is also useful for non-Linux low-level targets on
other machine architectures, add a generic KCFI operand bundle
lowering pass that's only used when back-end lowering support is not
available and allows -fsanitize=kcfi to be enabled in Clang on all
architectures.

This relands commit eb2a57ebc7aaad551af30462097a9e06c96db925 with
fixes.

Reviewed By: nickdesaulniers, MaskRay

Differential Revision: https://reviews.llvm.org/D135411
2022-11-22 23:01:18 +00:00
Nico Weber
edbfb829ba [gn build] Add missing dep from check-bolt on llvm-bat-dump 2022-11-21 20:48:46 -05:00
Nico Weber
6bb781fa9a [gn build] Add build files for //bolt
Adds build files for libraries, tools, and tests -- everything except
the runtime.

Doesn't hook up bolt in the main BUILD.gn file yet -- I want to verify
that it builds on Linux, macOS, Windows before doing that. (I've only
checked on macOS so far.)

`ninja check-bolt` passes on macOS with this.
(I locally bumped the deployment target to macOS 10.12 for that. bolt/ uses
std::mutex quite a bit, which requires 10.12.)

Differential Revision: https://reviews.llvm.org/D138355
2022-11-21 19:45:54 -05:00
Nico Weber
281a5c7ef1 [llvm,polly,clang] Stop setting config.enable_shared in most places
Clang's lit.cfg.py reads this to add an "enable-shared" feature that
three of clang's lit tests use. Nothing else reads enable_shared, so
remove it from most lit.site.cfg.py.in files.

Differential Revision: https://reviews.llvm.org/D138301
2022-11-21 08:54:14 -05:00
Nico Weber
3b48a97b19 [gn build] port af8c49dc1ec4 2022-11-20 12:02:33 -05:00
Nico Weber
7c188afde1 [gn build] Reformat all build files
Ran:

    git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format
2022-11-19 11:54:55 -05:00
Nico Weber
63f79fe2eb [gn build] port 7059a6c32cfa 2022-11-18 06:48:51 -05:00
Fangrui Song
fc91c70593 Revert D135411 "Add generic KCFI operand bundle lowering"
This reverts commit eb2a57ebc7aaad551af30462097a9e06c96db925.

llvm/include/llvm/Transforms/Instrumentation/KCFI.h including
llvm/CodeGen is a layering violation. We should use an approach where
Instrumementation/ doesn't need to include CodeGen/.
Sorry for not spotting this in the review.
2022-11-17 22:45:30 +00:00
Sami Tolvanen
eb2a57ebc7 Add generic KCFI operand bundle lowering
The KCFI sanitizer emits "kcfi" operand bundles to indirect
call instructions, which the LLVM back-end lowers into an
architecture-specific type check with a known machine instruction
sequence. Currently, KCFI operand bundle lowering is supported only
on 64-bit X86 and AArch64 architectures.

As a lightweight forward-edge CFI implementation that doesn't
require LTO is also useful for non-Linux low-level targets on
other machine architectures, add a generic KCFI operand bundle
lowering pass that's only used when back-end lowering support is not
available and allows -fsanitize=kcfi to be enabled in Clang on all
architectures.

Reviewed By: nickdesaulniers, MaskRay

Differential Revision: https://reviews.llvm.org/D135411
2022-11-17 21:55:00 +00:00
LLVM GN Syncbot
ed4943d560 [gn build] Port 332c4af35db9 2022-11-16 15:19:13 +00:00
LLVM GN Syncbot
e611d41143 [gn build] Port 617277e7cbda 2022-11-16 06:08:50 +00:00
Woody Lin
409eaff5dd [AArch64InstPrinter] Print TargetAddress as an uint64_t
Outputs readable addresses by printed 'TargetAddress' as an uint64_t
value.

`bl     -0x37efd56628` => `bl     0xffffffc8102a99d8`

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D137260
2022-11-16 13:34:22 +08:00
LLVM GN Syncbot
8d0b2f09a2 [gn build] Port a16bd4f9f25e 2022-11-15 22:46:53 +00:00
LLVM GN Syncbot
b7d9310128 [gn build] Port 4be39288f506 2022-11-15 22:46:52 +00:00
Nico Weber
20b0e0a71a [gn build] Stop defining GTEST_LANG_CXX11, pass /Zc:__cplusplus with msvc
Ports:
* https://reviews.llvm.org/D84023
* https://reviews.llvm.org/rG4f5ccc72f6a6e
  (but see https://reviews.llvm.org/rG4901199f5b84b223)

No intended behavior change.
2022-11-15 10:56:53 -05:00
Nico Weber
1b829c3d3a [gn build] Make libcxx_enable_debug_mode work better, maybe
Refer to _LIBCPP_ENABLE_DEBUG_MODE instead of the old _LIBCPP_DEBUG
in a comment, and write that to __config_site correctly too.

See 13ea1343231fa4 and the comments in https://crbug.com/1358646.

Also change the default of libcxx_enable_debug_mode to false for now.
Since we used to not write _LIBCPP_ENABLE_DEBUG_MODE, the previous
default of true had no effect (except for compiling debug.cpp and
legacy_debug_handler.cpp, which we now no longer build by default).
So this (mostly) preserves previous behavior.
2022-11-15 10:45:41 -05:00
LLVM GN Syncbot
a4ae029b08 [gn build] Port 1ebfe9b264bb 2022-11-15 09:07:55 +00:00
LLVM GN Syncbot
c83c69dd0d [gn build] Port d52e2839f3b1 2022-11-14 14:05:19 +00:00
LLVM GN Syncbot
7e4cfcdb6f [gn build] Port dd46a08008f7 2022-11-14 10:12:18 +00:00
Nico Weber
6e8f8b1964 [gn build] Extract gen_arch_intrinsics() template to remove some duplication
No behavior change.

Differential Revision: https://reviews.llvm.org/D137784
2022-11-13 09:38:53 -05:00
Nico Weber
369237abc4 [gn build] port e1b88c8a09be (clang resource dir uses only major version) 2022-11-10 10:13:59 -05:00
LLVM GN Syncbot
baf4930fb0 [gn build] Port 85f08c4197ae 2022-11-10 13:53:38 +00:00
LLVM GN Syncbot
f9256fca66 [gn build] Port 135a9272a4c9 2022-11-10 13:53:37 +00:00
Nico Weber
c3c94a885c [gn build] port b60f801607543 2022-11-10 08:53:12 -05:00
Nico Weber
ce2474ff60 [gn build] port a11cd0d94ed3 (gtest llvm/utils/unittest -> third-party/unittest) 2022-11-09 19:58:28 -05:00
LLVM GN Syncbot
ec9aae9784 [gn build] Port 428ac8f3a0f9 2022-11-07 23:22:09 +00:00
LLVM GN Syncbot
23831f0efe [gn build] Port 59ef4b3686e4 2022-11-05 20:26:22 +00:00