This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] fix cxx-benchmarks target compilation
AbandonedPublic

Authored by ivafanas on Jul 10 2019, 10:23 AM.

Details

Summary

Proposal to fix command

make cxx-benchmarks

Now it produces the following error:

/home/ivafanas/Documents/clang/cl/llvm-project/libcxx/benchmarks/string.bench.cpp:78:32: error: inlining failed in call to always_inline ‘const char* getSmallString(DiffType)’: function body can be overwritten at link time
 TEST_ALWAYS_INLINE const char* getSmallString(DiffType D) {

Diff Detail

Event Timeline

ivafanas created this revision.Jul 10 2019, 10:23 AM

make cxx-benchmarks work for me, can you please explain what compiler you're using and exactly how you get the error?

ivafanas added a comment.EditedJul 13 2019, 3:20 AM

make cxx-benchmarks work for me, can you please explain what compiler you're using and exactly how you get the error?

Hi,

I use this:

mkdir cl2
cd cl2
git clone https://github.com/llvm/llvm-project.git 
cd llvm-project
mkdir build_release
cd build_release
cmake -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi" -DCMAKE_BUILD_TYPE=Release ../llvm
make cxx-benchmarks

After your question I've re-checked compiler using make VERBOSE=1 cxx-benchmarks command and it is g++ 7.4.0.

Seems like fix is irrelevant to clang. Sorry for the false report.

ivafanas abandoned this revision.May 15 2022, 9:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 15 2022, 9:28 PM