Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Clang Compiler Frontend

You're reading from  Clang Compiler Frontend

Product type Book
Published in Mar 2024
Publisher Packt
ISBN-13 9781837630981
Pages 326 pages
Edition 1st Edition
Languages
Author (1):
Ivan Murashko Ivan Murashko
Profile icon Ivan Murashko

Table of Contents (17) Chapters

Preface Part I: Clang Setup and Architecture
Chapter 1: Environment Setup Chapter 2: Clang Architecture Chapter 3: Clang AST Chapter 4: Basic Libraries and Tools Part II: Clang Tools
Chapter 5: Clang-Tidy Linter Framework Chapter 6: Advanced Code Analysis Chapter 7: Refactoring Tools Chapter 8: IDE Support and Clangd Part III: Appendix
Bibliography
Index Other Books You Might Enjoy Appendix 1: Compilation Database Appendix 2: Build Speed Optimization

1.1 Technical requirements

Downloading and building LLVM code is very easy and does not require any paid tools. You will require the following:

  • Unix-based OS (Linux, Darwin)

  • Command line git

  • Build tools: CMake and Ninja

We will use the debugger as the source investigation tool. LLVM has its own debugger, LLDB. We will build it as our first tool from LLVM monorepo: https://github.com/llvm/llvm-project.git.

Any build process consists of two steps. The first one is the project configuration and the last one is the build itself. LLVM uses CMake as a project configuration tool. It also can use a wide range of build tools, such as Unix Makefiles, and Ninja. It can also generate project files for popular IDEs such as Visual Studio and XCode. We are going to use Ninja as the build tool because it speeds up the build process, and most LLVM developers use it. You can find additional information about the tools here: https://llvm.org/docs/GettingStarted.html.

The source code for this chapter...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}