[PATCH] [libc++] Add support for cross compiling.

Jonathan Roelofs jonathan at codesourcery.com
Thu Jan 15 06:46:52 PST 2015

> libc++abi will need a similar one, so perhaps it should just be LLVM_CROSSCOMPILING? Do we already have such a thing? I need to take another look through how LLVM handles this.

LLVM_CROSSCOMPILING and LIBCXX{ABI}_CROSSCOMPILING should be fundamentally different things. The former would only apply when host!=build, whereas the latter, because libcxx{abi} is a runtime component, applies when host!=target.

> Another option would just be removing it entirely. I suppose setting a sysroot/toolchain is probably helpful for non-cross compiles as well

Yeah, there are valid use cases for this outside of cross compiles. I'd get rid of the guard.

It's awesome how terribly simple this is.


Comment at: test/CMakeLists.txt:26
@@ -25,1 +25,3 @@
+  option(LIBCXX_LIT_VARIANT "Configuration variant to use for LIT." "libcxx")
I think this might belong in a separate patch.



More information about the cfe-commits mailing list