How to run lit tests on Mac OSX without gcc?

David Nadlinger via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Mon Aug 28 01:55:22 PDT 2017


On 26 Aug 2017, at 23:31, Thomas Mader via digitalmars-d-ldc wrote:
> The thing with Nix is that every dependency need to be fixed at build 
> time and can't change anymore.
> I was able to find the code where the path to gcc is searched for 
> linking and I just replaced "gcc" with "clang" in driver/tool.cpp.
> Since the CC environment flag is properly set by nix with the full 
> path to clang, it can be found and no gcc is needed at all.

I'm still not sure I understand. Are you saying that Nix purposely 
doesn't allow the system Xcode installation to be found (which makes 
sense for a reproducible build system), but doesn't provide a `gcc` 
symlink in its Clang/Xcode/… package?

Also, if the CC environment variable is set to the path of an 
executable, LDC should automatically use it already. What the default 
program is should be inconsequential then.

> I wonder though why there is a special case for FreeBSD in there with 
> clang but not for Mac OSX.

Presumably FreeBSD does not provide a `gcc` symlink by default, unlike 
Xcode/macOS. You'd have to ask Kai 
(https://github.com/ldc-developers/ldc/pull/1117) for details, though.

  — David


More information about the digitalmars-d-ldc mailing list