@@ -2230,13 +2230,21 @@ private sub hParseArgs( byval argc as integer, byval argv as zstring ptr ptr )
22302230 end if
22312231 end select
22322232
2233- '' -asm overrides the target's default
22342233 if ( fbc.asmsyntax >= 0 ) then
2234+ '' -asm only applies to x86 and x86_64
2235+ select case ( fbGetCpuFamily( ) )
2236+ case FB_CPUFAMILY_X86, FB_CPUFAMILY_X86_64
2237+ case else
2238+ errReportEx( FB_ERRMSG_ASMOPTIONGIVENFORNONX86, fbGetTargetId( ), - 1 )
2239+ end select
2240+
22352241 '' -gen gas only supports -asm intel
22362242 if ( (fbGetOption( FB_COMPOPT_BACKEND ) = FB_BACKEND_GAS) and _
22372243 (fbc.asmsyntax <> FB_ASMSYNTAX_INTEL) ) then
22382244 errReportEx( FB_ERRMSG_GENGASWITHOUTINTEL, "" , - 1 )
22392245 end if
2246+
2247+ '' -asm overrides the target's default
22402248 fbSetOption( FB_COMPOPT_ASMSYNTAX, fbc.asmsyntax )
22412249 end if
22422250
@@ -3231,7 +3239,7 @@ private sub hPrintOptions( )
32313239 print " @<file> Read more command line arguments from a file"
32323240 print " -a <file> Treat file as .o/.a input file"
32333241 print " -arch <type> Set target architecture (default: 486)"
3234- print " -asm att|intel Set asm format (-gen gcc)"
3242+ print " -asm att|intel Set asm format (-gen gcc|llvm, x86 or x86_64 only )"
32353243 print " -b <file> Treat file as .bas input file"
32363244 print " -c Compile only, do not link"
32373245 print " -C Preserve temporary .o files"
0 commit comments