From: Chris Lattner Date: Wed, 17 Oct 2007 06:04:46 +0000 (+0000) Subject: fix problems with test/sema/Cocoa.m etc on non-apple machines. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=338128bea14fe0d24442a4a34986e53b551e1d06;p=clang fix problems with test/sema/Cocoa.m etc on non-apple machines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43067 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Driver/Targets.cpp b/Driver/Targets.cpp index e7e6a051da..581f475ece 100644 --- a/Driver/Targets.cpp +++ b/Driver/Targets.cpp @@ -55,8 +55,12 @@ namespace { class DarwinTargetInfo : public TargetInfoImpl { public: virtual void getTargetDefines(std::vector &Defs) const { +// FIXME: we need a real target configuration system. For now, only define +// __APPLE__ if the host has it. +#ifdef __APPLE__ Define(Defs, "__APPLE__"); Define(Defs, "__MACH__"); +#endif if (1) {// -fobjc-gc controls this. Define(Defs, "__weak", "");