Skip to content

Commit 5b36835

Browse files
authored
[flang] Expose -m64 option (#132409)
Exposes `-m64` option for Flang. These options can be used to build libraries or tools (e.g. OpenBlas).
1 parent a6e61ce commit 5b36835

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4689,7 +4689,7 @@ def mqdsp6_compat : Flag<["-"], "mqdsp6-compat">, Group<m_Group>,
46894689
HelpText<"Enable hexagon-qdsp6 backward compatibility">,
46904690
MarshallingInfoFlag<LangOpts<"HexagonQdsp6Compat">>;
46914691
def m64 : Flag<["-"], "m64">, Group<m_Group>, Flags<[NoXarchOption]>,
4692-
Visibility<[ClangOption, CLOption, DXCOption]>;
4692+
Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>;
46934693
def maix64 : Flag<["-"], "maix64">, Group<m_Group>, Flags<[NoXarchOption]>;
46944694
def mx32 : Flag<["-"], "mx32">, Group<m_Group>, Flags<[NoXarchOption]>,
46954695
Visibility<[ClangOption, CLOption, DXCOption]>;

flang/test/Driver/m64-option.f90

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
! Check support of -m64.
2+
! RUN: %flang -target i386-pc-win32 -m64 -### - %s 2>&1 | FileCheck -check-prefix=M64 %s
3+
! RUN: %flang -target x86_64-linux-gnu -m64 -### - %s 2>&1 | FileCheck -check-prefix=M64 %s
4+
! RUN: %flang -target x86_64-unknown-windows -m64 -### - %s 2>&1 | FileCheck -check-prefix=M64 %s
5+
! RUN: %flang -target x86_64-unknown-macosx -m64 -### - %s 2>&1 | FileCheck -check-prefix=M64 %s
6+
7+
! M64: "-triple" "x86_64-{{.*}}"

0 commit comments

Comments
 (0)