What is clang (and ld) on Mac?
By Junaid, maker of Taskglass · Last reviewed
The C, C++ and Objective-C compiler (clang) and the linker (ld) used during builds.
clang compiles C, C++ and Objective-C code, and ld (the linker) joins compiled pieces into an app or program. They come with Xcode and the Command Line Tools, and are also used by tools like Homebrew, Python and Ruby when installing packages that need compiling. They run during builds and exit afterwards.
- Category
- Developer tools
- Made by
- Apple (LLVM)
- Safe to quit:
- With care
Shown in Activity Monitor as clang, clang++, ld
Why is clang (and ld) using so much CPU or memory?
- Building software in Xcode or from the command line
- Homebrew or package managers compiling from source
- Linking large projects
What to do
- 1Let the build or install finish
- 2Check Terminal or Xcode for a build you didn't mean to start
- 3Stop the build if needed (Control-C in Terminal, or Stop in Xcode)
Safe to quit? With care.
Quitting fails the current build or install, but harms nothing else.
Is it genuine? How to check
Malware sometimes borrows the name of a real process. The real one runs from a fixed place and carries its maker's code signature, so check both.
clang
- Location
- /usr/bin/clang
- Signed by
- Apple (part of macOS)
Check the signature in Terminal:
codesign -dv --verbose=2 "/usr/bin/clang"
The genuine file prints these lines:
Identifier=com.apple.dt.xcode_select.tool-shim-public Authority=macOS Software Signing TeamIdentifier=not set
clang++
- Location
- /usr/bin/clang++
- Signed by
- Apple (part of macOS)
Check the signature in Terminal:
codesign -dv --verbose=2 "/usr/bin/clang++"
The genuine file prints these lines:
Identifier=com.apple.dt.xcode_select.tool-shim-public Authority=macOS Software Signing TeamIdentifier=not set
ld
- Location
- /usr/bin/ld
- Signed by
- Apple (part of macOS)
Check the signature in Terminal:
codesign -dv --verbose=2 "/usr/bin/ld"
The genuine file prints these lines:
Identifier=com.apple.dt.xcode_select.tool-shim-public Authority=macOS Software Signing TeamIdentifier=not set
To see where the running copy lives, run this in Terminal and compare the path:
ps -axo pid,user,comm | grep -F clang
In Activity Monitor: select the process, click the Info button (ⓘ), then Open Files and Ports. The first line is the program's path.
Paths and signatures checked on macOS 27.0.1 (26A434), Apple M4, November 17, 2026. Other macOS versions can differ.
Related processes
- swift-frontendThe Swift compiler. Many copies run at once while Xcode or SwiftPM builds your code.
- XCBBuildService / SWBBuildServiceXcode's build system service, which plans and runs your project's builds.
- XcodeApple's app for building Mac, iPhone and iPad apps.
- Code Helper (Plugin)Usually runs VS Code extensions and the language tools they start, like TypeScript's server.
- Code Helper (Renderer)Draws a VS Code window or webview: the editor, panels and extension views.
- com.docker.backendDocker Desktop's main background service that manages the VM, networking and file sharing.
Part of the Taskglass Process Library · More Developer tools processes