Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a registry key to disable passing the extra compiler flags to Bazel when building a C/C++ target in debug mode. #4913

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

odisseus
Copy link
Contributor

@odisseus odisseus commented May 24, 2023

Checklist

  • I have filed an issue about this change and discussed potential changes with the maintainers.
  • I have received the approval from the maintainers to make this change.
  • This is not a stylistic, refactoring, or cleanup change.

Please note that the maintainers will not be reviewing this change until all checkboxes are ticked. See
the Contributions section in the README for more
details.

Discussion thread for this change

Issue number: #4113

Description of this change

@sgowroji sgowroji added product: CLion CLion plugin awaiting-review Awaiting review from Bazel team on PRs labels May 25, 2023
@@ -28,6 +28,7 @@
<moduleType id="BLAZE_CPP_MODULE" implementationClass="com.google.idea.blaze.clwb.BlazeCppModuleType"/>
<postStartupActivity implementation="com.google.idea.blaze.clwb.run.producers.NonBlazeProducerSuppressor"/>
<actionConfigurationCustomizer implementation="com.google.idea.blaze.plugin.ClwbHideMakeActions"/>
<registryKey defaultValue="false" description="Disable the extra debug flags in debug clang builds" key="bazel.clang.debug.extraflags.disabled"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This applies not only to clang builds, extraClangFlags variable contains only clang-specific flags, but extraDebugFlags applies to gdb, too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I shall rename the registry key.

…azel when building a C/C++ target in debug mode.
@tpasternak tpasternak merged commit ee0f1de into bazelbuild:master Jun 5, 2023
@odisseus odisseus deleted the issue-4113 branch June 5, 2023 14:03
@kekxv
Copy link

kekxv commented Feb 4, 2025

截屏2025-02-04 09 08 25

but when we enable it, debugging breakpoints stop working.

@tpasternak

@tpasternak
Copy link
Contributor

Well, indeed these flags are essential for paths lookup

@kekxv
Copy link

kekxv commented Feb 4, 2025

@tpasternak

I don't want to give up debugging mode, I just don't want to have to recompile every time.

#7267

@kekxv
Copy link

kekxv commented Feb 4, 2025

@tpasternak hi.
Can we provide a setting switch that, when enabled, uses debug mode for all run, debug, or sync commands?

For example:

.bazelrc

bazel --enable-debug

or .env file?

@mai93
Copy link
Collaborator

mai93 commented Feb 4, 2025

cc @LeFrosch @ujohnny

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review Awaiting review from Bazel team on PRs product: CLion CLion plugin
Projects
Development

Successfully merging this pull request may close these issues.

5 participants