Closed ahh closed 4 years ago
@ahh - thanks for your report, I'm looking now.
@ahh - this issue should be fixed now, I just had a 4
hanging out in the inline asm for no particular reason and gcc accepts it while clang doesn't.
Note that to build with clang, you should do it like:
CC=clang CXX=clang++ make
That is, you need clang++
for CXX
, not just clang
. Otherwise you'll get all sorts of link errors since CXX
is also used as the linker and clang
doesn't link the C++ runtime by default.
After this change, I was able to build the benchmark with clang (10) on my system.
Let me know how it goes!
Fix verified; builds for me now. (And you're right about clang++
, in many cases clang does a good enough job autodetecting that I rarely remember, but here it's necessary.)
Thanks!
in many cases clang does a good enough job autodetecting that I rarely remember, but here it's necessary.
Yeah it seems to auto-detect fine for compilation but for linking I think you need to call the right one or explicitly include the C++ libs.
Have fun with the benchmark!
Hey--I'm trying to build (on branch post1) using clang. (I'm on an odd system that has a truly ancient GCC.) Trying
CC=clang CXX=clang make
I got the following errors (many repetitions of this; edited for concision.)` clang -DNDEBUG -MMD -Wall -Wextra -Werror -O2 -g -march=haswell -Wno-unused-parameter -Wno-error=unused-variable -Wno-unknown-pragmas -std=c++14 -DENABLE_TIMER=1 -c -o basic-impls.o basic-impls.cpp