Important: Please read the Qt Code of Conduct -

What does "Tool chain" option in Helpers setting in Mac Qt Creator do?

  • I never really understand what the "Tool chain" found in Mac version of Creator's Debugger Helper is for:


    For example, the Qt 5 install was built with build-in clang tool chain. Whatever tool chain I choose in this place, the helper is always built with clang (I assume the build-in one). What exactly is this option for?

  • BTW. None of the Apple supplied compilers since Xcode 4.2 support PPC any more. There's really no point listing them in the Tool Chains tab.

  • Moderators

    Sorry, I am not a mac user...

    How can I tell whether a compiler is part of Xcode 4.2 or earlier? Version numbers?

  • [quote author="Tobias Hunger" date="1336726143"]Sorry, I am not a mac user...[/quote]
    Lucky you. I wish I wasn't. :)

    [quote]How can I tell whether a compiler is part of Xcode 4.2 or earlier? Version numbers?[/quote]
    One can certainly come up with a list of matching compiler and Xcode versions. There might be one somewhere already. But if the goal is to figure out if PPC is supported, some shell script/command-line kungfu is probably better way to go. I'll see what I can find.

  • Moderators

    We run "gcc -dumpmachine" and "gcc -version" already, I really would like to avoid calling even more external code.

    The compiler detection has to happen during the start up of creator after all and we want that to be fast.

  • Apple GCC lies about -dumpmachine :)

    Here's what I come up with on versions:

    None of LLVM-backed compilers on Mac supports PPC. That includes all versions of clang and Apple's LLVM-GCC 4.2.

    Apple GCC 4.0 is the only compiler that for sure supports PPC.

    Apple GCC 4.2 (non-LLVM one) is nasty. It originally supports PPC but Apple stripped it midway when they introduced Xcode 4.

    So Creator should only enable PPC tool chain if it's GCC 4.0 or 4.2. Disable it for everything else.

    It's not completely correct (4.2 can be both) but it will be way better than what it does now.

    Now back to the OP. What exactly does tool chain do in generating dumper? :)

  • Moderators

    Thanks for the information. I'll update creator with this in mind:-)

    The tool chain is passed to DebuggingHelperBuildTask and does the following there:

    • Sets the path and other environment variables
    • Sets some parameters passed to qmake (on mac only AFAICT)
    • Sets the make command to use
    • Sets some parameters passed to the make command (for Symbian or Unix-on-Windows)

    That's it. It probably should also set the mkspec.

    Does this information help?

  • Yes, it does. But I don't think Creator is doing those. As I stated in OP, it doesn't make any difference when I choose a different tool chain in that dialog. The log shows it's always built with the same one Qt library was built.

  • Moderators

    Oh, it does those steps according to the code. I checked:-)

    It is not changing the mkspec, so the actual calls to the compiler are always the same (g++ or whatever). The path should have some effect on which compiler is run though.

  • Well. If it still uses clang to build the helper when I choose GCC tool chain, then it doesn't really do what I think it should then. :)

    All these confusion will go away after Mac finally gets some python enabled gdb love. Can't happen fast enough. Until then, I will just stick with one tool chain through out. Thanks.

  • Moderators

    Please consider to file a bug report. It should use the proper mkspec for the tool chain.

Log in to reply