Commit Graph

239 Commits

Author SHA1 Message Date
Peter Collingbourne b1985dd74d gn build: Fix formatting in gen_version_script.gni. 2022-09-30 13:47:08 -07:00
Peter Collingbourne fa690c2212 gn build: Speculative Windows build fix. 2022-09-30 13:46:52 -07:00
Peter Collingbourne 25eabbc802 gn build: Re-add preinit file to static ubsan library. 2022-09-30 13:36:12 -07:00
Peter Collingbourne bae0d30491 gn build: Move bfloat16 source files to x86-specific block.
bfloat16 is currently only supported by default on x86.

Differential Revision: https://reviews.llvm.org/D134937
2022-09-30 12:33:23 -07:00
Peter Collingbourne 0f9f95fe93 gn build: Add support for building the standalone ubsan runtime as a shared library on non-Mac.
Differential Revision: https://reviews.llvm.org/D127556
2022-09-30 12:33:23 -07:00
Nico Weber 0a40d7c27a [gn build] port a85e4aa37d 2022-09-12 21:02:02 -04:00
Alexey Baturo f8b71a307e [RISC-V][HWASAN] Add tag mismatch routines for HWASAN required for RISC-V
Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D131341
2022-08-28 19:42:08 +03:00
Nico Weber 4a2c8dcc17 [gn build] port e78208f082 2022-08-22 21:46:36 -04: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
Nico Weber 73f0ca806e [gn build] Try to unbreak mac after f56e486fdc 2022-08-15 18:22:08 -04: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
Nico Weber cf7c8bd74e [gn build] (manually) port ace6e172bd 2022-08-07 22:02:51 -04:00
Nico Weber c2bb2e5973 [gn build] (manually) port 7cca33b40f
Not really needed for anything as far as I can tell (?),
more for completeness.
2022-06-17 11:51:10 -04:00
Nico Weber 0d16d9bff8 [gn build] (semi-manually) port 232bd331cb 2022-06-17 08:35:51 -04:00
Nico Weber 794d080e2e [gn build] (semi-automatically) port fb34d531af 2022-06-15 07:42:40 -04:00
Nico Weber 650c0b6e39 [gn build] (semi-automatically) port 8bc0bb9564 2022-06-15 07:42:19 -04:00
Peter Collingbourne 0e3c8bdd4b Revert "gn build: Add support for building the standalone ubsan runtime."
As well as followup commits.
Build is still failing on mac. I'll debug it locally.
http://45.33.8.238/macm1/37269/step_4.txt

This reverts commit ee21411107.
This reverts commit 6ef9af6386.
This reverts commit b49bd8e07f.
2022-06-13 14:06:14 -07:00
Peter Collingbourne ee21411107 gn build: Don't define an action for gen_version_script on mac/win.
Nothing should depend on the action on those platforms,
as they don't use version scripts.

Should fix mac build:
http://45.33.8.238/macm1/37264/step_4.txt
2022-06-13 13:54:57 -07:00
Peter Collingbourne 6ef9af6386 gn build: Disable ubsan build on mac/win.
Build failures:
http://45.33.8.238/macm1/37263/step_4.txt
http://45.33.8.238/win/60034/step_4.txt
2022-06-13 13:45:14 -07:00
Peter Collingbourne 7316b0d54c gn build: Add support for building the AArch64 LSE builtins.
Differential Revision: https://reviews.llvm.org/D127560
2022-06-13 13:15:29 -07:00
Peter Collingbourne b49bd8e07f gn build: Add support for building the standalone ubsan runtime.
Differential Revision: https://reviews.llvm.org/D127556
2022-06-13 13:15:28 -07:00
Nico Weber 1b976f2cb2 [gn build] Reformat all build files
Ran:

    git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format
2022-05-24 12:16:55 -04:00
Nico Weber 07a83b5564 [gn build] try to (manually) port 9ef451d1fd (hwasan_symbolize)
needed by check-hwasan as of 4af9392e13
2022-05-06 09:33:33 -04:00
Nico Weber 21ab2b6ca8 [gn build] (semi-manually) port 70a66c08fc 2022-05-05 20:34:49 -04:00
Nico Weber d21289e042 [gn build] (manually) port fb7a435492 2022-05-02 07:23:10 -04:00
LLVM GN Syncbot 59308b4b79 [gn build] Port 2aa575fd7f 2022-04-08 20:26:23 +00:00
Nico Weber 26b3a1ea34 [gn build] (manually) port bf2dc4b376 2022-04-08 07:07:32 -04:00
Peter Collingbourne 02a7b1754f Reland "gn build: Fix support for building the builtins for baremetal."
Our support for building for baremetal was conditional on a default
off arg and would have failed to build if you had somehow arranged
to pass the correct --target flag; presumably nobody noticed because
nobody was turning it on. A better approach is to model baremetal
as a separate "OS" called "baremetal" and build it in the same way
as we cross-compile for other targets. That's what this patch does.
I only hooked up the arm64 target but others can be added.

Relanding after fixing Mac build breakage in D123244.

Differential Revision: https://reviews.llvm.org/D122862
2022-04-06 13:45:40 -07:00
Peter Collingbourne d384f2b253 Revert "gn build: Fix support for building the builtins for baremetal."
This reverts commit b02b9b3dac.

Broke Mac build: http://45.33.8.238/macm1/32578/step_4.txt
2022-04-06 12:16:06 -07:00
Peter Collingbourne b02b9b3dac gn build: Fix support for building the builtins for baremetal.
Our support for building for baremetal was conditional on a default
off arg and would have failed to build if you had somehow arranged
to pass the correct --target flag; presumably nobody noticed because
nobody was turning it on. A better approach is to model baremetal
as a separate "OS" called "baremetal" and build it in the same way
as we cross-compile for other targets. That's what this patch does.
I only hooked up the arm64 target but others can be added.

Differential Revision: https://reviews.llvm.org/D122862
2022-04-06 11:01:21 -07:00
Peter Waller 7f41643ef0 [gn build] Add host_cpu=arm64 & current_os=linux => aarch64-unknown-linux-gnu
I've been using this triple in development for a while without issues,
it's passing check-llvm and check-clang.

(The above is the commit message, but the build is currently broken since
D114639, I intend to submit this once it's passing again and it's accepted in
review)

Differential Revision: https://reviews.llvm.org/D119331
2022-02-14 10:49:37 +00:00
Nico Weber e017dbab8c [gn build] (manually) attempt to port 95d609b549 2022-02-03 16:53:34 -05:00
Nico Weber 936f247ade [gn build] fix mac build after 0c425b43b9 2022-01-27 20:35:17 -05:00
Arthur Eubanks 0c425b43b9 [gn build] Add support for check-asan
With these changes, check-asan passes on Linux and Windows.

There are a couple libraries we need to add support for, asan_static, asan_preinit, and the shared library version of asan proper.
Since we need to build the asan proper sources twice, once with -DASAN_DYNAMIC and once without, those sources are no longer in a source_set.
Much of the check-asan target is taken from the existing check-hwasan target.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D118307
2022-01-27 16:09:43 -08:00
Arthur Eubanks f73f367f72 [gn build] Move -fno-builtin to crt_code
crt_code seems to correspond to SANITIZER_COMMON_CFLAGS which contains -fno-builtin.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D118288
2022-01-26 18:33:35 -08:00
Arthur Eubanks 0a4bbdabe3 [gn build] Remove unnecessary include_dirs
These are already part of crt_code.
2022-01-26 15:40:54 -08:00
Arthur Eubanks 1d085f1147 [gn build] Don't pass -fuse-ld=lld to compiler-rt tests
This was done for check-hwasan, but compiler-rt/test/hwasan/lit.cfg.py
already does that.

This makes check-asan (to be submitted) fail on Windows due to using
lld-link (as opposed to MSVC link.exe) in tests. That seems like a
problem that should be fixed, but that's orthogonal to this patch.
2022-01-26 15:08:22 -08:00
Arthur Eubanks 10ce1eed47 [gn build] Remove incorrect interception dependency 2022-01-26 15:07:41 -08:00
Nico Weber dabc101ec0 [gn build] "port" 027ffb173a 2022-01-05 12:57:18 -05:00
LLVM GN Syncbot 3b4c040cca [gn build] Port 969a51ff36 2021-12-24 11:05:23 +00:00
Nico Weber a6114ff0cd [gn build] "port" 71b3bfde9c 2021-12-23 19:52:34 -05:00
Nico Weber ee4bbb50ae [gn build] (manually) port 7cd7b4d2f8 (sanitizer_symbolize_set_demangle) 2021-12-23 18:06:48 -05:00
Nico Weber 5fd328c45f [gn build] (manually) port f103ee2e9e (sanitizer_symbolize_set_inline_frames) 2021-12-23 16:40:13 -05:00
LLVM GN Syncbot 3ce4b6a599 [gn build] Port f78d49e068 2021-12-21 18:57:55 +00:00
Nico Weber f2f6d09185 [gn build] (semiautomatically) port 9b4f179bf8 2021-12-21 08:10:52 -05:00
LLVM GN Syncbot 2fefb66e53 [gn build] Port cc324af0d6 2021-12-17 18:41:48 +00:00
Nico Weber fc01f85bf3 [gn build] (semiautomatically) port 3f5f687e2e 2021-12-17 07:26:34 -05:00
Nico Weber 0e5e963b2d [gn build] Reformat all build files
Ran:

    git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format
2021-12-14 14:07:19 -05:00
Kirill Stoimenov 3bc08d8b8d [gn build] Reland 5082c330138: (semimanually) port ebc31d2. 2021-12-14 17:22:25 +00:00
LLVM GN Syncbot bc56ea7c3e [gn build] Port fff876c20e 2021-12-13 23:30:23 +00:00