[libcxx] [libcxxabi] Improve cmake scripts

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[libcxx] [libcxxabi] Improve cmake scripts

Neil Nelson via cfe-dev
Hi,

I'm trying to build a C++ runtime stack composed of libcxx, libcxxabi and libunwind on Linux, out of the LLVM tree. It is pretty smooth once you find out the right options to use, which are not mentioned on the official pages.

But there's still something I find a bit annoying and could be easily fixed in the cmake scripts:

- When building libcxx, you can specify locations of libcxxabi's headers and library file respectively via LIBCXX_CXX_ABI_INCLUDE_PATHS and LIBCXX_CXX_ABI_LIBRARY_PATH. But somehow LIBCXX_CXX_ABI_LIBRARY_PATH is not parsed properly in the cmake script and you can't set it to a relative path; while you can set LIBCXX_CXX_ABI_INCLUDE_PATHS to either relative or absolute paths. This looks inconsistent to me, and can be trivially fixed.

- When building libcxxabi, you can specify the location of libunwind's headers via LIBCXXABI_LIBUNWIND_PATH, but have nowhere to specify the location of its library file; thus I have to manually set CMAKE_SHARED_LINKER_FLAGS to include this path. Again this looks inconsistent, and could be fixed by introducing a similar variable named LIBCXXABI_LIBUWIND_LIBRARY_PATH.


These are not big problems. I just feel like making the cmake options look more consistent, and the fix is really trivial. I include the experimental patches that I use and it's just a few lines of change.


Thanks!
Lei

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

libcxx.diff (722 bytes) Download Attachment
libcxxabi.diff (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [libcxx] [libcxxabi] Improve cmake scripts

Neil Nelson via cfe-dev
Hi,

Just to be clear, you are building libcxx/libcxxabi and libunwind out-of-tree right? I normally do in-tree builds and don't see any of these problems on Linux.

I think it would be easiest if you raise defects (see for example [1,2]) and attach your patches there.

I agree that we should improve the build scripts to make them work out-of-the-box.

/ Asiri


On Wed, May 25, 2016 at 12:49 PM, Lei Zhang via cfe-dev <[hidden email]> wrote:
Hi,

I'm trying to build a C++ runtime stack composed of libcxx, libcxxabi and libunwind on Linux, out of the LLVM tree. It is pretty smooth once you find out the right options to use, which are not mentioned on the official pages.

But there's still something I find a bit annoying and could be easily fixed in the cmake scripts:

- When building libcxx, you can specify locations of libcxxabi's headers and library file respectively via LIBCXX_CXX_ABI_INCLUDE_PATHS and LIBCXX_CXX_ABI_LIBRARY_PATH. But somehow LIBCXX_CXX_ABI_LIBRARY_PATH is not parsed properly in the cmake script and you can't set it to a relative path; while you can set LIBCXX_CXX_ABI_INCLUDE_PATHS to either relative or absolute paths. This looks inconsistent to me, and can be trivially fixed.

- When building libcxxabi, you can specify the location of libunwind's headers via LIBCXXABI_LIBUNWIND_PATH, but have nowhere to specify the location of its library file; thus I have to manually set CMAKE_SHARED_LINKER_FLAGS to include this path. Again this looks inconsistent, and could be fixed by introducing a similar variable named LIBCXXABI_LIBUWIND_LIBRARY_PATH.


These are not big problems. I just feel like making the cmake options look more consistent, and the fix is really trivial. I include the experimental patches that I use and it's just a few lines of change.


Thanks!
Lei

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [libcxx] [libcxxabi] Improve cmake scripts

Neil Nelson via cfe-dev
2016-05-25 19:58 GMT+08:00 Asiri Rathnayake <[hidden email]>:

Just to be clear, you are building libcxx/libcxxabi and libunwind out-of-tree right? I normally do in-tree builds and don't see any of these problems on Linux.

Yes, I'm building them out of tree.
 

I think it would be easiest if you raise defects (see for example [1,2]) and attach your patches there.

Thanks for the pointer! Will do.
 

I agree that we should improve the build scripts to make them work out-of-the-box.

Actually besides those mentioned, I also noticed some other suspicious settings in the cmake scripts; I'm just too lazy to investigate them all... It would be great if some insider could overhaul the scripts thus making the building experience even smoother :)

BTW, the tutorials on the official pages could be improved, too.


Lei

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [libcxx] [libcxxabi] Improve cmake scripts

Neil Nelson via cfe-dev
Actually besides those mentioned, I also noticed some other suspicious settings in the cmake scripts; I'm just too lazy to investigate them all... It would be great if some insider could overhaul the scripts thus making the building experience even smoother :)

There are only a very few "insiders" (I'm not one). So, patches welcome! ;-)

/ Asiri

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev