This is an archive of the discontinued LLVM Phabricator instance.

Pass CMAKE_C_FLAGS to the custom libc++ build too
Needs RevisionPublic

Authored by azharudd on Jul 16 2018, 12:23 PM.

Details

Summary

When cross-compiling, flags which are passed to the compiler-rt build should be
passed to the custom libc++ build too.

Diff Detail

Event Timeline

azharudd created this revision.Jul 16 2018, 12:23 PM

What about C++ flags? libc++ is a C++ library so those are likely going to be important as well. Rather than lumping both C and C++ flags together into a single variable, we should probably consider adding two new keyword arguments to add_custom_libcxx, CMAKE_C_FLAGS and CMAKE_CXX_FLAGS, and use those to pass C and C++ flags separately to libc++ build.

What about C++ flags? libc++ is a C++ library so those are likely going to be important as well. Rather than lumping both C and C++ flags together into a single variable, we should probably consider adding two new keyword arguments to add_custom_libcxx, CMAKE_C_FLAGS and CMAKE_CXX_FLAGS, and use those to pass C and C++ flags separately to libc++ build.

That sounds reasonable. Current code doesn't deal with any C or C++ specific flags -- its primarily the target arch flags. I'll update this to handle the C/C++ flags. Thanks.

vitalybuka requested changes to this revision.Aug 8 2018, 2:02 PM

waiting for promised update

This revision now requires changes to proceed.Aug 8 2018, 2:02 PM