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

[CIR][Lowering][debuginfo] Disable debug info if -g is not specified #1145

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

PikachuHyA
Copy link
Collaborator

@PikachuHyA PikachuHyA commented Nov 20, 2024

Fix #793

@PikachuHyA PikachuHyA force-pushed the disable_debug_info branch 2 times, most recently from a3a9d5b to ee7d0dc Compare November 20, 2024 17:31
@smeenai
Copy link
Collaborator

smeenai commented Nov 20, 2024

Hmm. Switching from %clang_cc1 to %clang is potentially problematic, because the extra flags added by the driver might change results in undesirable ways. How much of a pain is it to update the checks in those tests instead? We can also figure out what the driver translates -g into and pass that to %clang_cc1.

@PikachuHyA
Copy link
Collaborator Author

Hmm. Switching from %clang_cc1 to %clang is potentially problematic, because the extra flags added by the driver might change results in undesirable ways. How much of a pain is it to update the checks in those tests instead?

all tests updated without changing %clang_cc1 to %clang

We can also figure out what the driver translates -g into and pass that to %clang_cc1.

replace -g with -debug-info-kind=constructor -dwarf-version=4. it works.

Copy link
Collaborator

@seven-mile seven-mile left a comment

Choose a reason for hiding this comment

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

Thanks for digging this out! This seems to be the correct approach.

@bcardosolopes bcardosolopes merged commit 1b052da into llvm:main Nov 27, 2024
6 checks passed
@PikachuHyA PikachuHyA deleted the disable_debug_info branch November 27, 2024 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debug info should not be emitted when -g is not specified
4 participants