How to use clang++ instead g++ in Bazel
I want to use clang++ instead of g++ to compile my C++ files while g++ is the system's default compiler. I have tried sudo update-alternatives --install c++ c++ /home/guo/bin/clang++ 100 and set CC environment. But they don't work. Bazel still uses g++ as compiler. After an hour, Bazel uses clang++. But an error occurred. ERROR: /home/guo/utils/lib/BUILD:2:1: C++ compilation of rule '//utils/lib:get_pdf' failed: linux-sandbox failed: error executing command /home/guo/.cache/bazel/_bazel_guo/d2d93a82f24e8dc5485ac1b29928428e/execroot/_bin/linux-sandbox ... (remaining 41 argument(s) skipped). src
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.