[PATCH] Make an llvm-config for cross-compilation

Ray Donnelly mingw.android at gmail.com
Mon Aug 26 16:24:50 PDT 2013


Hi,

I'd like you to consider the attached patch. I'm sure there needs to
be some discussion about it, and, if the idea and approach are deemed
ok to merge, then I might need some hand-holding for implementing the
same thing under the cmake build system (if llvm cross compilation is
a supported feature of the llvm cmake build system).

The commit message (formatted nicely for git I admit) would be:

<COMMIT_MSG>
Make an llvm-config for cross-compilation

The llvm-config-host program that was installed wasn't
host-related at all; it runs on build and also reports
about build. This program is still needed for the build
to work, so a new BuildToolsCross folder is created and
in there, an llvm-config is built that runs on build
and reports about host.

For this to work, the Makefile that generates llvm-config
and the one that generates BuildVariables.inc must not be
the same, so Makefile.buildvars is used, and an extra var
CROSS_DEPTH is used to enable BuildToolsCross to step one
folder higher up into the top-level build folder to get
the correct values to be emitted into BuildVariables.inc.

The old BuildTools/*/bin/llvm-config is now installed
as llvm-config-build, and the new one is installed as
llvm-config-host
</COMMIT_MSG>

Many thanks,

Ray Donnelly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-llvm-svn-llvm-config-build-host.patch
Type: application/octet-stream
Size: 7506 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130827/aa2e5e86/attachment.obj>


More information about the llvm-commits mailing list