On Thursday, 30 May 2019 15:37:32 PDT Konstantin Tokarev wrote: > > I understand, but aside from qmake, I don't know of any build system that > > allows for building both host and target in the same build. That means > > whatever we use in Qt 6, we'll a separate build for host tools when cross- > > compiling. > > That's not exactly correct, as any build system which supports custom build > rules (or "custom compilers" in qmake parlance) can implement such > bootstrap without much pain. Most of build systems around, starting from > good old make, support custom build rules [1]. Unfortunately, cmake is less > expressive than make, as it supports [2] only custom targets ()
"without much pain" is incorrect. The whole point of having a buildsystem that is more complex than Make is to figure out where the compiler is, how to run it, how to create libraries and executables, at a minimum. Custom rules wouldn't benefit from that detection, which means we'd need to duplicate all of it in order to do everything in a single build. Therefore, "with considerable pain". > Fortunately, cmake has ExternalProject feature which can be used to work > around this limitation. Cross build can build moc as a separate cmake > project with host toolchain, and use it. Which is what I said. A separate build step that bootstraps the tools. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel System Software Products _______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
