https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90834
--- Comment #7 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to r...@cebitec.uni-bielefeld.de from comment #5) > > --- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> --- > > I don't have 10.15 or xcode 11 yet .. > > (not disagreeing that we need a way to handle this, but neither turning > > gcc's > > driver into xcrun ... nor using several extra process launches, per > > invocation.. seems a useful way) > > Absolutely: I'd have hoped that there's a programmatic way to get at > that info. I haven't found one while checking llvm/clang sources, > though, but a dtruss on clang (I think) found a symlink in > /var/db/... pointing to the SDK. If there's nothing better, that > certainly beats calling xcrun every time... Yes - I think that the link you see is probably what xcrun uses to avoid the overhead (but that's speculation, xcrun is so far closed source). One idea I'm tinkering with is to have similar symlinks in ~/.gcc/<version>/SDKs and some way to update them when stale. (there are other bugs concerned with this generic problem tho - so I won't derail this from it's main point).