[clang] [Clang][AArch64] Add support for SHF_AARCH64_PURECODE ELF section flag (2/3) (PR #125688)

Peter Smith via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 17 09:55:26 PST 2025


================
@@ -0,0 +1,6 @@
+// RUN: %clang --sysroot=%S/Inputs -c -fdriver-only -Werror --target=aarch64-unknown-linux-gnu \
----------------
smithp35 wrote:

Can you check that this test still passes with a aarch64-none-elf bare-metal target?

There's a !ForMultilib in the ARM code https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/Arch/ARM.cpp#L887

Which I think would only take effect on the bare-metal driver. If it doesn't then would you be able to add a similar !ForMultilib to the AArch64 driver?

FWIW The git blame for b4eebc8674e1f1dc1ef08fa7648ca494a119449d says
```
    [Driver] Enable multilib.yaml in the BareMetal ToolChain
                                                                                                                                                                                                The default location for multilib.yaml is lib/clang-runtimes, without
    any target-specific suffix. This will allow multilibs for different
    architectures to share a common include directory.

    To avoid breaking the arm-execute-only.c CHECK-NO-EXECUTE-ONLY-ASM
    test, add a ForMultilib argument to getARMTargetFeatures.

    Since the presence of multilib.yaml can change the exact location of a                                                                                                                      library, relax the baremetal.cpp test.

    Differential Revision: https://reviews.llvm.org/D142986
```

https://github.com/llvm/llvm-project/pull/125688


More information about the cfe-commits mailing list