Description
On Linux, Drake's CMake logic tries to explicitly set the compiler to pass to Bazel via --repo_env
, a la:
Lines 293 to 298 in 62023e3
When compiling with CMAKE_{C|CXX}_COMPILER=/usr/bin/{cc|c++}
(default in many cases), Bazel's rules_cc
doesn't know to try and detect what the compiler actually is (gcc/clang). So the build will still be fine, but none of the Bazel logic specific to gcc or clang will be applied.
From a quick investigation, passing something like --repo_env=CC=$(realpath /usr/bin/cc)
doesn't quite do it. We already have a lot of CMake logic to parse the compiler type and version (mostly to warn about what is unsupported); that logic just needs an extra tweak to (try and) detect the appropriate underlying compiler to pass to Bazel.
Metadata
Metadata
Assignees
Type
Projects
Status