
This does a few things: * LLVM_CONFIG_PATH is deprecated, use LLVM_CMAKE_DIR instead. * Don't use $ before command examples. I would normally, but the key cmake commands didn't use it so I removed it from all commands. * Makes the commands shown full commands, so you don't have to piece them together. * Uses shell variables to cut down on repetition and make this easier to port to other targets. * Adds a few options to disable more compiler-rt things. * Use the built in cmake options for sysroot and toolchains. * Include test options in the first cmake command, so you don't have to re-do the whole thing after you read the testing section. * Removes the section about using BaremetalARM.cmake. The closest I got to getting that cache to work was: ``` SYSROOT=/home/david.spickett/arm-gnu-toolchain-14.3.rel1-x86_64-arm-none-eabi/arm-none-eabi/libc LLVM_TOOLCHAIN=/home/david.spickett/LLVM-20.1.8-Linux-X64/ cmake \ -G Ninja \ -DCMAKE_C_COMPILER=${LLVM_TOOLCHAIN}/bin/clang \ -DBAREMETAL_ARMV6M_SYSROOT=${SYSROOT} \ -DBAREMETAL_ARMV7M_SYSROOT=${SYSROOT} \ -DBAREMETAL_ARMV7EM_SYSROOT=${SYSROOT} \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ENABLE_RUNTIMES="compiler-rt" \ -C ../llvm-project/clang/cmake/caches/BaremetalARM.cmake \ -DCOMPILER_RT_BUILD_BUILTINS=ON \ -DCOMPILER_RT_BUILD_LIBFUZZER=OFF \ -DCOMPILER_RT_BUILD_MEMPROF=OFF \ -DCOMPILER_RT_BUILD_PROFILE=OFF \ -DCOMPILER_RT_BUILD_CTX_PROFILE=OFF \ -DCOMPILER_RT_BUILD_SANITIZERS=OFF \ -DCOMPILER_RT_BUILD_XRAY=OFF \ -DCOMPILER_RT_BUILD_ORC=OFF \ -DCOMPILER_RT_BUILD_CRT=OFF \ ../llvm-project/runtimes ``` All this does is build the x86 builtins. I tried forcing the issue with: ``` -DBUILTIN_SUPPORTED_ARCH="armv7m;armv6m;armv7em" \ ``` But again, just x86. It's probably something deep in compiler-rt failing a compiler check for the Arm targets. Even if that's the case, fixing that means adding more options to the cmake command. I can't find evidence of a full command using this cache file since the commit that introduced it and that command no longer works. I think if you ever got this to work again the command would be as long and complex as the ones already shown in the document. I would also argue that some of the other caches, for example Fuschia's, are much better example of multi-target runtimes builds. If what's in this document isn't enough, folks should be learning from those files and about the runtimes build overall before attempting anything complex (though it does not take much to be "complex").
readability-container-size-empty
: Correctly generating fix hints when size method is called from implicit this (#152486)
The LLVM Compiler Infrastructure
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called "LLVM". This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Getting the Source Code and Building LLVM
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Getting in touch
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.