Commit Graph

207 Commits

Author SHA1 Message Date
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
Nico Weber 5082c33013 [gn build] (semimanually) port ebc31d2e72 2021-12-10 10:39:28 -05:00
Nico Weber 3f3faa36ff [gn build] (manually) port f75cce0be8 2021-12-08 19:21:07 -05:00
Nico Weber d04ea509df [gn build] (manually) port f71c553a30 2021-12-08 19:10:53 -05:00
Nico Weber 8720247f60 Reland "[gn build] (manually) port 1ee32055ea (benchmark move)"
This reverts commit bbccf49922.
1ee32055ea relanded in 5dda2efde5.
2021-12-07 20:51:25 -05:00
Nico Weber 63d518f31a [tsan] Move tsan/rtl build rules into tsan/rtl/CMakeLists.txt
That way, the build rules are closer to the source files they describe.

No intended behavior change.

Differential Revision: https://reviews.llvm.org/D115155
2021-12-06 19:58:30 -05:00
Nico Weber 6c11b872c4 [gn build] (semiautomatically) port 98bb198693 2021-12-03 17:48:27 -05:00
Nico Weber ee0c75eba3 [gn build] (semimanually) port 25a7e4b9f7 2021-11-30 08:04:15 -05:00
Vitaly Buka 6bf71be9f9 [NFC][sanitizer] Move inline implementation of StackStore into cpp 2021-11-18 18:38:06 -08:00
Vitaly Buka 930ccf0191 [NFC][sanitizer] Rename persistent_allocator to stack_store 2021-11-18 18:36:58 -08:00
Vitaly Buka c26dbc4ab4 [sanitizer] Fix DenseMap for compiler-rt
Depends on D114047.

Differential Revision: https://reviews.llvm.org/D114048
2021-11-17 19:10:20 -08:00
Nico Weber bbccf49922 Revert "[gn build] (manually) port 1ee32055ea (benchmark move)"
1ee32055ea was reverted in 67de95b8c9.

This reverts commit a8e8e2d5a2
and follow-up a0dc6001df
2021-11-16 20:07:17 -05:00
Nico Weber a8e8e2d5a2 [gn build] (manually) port 1ee32055ea (benchmark move) 2021-11-16 18:33:32 -05:00
Nico Weber a144869384 [gn build] (semi-manually) port cb0e14ce6d 2021-11-12 20:09:01 -05:00
Arthur Eubanks 463ee15e33 [gn build] Fix Android compiler-rt targets
If a sysroot was specified, it would take precedence over the Android
NDK sysroot since it would appear after in the command line.

Also only build runtimes for enabled target arches. Many places have
copied this around so create and use supported_android_toolchains.

Reviewed By: pcc

Differential Revision: https://reviews.llvm.org/D113606
2021-11-11 18:41:18 -08:00
Nico Weber cf838ebfa5 [gn build] Reformat all files
Ran `git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format`.
No behavior change.
2021-11-05 10:51:04 -04:00
Nico Weber 5d64bf00ac [gn build] (manually) port d736002e90 2021-10-28 08:48:54 -04:00
Nico Weber 4976be1e95 [gn build] Make 'compiler-rt' depend on include dir
That way, the headers in llvm/utils/gn/secondary/compiler-rt/include
are copied when running `ninja compiler-rt`. (Previously, they were
only copied when running `check-hwasan` or when building the
compiler-rt/include target.)

(Since they should be copied only once, depend on the target in the
host toolchain. I think default_toolchain should work just as well,
it just needs to be a single fixed toolchain. check-hwasan depends
through host_toolchain, so let's use that here too.)

Prevents errors like

    testing/fuzzed_data_provider.h:8:10: fatal error: 'fuzzer/FuzzedDataProvider.h' file not found

when building with locally-built clang. (For now, you still have to
explicitly build the 'compiler-rt' target. Maybe we should make the
clang target depend on that in the GN build?)

Differential Revision: https://reviews.llvm.org/D112238
2021-10-21 21:08:36 -04:00
Vitaly Buka 76b7784bcd [NFC][sanitizer] Rename ByteMap to Map 2021-10-10 22:23:48 -07:00
Vitaly Buka 05d46f627c [NFC][sanitizer] Remove sanitizer_persistent_allocator.cpp
We need to make it a template
2021-10-08 13:43:28 -07:00
Nico Weber 07e5394c63 [gn build] (manually) port 77d5ccdc6f
(similar to 64f623d4c3)
2021-10-06 15:41:38 -04:00
Nico Weber 64f623d4c3 [gn build] (manually) port ac191bcc99 2021-09-23 09:34:24 -04:00
Nico Weber cef0280a95 [gn build] (semi-manually) port 702cb7afe9 2021-09-23 09:26:27 -04:00
Nico Weber df1ab7de38 [gn build] (semi-manually) port 750d5fc65c 2021-09-17 12:02:09 -04:00
Arthur Eubanks 77b6a4bde4 [gn build] Don't copy xray includes
The gn build doesn't support xray, so there's no reason to make the xray
headers available. Some CMake checks check if xray includes are
available to determine if xray is usable. Since we don't build the xray
runtime, there are link errors.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D108737
2021-08-27 08:51:27 -07:00
LLVM GN Syncbot fa4132dc88 [gn build] Port e6407356ba 2021-08-20 06:14:22 +00:00
Arthur Eubanks 41354942c5 [gn build] Add cfi ignorelist to compiler-rt/lib
So that building the compiler-rt target also copies the cfi ignorelist

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D107411
2021-08-04 11:58:32 -07:00
Vitaly Buka 6538aa8ce9 [NFC][tsan] Rename _inl.h to .inc
Differential Revision: https://reviews.llvm.org/D107319
2021-08-03 09:35:33 -07:00
Nico Weber 3555880f10 [gn build] (manually) port 5c2b48fdb0 2021-08-02 20:10:04 +02:00
Arthur Eubanks ee7c9b8f14 [gn build] Manually add file
Since bot is broken
2021-07-29 10:37:28 -07:00
Arthur Eubanks 43a44f1c54 [gn build] Add support for Win/x86 compiler-rt
This allows us to build the x86 profile runtime.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D106972
2021-07-28 14:59:18 -07:00
LLVM GN Syncbot e7077971f2 [gn build] Port 0118a64934 2021-07-23 07:19:25 +00:00
Nico Weber 377320fe80 [gn build] Reformat all gn files
Ran `git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format`.
2021-07-22 21:35:35 -04:00