[PATCH] Make CMake files generated by the Autoconf build system relocatable.
Dan Liew
dan at su-root.co.uk
Mon Jun 29 14:24:33 PDT 2015
Hi,
I've attached a new version of the patch. It seems to work for me.
On 29 June 2015 at 12:22, Brad King <brad.king at kitware.com> wrote:
> On 06/29/2015 03:02 PM, Dan Liew wrote:
>> This patch makes the CMake files generated by the Autoconf build
>> system less fragile by making them relocatable. I also noticed some of
>> the targets were missing a dependency of the Makefile (e.g. the
>> LLVMExports.cmake was not regenerated when I changed the Makefile) so
>> I've added them.
>
> Good. It works for me. However, see the following comments.
>
> * Please remove the stray debugging code as shown in the hunk below.
Oops. Sorry
> * The number of get_filename_component calls technically needs
> to depend on the PROJ_cmake value. The default is
>
> PROJ_cmake := $(DESTDIR)$(PROJ_prefix)/share/llvm/cmake
>
> but the number of levels after $(PROJ_prefix) determines the number
> of get_filename_component calls needed.
In the attached patch I've tried to address this. The patch assumes
the portion of the path
after $(PROJ_prefix) contains no spaces.
> * I'm a little uncomfortable with the form of the IMPORTED_LOCATION
> property values: "${LLVM_LIBRARY_DIRS}/libNAME.a". The plural
> name "_DIRS" is typically used when the value can be a list.
> I'd rather have a temporary _LLVM_LIB_DIR that is computed and
> used long enough for LLVMExports and then unset like
> _LLVM_CMAKE_DIR. Its value can also be used to populate the
> public-facing LLVM_LIBRARY_DIRS list.
Yes I didn't like that much either. I've addressed this in the new patch
> Side note: I noticed that include/llvm/Config/llvm-config.h still
> hard-codes some paths and is not relocatable. I don't recall if
> any of those values is meant to be public-facing.
I don't know either. I don't really feel like fixing that.
Thanks,
Dan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: relocatable_cmake_files_for_autoconf_build_systemv2.patch
Type: text/x-patch
Size: 4053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150629/772dba53/attachment.bin>
More information about the llvm-commits
mailing list