CLion C++ '-oso_prefix,.' "path trimming" flag injected by the debug launcher fails linking (Linux/clang-17/mold) #6410
Labels
awaiting-maintainer
Awaiting review from Bazel team on issues
lang: c++
C++ rules integration
product: CLion
CLion plugin
Whle trying to learn Bazel with a simple project setup with Bazel/Clion I ran into this issue.
update:
oso_prefix
seems a non-standard Apple/Darwin-only linker flag #6410 (comment) introduced to fix debugging on MacOSA normal build/run of the main bazel target works fine, but the debug build fails to link because of the "path trimming" flags that get injected by default by the plugin. When I run the bazel command without the
-oso_prefix,.
part it links just fine, so when I enabledbazel.trim.absolute.path.disabled
in the registry, my project builds/runs/hits breakpoints per usual 🤷🏻♂️,so I'm not sure why this is done by default.This is on Ubuntu Linux with
clang-17
andmold
(as linker) configured as a custom blaze toolchain to leverageC++23
andlibc++
. That saidld
, andgold
also struggle with this linker flag, suggesting-oso_prefix,.
is not correct or universally supported. #6410 (comment)Or is there perhaps something wrong with my bazel project setup?intellij/clwb/src/com/google/idea/blaze/clwb/run/BlazeCidrRunConfigurationRunner.java
Lines 120 to 124 in 86e3129
bazel command:
clang command:
The text was updated successfully, but these errors were encountered: