Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Flang][Sanitizer] Support sanitizer flag for Flang Driver. #137759

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ampandey-1995
Copy link
Contributor

Flang Driver currently dosen't support option sanitizer flags such as '-fsanitize='. This patch currently supports enabling sanitizer flags for the flang driver apart from clang independently.

@llvmbot llvmbot added the clang Clang issues not falling into any other category label Apr 29, 2025
@llvmbot
Copy link
Member

llvmbot commented Apr 29, 2025

@llvm/pr-subscribers-clang

Author: Amit Kumar Pandey (ampandey-1995)

Changes

Flang Driver currently dosen't support option sanitizer flags such as '-fsanitize='. This patch currently supports enabling sanitizer flags for the flang driver apart from clang independently.


Full diff: https://github.com/llvm/llvm-project/pull/137759.diff

1 Files Affected:

  • (modified) clang/include/clang/Driver/Options.td (+1-1)
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index e69cd6b833c3a..cde9ff48a58ce 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -2309,7 +2309,7 @@ def fmemory_profile_use_EQ : Joined<["-"], "fmemory-profile-use=">,
 
 // Begin sanitizer flags. These should all be core options exposed in all driver
 // modes.
-let Visibility = [ClangOption, CC1Option, CLOption] in {
+let Visibility = [ClangOption, CC1Option, CLOption, FlangOption, FC1Option] in {
 
 def fsanitize_EQ : CommaJoined<["-"], "fsanitize=">, Group<f_clang_Group>,
                    MetaVarName<"<check>">,

@kiranchandramohan
Copy link
Contributor

Is enabling the flag sufficient? Is there additional work in the Frontend to make this flag and its options useful?

Flang Driver currently dosen't support option sanitizer flags such as
'-fsanitize='. This patch currently supports enabling sanitizer flags
for the flang driver apart from clang independently.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants