I found they build after enabling COMPILER_RT in devel/llvm-devel.
Details
Details
make buildworld with riscv64 and riscv64sf
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Sure. Were you able to test them? (I assume they compile, but not sure if it's easy to do a check if the stats libs work... :)
Comment Actions
How do I test it? I only tested build-time. I'm trying to compare to amd64, but even there I'm having issues. According to https://llvm.org/docs/ProgrammersManual.html#the-statistic-class-stats-option, I need Statistic.h, but this is not installed. And when using llvm13 from ports:
clang++13 -S -emit-llvm -I /usr/local/llvm13/include/ -I /usr/include/c++/v1 helloworld.c llc helloworld.ll clang++13 helloworld.s ld: error: undefined symbol: llvm::TrackingStatistic::RegisterStatistic() >>> referenced by helloworld.c >>> /tmp/helloworld-19b012.o:(llvm::TrackingStatistic::init()) clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
The file I use for testing is:
#include <iostream> #include <llvm/ADT/Statistic.h> #define DEBUG_TYPE "mypassname" // This goes after any #includes. STATISTIC(NumXForms, "The # of times I did stuff"); int main() { std::cout << "Hello, World!" << std::endl; ++NumXForms; // I did stuff! return 0; }
If I just try to use opt on ll file:
opt13 -stats -mypassname < helloworld.ll > /dev/null
I end up with:
opt: Unknown command line argument '-mypassname'. Try: '/usr/local/llvm13/bin/opt --help' opt: Did you mean '--metarenamer'?
This comment was removed by pkubaj.
Comment Actions
Ping.
In https://reviews.freebsd.org/D34735#793322 I showed how I tried to test it. Are stats broken on FreeBSD after all?