[libclc] Base the build around `add_sources` instead of source list (#197034) Summary: The current build uses a curated + deduplicated source list. This PR seeks to simplify this a little bit and canonicalize the behavior. Now we create the target up-front, `clc` and `opencl`. We add the directories which add sources to this target. We normalize the architecture to the variants. We always add target specific versions first. When we add sources we check if the file already exists and defer to the architecture specific one. This normalized the behavior, the directories are now laid out like this `clc/<arch>/<os>`. We normalize these to `amdgpu`, `nvptx`, and `spirv` respectively. We use the OS for the newly created vulkan target. We now control variants via checking if the directory for that exists, so it's nested more naturally. Hopefully this makes more sense, the goal is to exercise the fact that we have individual builds now. Previously this did not work because you could not add_subdirectory more than once.
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.
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.
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.