rust/compiler/rustc_target/src
bors 506512391b Auto merge of #124676 - djkoloski:relax_multiple_sanitizers, r=cuviper,rcvalle
Relax restrictions on multiple sanitizers

Most combinations of LLVM sanitizers are legal-enough to enable simultaneously. This change will allow simultaneously enabling ASAN and shadow call stacks on supported platforms.

I used this python script to generate the mutually-exclusive sanitizer combinations:

```python
#!/usr/bin/python3

import subprocess

flags = [
    ["-fsanitize=address"],
    ["-fsanitize=leak"],
    ["-fsanitize=memory"],
    ["-fsanitize=thread"],
    ["-fsanitize=hwaddress"],
    ["-fsanitize=cfi", "-flto", "-fvisibility=hidden"],
    ["-fsanitize=memtag", "--target=aarch64-linux-android", "-march=armv8a+memtag"],
    ["-fsanitize=shadow-call-stack"],
    ["-fsanitize=kcfi", "-flto", "-fvisibility=hidden"],
    ["-fsanitize=kernel-address"],
    ["-fsanitize=safe-stack"],
    ["-fsanitize=dataflow"],
]

for i in range(len(flags)):
    for j in range(i):
        command = ["clang++"] + flags[i] + flags[j] + ["-o", "main.o", "-c", "main.cpp"]
        completed = subprocess.run(command, stderr=subprocess.DEVNULL)
        if completed.returncode != 0:
            first = flags[i][0][11:].replace('-', '').upper()
            second = flags[j][0][11:].replace('-', '').upper()
            print(f"(SanitizerSet::{first}, SanitizerSet::{second}),")
```
2024-05-21 15:35:29 +00:00
..
abi Improved the documentation of the FnAbi struct 2024-05-15 20:32:27 +02:00
asm Remove extern crate rustc_macros from numerous crates. 2024-04-29 10:21:54 +10:00
spec Auto merge of #124676 - djkoloski:relax_multiple_sanitizers, r=cuviper,rcvalle 2024-05-21 15:35:29 +00:00
json.rs Add metadata to targets 2024-03-10 20:46:08 +01:00
lib.rs Remove unused step_trait feature. 2024-05-08 11:00:19 +10:00
target_features.rs Stabilize Wasm phase 4 & 5 proposals 2024-04-18 12:51:02 +02:00
tests.rs Use serde_json for target spec json 2022-06-03 16:46:19 +00:00