diff options
author | David Spickett <david.spickett@linaro.org> | 2024-02-13 03:53:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-12 21:53:13 -0600 |
commit | 282637dd0f9df5f369b5245b7538e8ce3964d56a (patch) | |
tree | 28259524b4c990a186d31b1f581c546a9ea7e0e1 /lib/compilers/argument-parsers.ts | |
parent | c8f0409c250c9a43b72d91462dae796ebba77f9c (diff) | |
download | compiler-explorer-282637dd0f9df5f369b5245b7538e8ce3964d56a.tar.gz compiler-explorer-282637dd0f9df5f369b5245b7538e8ce3964d56a.zip |
flang: Enable the Intel asm syntax option (#6128)gh-10613
flang-new doesn't support `-masm=intel` (though it seems likely it
eventually will), so this uses `-mllvm ...` to achieve the same thing.
flang-to-external-fc is a wrapper script that will be removed once
flang-new becomes flang, so it is not being updated and won't support
-masm or -mllvm ever.
(and you'll get the same output by choosing a gfortran compiler, since
that's what the script uses for codegen)
Diffstat (limited to 'lib/compilers/argument-parsers.ts')
-rw-r--r-- | lib/compilers/argument-parsers.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/compilers/argument-parsers.ts b/lib/compilers/argument-parsers.ts index 638fea2a3..efe5a70a9 100644 --- a/lib/compilers/argument-parsers.ts +++ b/lib/compilers/argument-parsers.ts @@ -1031,6 +1031,13 @@ export class FlangParser extends ClangParser { compiler.compiler.irArg = ['-emit-llvm']; compiler.compiler.minIrArgs = ['-emit-llvm']; } + + // flang-new supports -mllvm, flang-to-external-fc does not. + if (this.hasSupport(options, '-mllvm')) { + // flang doesn't support -masm, but the llvm equivalent does work. + compiler.compiler.supportsIntel = true; + compiler.compiler.intelAsm = '-mllvm -x86-asm-syntax=intel'; + } } static override hasSupport(options, param) { |