Thanks Chris! Interesting read.
Btw. g++ only invokes clang, I suppose it handles some potential argument
transformation.

Cheers!
Vojtech


st 15. 5. 2019 v 1:28 odesílatel Chris Hanson <c...@mac.com> napsal:

> On May 14, 2019, at 8:29 AM, Vojtěch Meluzín <meldaproduct...@gmail.com>
> wrote:
> >
> > Here's the command line:
> >
> > g++ -x c++ -g -fexceptions -std=c++17 -stdlib=libc++ -arch i386
> > -fexceptions -mfix-and-continue -gdwarf-2 -fvisibility=hidden
> > -fpascal-strings -fasm-blocks -c mlibrary/mlibrary.cpp -o
> !temp/mlibrary.o
>
> If you’re not using Xcode directly to do your builds, you should use
>
>     xcrun -sdk macosx -toolchain default clang
>
> to invoke the compiler, which will ensure it’s invoked with the right SDK
> and from the right toolchain. (The latter can matter if you install other
> toolchains like in-progress versions of Swift.)
>
> When building things that use make, I often override CC that way, e.g.
>
>     make CC='xcrun -sdk macosx -toolchain default clang'
>
> You may also need to do CXX with clang++ if you’re building C++ code.
>
>   -- Chris
>
> PS - The default compiler on Apple platforms has been clang for a long
> time now; if you’re actually using GCC, you’re on your own as it’s not
> supported. The only supported tools for submitting apps to the App Store
> are those that are included with Xcode.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to