Can DEVELOPER_DIR or xcode-select support Command Line Tools at custom paths?

I'm trying to manage multiple Command Line Tools versions side-by-side (e.g., 16.2 and 26.2).

I renamed the CLT directory to /Library/Developer/CommandLineTools-26.2.0 and set:

  • xcode-select -s /Library/Developer/CommandLineTools-26.2.0
  • or DEVELOPER_DIR=/Library/Developer/CommandLineTools-26.2.0

Both result in: c++: error: unable to find Xcode installation from active developer path "/Library/Developer/CommandLineTools-26.2.0"

It appears CLT only works at the fixed path /Library/Developer/CommandLineTools, unlike Xcode which can be at any location.

Is this by design? Is there a supported way to use multiple CLT versions in parallel, similar to how multiple Xcode versions can coexist?

Can DEVELOPER_DIR or xcode-select support Command Line Tools at custom paths?
 
 
Q