[Development] Proposing to move deploy tools to qtbase

Martin Storsjö martin at martin.st
Thu Nov 25 22:36:11 CET 2021


On Thu, 25 Nov 2021, Thiago Macieira wrote:

> On Thursday, 25 November 2021 11:57:01 PST Martin Storsjö wrote:
>> On Thu, 25 Nov 2021, Thiago Macieira wrote:
>> It is possible (although not very common) to do cross compilation to macOS
>> - I maintain such a setup at https://github.com/mstorsjo/xcode-cross
>> (based on repos where Thomas Pöchtrager maintain patched versions of
>> cctools and ld64).
>
> Interesting I'll take a look.

FWIW, for cross compiling Qt 5, I set it up by setting a bunch of 
QMAKE_MAC_* variables to configure - but the basic gist of it is that you 
have e.g. "x86_64-apple-darwin-clang++" (or -g++ which does the same) 
which you can use basically like a regular target-triple-prefixed cross 
gcc.

> Do you by any chance have a working icecream/iceccd compiler package? I have 
> 200 job slots for Linux, for Windows, and for FreeBSD, but only 12 for Mac 
> (one 6-core Mac Mini).

Sorry, no, I haven't used such setups at all.

>> Cross compiling still requires a SDK root from Xcode (which afaik isn't
>> redistributable), so my setup requires copying and stripping it down from
>> a real Xcode install. (There are repos on github that provide the bare
>> sysroots though, although I'm wouldn't bet on whether one can consider
>> them redistributable like that - I haven't integrated scripts for making
>> use of that.)
>
> Well, I have a Mac Mini, so I have the sysroot. I can package it like I did 
> for FreeBSD. But I'm more interested in the icecream setup, which doesn't 
> require sysroot since everything is preprocessed on the host.
>
>> > I don't know if lld is a good replacement.
>> 
>> These days (last 6-12 months roughly) lld has become pretty mature for
>> targeting macOS for x86_64 and aarch64 (AFAIK current release versions of
>> Chrome are built with it), but I haven't tried hooking it up in my setups.
>
> I think Chrome uses the standard Clang too, not Apple's fork.

Yes, I'd think so too.

// Martin


More information about the Development mailing list