[LLVMdev] compiler-rt CMake build ignores CMAKE_CXX_FLAGS

Evgeniy Stepanov eugeni.stepanov at gmail.com
Mon Mar 24 23:38:46 PDT 2014


On Mon, Mar 24, 2014 at 5:26 PM, Alexey Samsonov <samsonov at google.com> wrote:
>
> On Mon, Mar 24, 2014 at 2:09 PM, Dmitri Gribenko <gribozavr at gmail.com>
> wrote:
>>
>> On Mon, Mar 24, 2014 at 9:49 AM, Alexey Samsonov <samsonov at google.com>
>> wrote:
>> > Submitted r204593.
>>
>> Thank you!  It did fix compiling the tests on the buildbot, but I am
>> surprised that linking succeeded.  Maybe that is because we are not
>> using any C++11 features that require symbols from the newer
>> libstdc++.  But it would be future-proof to change clang_link_shared()
>> to use CMAKE_CXX_FLAGS as well.
>
>
> Is there really a logic in Clang that would choose between old and newer
> libstdc++ versions
> depending on the value of -std= flag?
>
> I hope to get rid of clang_compile and clang_link_shared horridness soon by
> switching
> to LLVM_BUILD_EXTERNAL_COMPILER_RT=ON that would use just-built Clang to
> configure/build compiler-rt.
>
> So, your use case might be interesting. Can you build with
> -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON and
> check if "make check-compiler-rt" works for you? If not, then we'd have to
> propagate *some* CMAKE_CXX_FLAGS
> to configuration step of compiler-rt project, but we won't need most of the
> extra flags stuffed into CMAKE_CXX_FLAGS
> by LLVM/Clang CMake files. It might be a problem (sigh).

We might want to add CMAKE_TARGET_CXX_FLAGS in that case. Blindly
propagating flags would be wrong, because compiler-rt build could be
targetting a completely different platform.



More information about the llvm-dev mailing list