logo

Programming Languages - Build Tools

Last Updated: 2024-01-20

Build toolchain: compiler + linker + libraries + others.

Build tools / package managers:

Tool Config / DSL C/C++ JVM Rust Go Swift JS
CMake CMakeLists.txt Yes
Gradle Groovy / Kotlin Yes Yes Yes
Maven xml Yes
Bazel Starlark (Python) Yes Yes Yes Yes
Cargo toml Yes
NPM json Yes

JVM inclues Java, Kotlin, Scala, etc.

Build Tools

Both Bazel (from Google) and Buck (from Meta) write rules in starlark (a Python-like language); Buck 1 and Bazel are written in Java, while Buck 2 is in Rust.

Package Managers and Registries

Cloud Services

Compilers

  • swc: (https://swc.rs/) a typescript / javascript compiler, written in Rust.
  • Emscripten: an LLVM/Clang-based compiler that compiles C and C++ source code to WebAssembly

Clang vs GCC

2 Primary C/C++ compilers: Clang and GCC.

Clang GCC
License Apache 2.0 GPL / LGPL
C++ Standard Library libc++ libstdc++
C Standard Library glibc
Parent Project LLVM GNU
Website https://clang.llvm.org/ https://gcc.gnu.org/

Notes:

  • Clang was originated from Apple but now widely used (You will find Google, Facebook Microsoft, Intel, Qualcomm, Huawei in LLVM Found ation sponsor list https://foundation.llvm.org/docs/sponsors/)
  • Emerging languages are using the LLVM frameworks, such as Swift, Rust.
  • GCC was deprecated in Android in 2019 and removed in 2020
  • GCC is the official compiler for the GNU and Linux systems
  • Clang supports a wide variety of C standard library implementations.

Conclusion: use Clang/LLVM if you do not have to use GCC.

Install Clang

On Debian / Ubuntu:

$ sudo apt install clang libc++-dev libc++abi-dev

Verify:

$ clang --version
clang version xx.x.x
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin