[clang] [flang] [flang] Expose -m32 and -m64 options (PR #132409)

Tarun Prabhu via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 26 16:17:39 PDT 2025


================
@@ -0,0 +1,4 @@
+! Check support of -m64.
+! RUN: %flang -target i386-pc-win32 -m64 -### - %s 2>&1 | FileCheck -check-prefix=M64 %s
+
+! M64: "-triple" "{{[^-]+}}64-{{.*}}"
----------------
tarunprabhu wrote:

If the `-target` is given as `i386-*`, this should always return `x86_64-*` (the option is handled in the frontend [here](https://github.com/llvm/llvm-project/blob/26bc1c6058d0af952de3073dcc9e710b4ba256aa/clang/lib/Driver/Driver.cpp#L719) which calls [this](https://github.com/llvm/llvm-project/blob/26bc1c6058d0af952de3073dcc9e710b4ba256aa/llvm/lib/TargetParser/Triple.cpp#L1899)). 

It may be clearer to check for that instead of using a regex. I don't think this is something that is likely to change.

Otherwise, LGTM. Thanks for the changes :-)

https://github.com/llvm/llvm-project/pull/132409


More information about the cfe-commits mailing list