[cfe-dev] [LLVMdev] RFC: Another go at a cross compiler config file. (with an example using clang to compile for Windows on Linux)

Stephen Kelly steveire at gmail.com
Tue Jan 13 14:44:18 PST 2015


David Chisnall wrote:

but actually using it as such with
> existing build systems is often painful because certain CFLAGS must be
> inserted into every call at a specific place to make sure that it picks up
> the right things.

Note that CMake has very good support for using clang as a cross compiler 
and will add the required flags.

 http://thread.gmane.org/gmane.comp.compilers.clang.devel/33435

 http://www.cmake.org/cmake/help/v3.0/manual/cmake-toolchains.7.html#cross-compiling

Note also that any time I've tried using the ubuntu packaged clang as a 
cross-compiler it has not worked. I talked to the package maintainer about 
that at one point, and using clang as a cross compiler was out of scope for 
his packages, so you have to not use those packages.

 https://bugs.launchpad.net/ubuntu/+source/clang/+bug/1181493

Thanks,

Steve.





More information about the cfe-dev mailing list