373 Commits

Author SHA1 Message Date
Arthur Eubanks
b35b6297fd [gn build] Build win asan libraries against MutliThreadedDLL
win asan only supports /MD. Without this, the asan runtime cannot intercept functions.
2025-08-19 19:48:32 +00:00
Peter Collingbourne
de31584001
Reapply "compiler-rt: Introduce runtime functions for emulated PAC."
This reverts commit 0c0aa56cdcf1fe3970a5f3875db412530512fc07.

This time with the following fixes for buildbot failures:
- Add underscore prefixes to symbol names on Apple platforms.
- Modify the test so that it skips the crash tests on platforms where
  they are not expected to pass:
  - Platforms that implement FEAT_PAuth but not FEAT_FPAC (e.g.
    Apple M1, Cortex-A78C)
  - Platforms where DA key is disabled (e.g. older Linux kernels,
    Linux kernels with PAC disabled, likely Windows)

Original commit message follows:

The emulated PAC runtime functions emulate the ARMv8.3a pointer
authentication instructions and are intended for use in heterogeneous
testing environments. For more information, see the associated RFC:
https://discourse.llvm.org/t/rfc-emulated-pac/85557

Reviewers: mstorsjo, pawosm-arm, atrosinenko

Reviewed By: atrosinenko

Pull Request: https://github.com/llvm/llvm-project/pull/148094
2025-07-14 13:13:32 -07:00
Peter Collingbourne
0c0aa56cdc Revert "compiler-rt: Introduce runtime functions for emulated PAC."
As well as followup "builtins: Speculative MSVC fix."

This reverts commits 5b1db59fb87b4146f827d17396f54ef30ae0dc40 and
f1c4df5b7bb79efb3e9be7fa5f8176506499d0a6.

Needs fixes for failing tests which will take time to implement.
2025-07-10 13:16:36 -07:00
Peter Collingbourne
5b1db59fb8
compiler-rt: Introduce runtime functions for emulated PAC.
The emulated PAC runtime functions emulate the ARMv8.3a pointer
authentication instructions and are intended for use in heterogeneous
testing environments. For more information, see the associated RFC:
https://discourse.llvm.org/t/rfc-emulated-pac/85557

Reviewers: llvm-beanz, petrhosek

Pull Request: https://github.com/llvm/llvm-project/pull/133530
2025-07-09 16:18:37 -07:00
Nico Weber
843f256623 [gn] port 20d5d09e99188 2025-06-12 09:23:34 -04:00
Nico Weber
3cb104e98b [gn] Unbreak build after b62488f8326c61f
This is wrong -- it needs to put in the right value for
Python3_ROOT_DIR. But for now, this unbreaks the build.
2025-06-10 11:03:38 -04:00
LLVM GN Syncbot
a5ba4c95d4 [gn build] Port 75e61333f083 2025-05-26 15:41:12 +00:00
Nico Weber
2b002d6804 [gn] port 1756fcb8b019 2025-04-17 21:56:41 -07:00
Nico Weber
b6c99cb56b [gn] port 6d03f51f0c59 2025-04-16 19:48:56 -07:00
Nico Weber
957bd6aa32 [gn] port d1fd97737e90 2025-04-11 19:08:05 -04:00
Peter Collingbourne
bd2df7b076
gn build: Enable check-hwasan on aarch64 Linux.
Reviewers: aeubanks, vitalybuka

Reviewed By: vitalybuka

Pull Request: https://github.com/llvm/llvm-project/pull/134944
2025-04-08 16:15:14 -07:00
Peter Collingbourne
d3a9d471f7
gn build: Replace ${hwasan_name}-preinit with hwasan-preinit.
The driver only ever looks for the latter.

Reviewers: aeubanks

Reviewed By: aeubanks

Pull Request: https://github.com/llvm/llvm-project/pull/134943
2025-04-08 16:14:46 -07:00
Peter Collingbourne
93096bf830
gn build: Add hwasan_preinit.cpp to hwasan static library to match CMake.
Reviewers: aeubanks

Reviewed By: aeubanks

Pull Request: https://github.com/llvm/llvm-project/pull/134942
2025-04-08 16:14:19 -07:00
Peter Collingbourne
499930e38a gn build: Spell arm64 correctly. 2025-04-07 19:37:33 -07:00
Peter Collingbourne
9222607227
gn build: Add check-builtins target.
Tested on aarch64 Linux and x86_64 Linux.

Reviewers: aeubanks, nico

Reviewed By: aeubanks

Pull Request: https://github.com/llvm/llvm-project/pull/134482
2025-04-07 13:22:52 -07:00
Midhunesh
d75a40a9c1
Add cmake option to enable/disable searching PATH for symbolizer (#129012)
Introduced a cmake option that is disabled by default that suppresses
searching via the PATH variable for a symbolizer. The option will be
enabled for downstream builds where the user will need to specify the
symbolizer path more explicitly, e.g., by using ASAN_SYMBOLIZER_PATH.
2025-03-25 16:29:35 -07:00
Nico Weber
0cbe28df71 [gn] port 28ae2ff2a44c 2025-01-01 14:24:25 -05:00
Vitaly Buka
1de228fa9b
[ubsan] Remove UBSAN_CAN_USE_CXXABI (#121082)
It's should be enough to provide weak implementation.

Fixes solaris and android linking after #121006.
2024-12-24 20:21:40 -08:00
Nico Weber
20aed3fd09 [gn] port 2c0b8b10dd1a 2024-12-10 08:49:52 -05:00
Peter Collingbourne
9118d3a564 gn build: Fix port of 3cb28522ba4c
COMPILER_RT_EXEC_OUTPUT_DIR is expected to be the path where
hwasan_symbolize is installed, i.e. the bin subdirectory of the
build directory, but we were incorrectly setting it to the install
location of the runtime libraries. Fix it.
2024-11-26 13:17:23 -08:00
Nico Weber
c9562b181c [gn] port 3cb28522ba4c 2024-11-26 15:10:48 -05:00
Nico Weber
5683fc5cc0 [gn] port a5dd6463608b 2024-11-26 14:05:38 -05:00
Nico Weber
3793decaaa [gn] port 28e4aad45a64 2024-11-12 09:55:38 -05:00
Arthur Eubanks
09fb01a5e5
[gn build] Enable hwasan for aarch64 Android (#115219) 2024-11-07 12:32:42 -08:00
Nico Weber
d43e4ce77d Revert "[gn] port b1be21394e9c"
b1be21394e9c was reverted in 3ac75ee8ec.

This reverts commit 18f4b7e4a862c11816e62cc72fb2a4ca8fac1987, as well
as follow-ups a69d2a18d207947a25838dd01d2116bee384b75b and
4a6b56960f445d111adc9aef799acad8c6ca41f0.
2024-10-29 11:17:11 -04:00
Martin Storsjö
ef9629c64a Revert "Add extendhfxf2 into compiler rt (#111099)"
This reverts commit 5f7bad07b9d5b6c5cfa8c16a4e62cf1e128725be.

These tests fail to build in multiple configurations, see
https://github.com/llvm/llvm-project/pull/111099.
2024-10-26 12:34:45 +03:00
B I Mohammed Abbas
5f7bad07b9
Add extendhfxf2 into compiler rt (#111099)
Retry pr #109090 with updated extendhfxf2 test
2024-10-25 20:05:23 -04:00
Nico Weber
4a6b56960f [gn] try to port b1be21394e9c even more
Bots are now failing check-hwasan with

    llvm-lit: .../llvm/utils/lit/lit/llvm/subst.py:133: fatal: Did not find
        hwasan_symbolize in .../out/gn/stage2_unix/bin

This time it's the right fix for sure!
2024-10-25 09:19:21 -04:00
Nico Weber
a69d2a18d2 [gn] try to port b1be21394e9c more
Bots are currently failing check-hwasan with

    llvm-lit: .../llvm/utils/lit/lit/llvm/subst.py:133: fatal: Did not find
        hwasan_symbolize in /.../out/gn/lib/clang/20/lib/linux

Maybe this fixes that.

See also llvm/utils/gn/secondary/compiler-rt/lib/hwasan/scripts/BUILD.gn.
2024-10-25 09:05:29 -04:00
Nico Weber
18f4b7e4a8 [gn] port b1be21394e9c 2024-10-25 00:24:42 -07:00
Nico Weber
8c2e8b5124 [gn] port a14a83d9a102 2024-10-24 16:32:09 -07:00
Nico Weber
5aec88f0e6 [hwasan], [gn]: Fix formatting of hwasan cmake; re-sync gn file for b515d9ea1e43 2024-10-19 09:57:56 -04:00
LLVM GN Syncbot
561f9155fb [gn build] Port b515d9ea1e43 2024-10-19 01:37:17 +00:00
Peter Collingbourne
1784aca904 gn build: Sync hwasan assembly file source list. 2024-10-18 18:36:01 -07:00
Nico Weber
f3947aaa37 [gn] port aa44f59abf39 2024-10-14 09:10:27 -04:00
Arthur Eubanks
cf5bbeb533 [gn build] Remove unix x86 stage2 toolchain
It's breaking the bots, e.g. http://45.33.8.238/linux/149792/step_3.txt
2024-10-09 16:34:38 +00:00
Arthur Eubanks
18952bdcd6
[gn build] Fix up win/x86 flags and add stage2_unix_x86 (#111595) 2024-10-09 09:18:59 -07:00
lntue
007780f31e
Revert "Add missing extendhfxf2 in compiler rt" (#110662)
Reverts llvm/llvm-project#109090
2024-10-01 09:02:24 -04:00
B I Mohammed Abbas
a57a83fc15
Add missing extendhfxf2 in compiler rt (#109090)
Issue: #105181
extendhfxf2 calls extendhfXfy to convert _Float16 to double, then type
casts this converted value to long double.
__uint128_t may not be available on all architectures. Thus I din't use
extendhfXfy to widen precision to 128 bits.
2024-10-01 08:42:08 -04:00
Nico Weber
4a2d24e814 [gn] Reformat build files
Ran:

    git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format

No behavior change.
2024-09-24 20:22:36 -04:00
Nico Weber
61ed5387c8 [gn] port c18be32185ca 2024-09-19 07:34:17 -04:00
Nico Weber
ce74d5ff87 [gn build] Port a10c9f994be1 2024-09-18 09:40:04 -04:00
Nico Weber
e8e42999a5 [gn] port 76eda76f9f36 2024-09-18 09:27:49 -04:00
Arthur Eubanks
bea2f2511b
[gn build] Port win asan runtime rules (#108293)
Windows doesn't have a static runtime after #107899.
2024-09-12 10:11:40 -07:00
Nico Weber
e610a0efc3 [gn] port eb0e4b1415800 2024-09-10 09:39:31 -04:00
Nico Weber
4d55f0bf25 [gn] attempt to port 53a81d4d26f0 more (win/asan dynamic runtime) 2024-09-10 09:20:04 -04:00
Nico Weber
4a63d62f68 [gn] attempt to port 53a81d4d26f0 (win/asan dynamic runtime)
Based on the output of llvm/utils/gn/build/sync_source_lists_from_cmake.py
and reading the diff, but not actually tested on Windows.
2024-09-10 09:11:35 -04:00
Nico Weber
7f77db4ffc [gn] port 5d146c689e28 2024-09-06 15:11:01 -04:00
Nico Weber
a5bc549c50 [gn] port 73ac9536268f 2024-07-24 07:58:51 -04:00
Nico Weber
cb528e59de [gn] port a41a4ac78294 2024-07-22 09:38:54 -04:00