Browse Source

Add -Aas-clang for i386/x86_64 unix targets

Pierre Muller 2 years ago
parent
commit
513ba3c733
1 changed files with 30 additions and 0 deletions
  1. 30 0
      compiler/x86/agx86att.pas

+ 30 - 0
compiler/x86/agx86att.pas

@@ -521,6 +521,20 @@ interface
             dollarsign: '$';
           );
 
+       as_x86_64_clang_gas_info : tasminfo =
+          (
+            id     : as_clang_gas;
+            idtxt  : 'AS-CLANG';
+            asmbin : 'clang';
+            asmcmd : '-x assembler -c -target $TRIPLET -o $OBJ $EXTRAOPT -x assembler $ASM';
+            supported_targets : [system_x86_64_linux, system_x86_64_freebsd, system_x86_64_netbsd, system_x86_64_openbsd];
+            flags : [af_needar,af_smartlink_sections,af_supports_dwarf,af_llvm,af_supports_hlcfi];
+            labelprefix : '.L';
+            labelmaxlen : -1;
+            comment : '// ';
+            dollarsign: '$';
+          );
+
 {$else x86_64}
        as_i386_as_info : tasminfo =
           (
@@ -600,6 +614,20 @@ interface
             dollarsign: '$';
           );
 
+       as_i386_clang_gas_info : tasminfo =
+          (
+            id     : as_clang_gas;
+            idtxt  : 'AS-CLANG';
+            asmbin : 'clang';
+            asmcmd : '-x assembler -c -target $TRIPLET -o $OBJ $EXTRAOPT -x assembler $ASM';
+            supported_targets : [system_i386_linux, system_i386_freebsd, system_i386_netbsd, system_i386_openbsd];
+            flags : [af_needar,af_smartlink_sections,af_supports_dwarf,af_llvm,af_supports_hlcfi];
+            labelprefix : '.L';
+            labelmaxlen : -1;
+            comment : '// ';
+            dollarsign: '$';
+          );
+
        as_i386_gas_info : tasminfo =
           (
             id     : as_ggas;
@@ -641,6 +669,7 @@ initialization
   RegisterAssembler(as_x86_64_gas_info,Tx86ATTAssembler);
   RegisterAssembler(as_x86_64_gas_darwin_info,Tx86AppleGNUAssembler);
   RegisterAssembler(as_x86_64_clang_darwin_info,Tx86AppleGNUAssembler);
+  RegisterAssembler(as_x86_64_clang_gas_info,Tx86ATTAssembler);
   RegisterAssembler(as_x86_64_solaris_info,Tx86ATTAssembler);
 {$else x86_64}
   RegisterAssembler(as_i386_as_info,Tx86ATTAssembler);
@@ -648,6 +677,7 @@ initialization
   RegisterAssembler(as_i386_yasm_info,Tx86ATTAssembler);
   RegisterAssembler(as_i386_gas_darwin_info,Tx86AppleGNUAssembler);
   RegisterAssembler(as_i386_clang_darwin_info,Tx86AppleGNUAssembler);
+  RegisterAssembler(as_i386_clang_gas_info,Tx86ATTAssembler);
   RegisterAssembler(as_i386_as_aout_info,Tx86AoutGNUAssembler);
   RegisterAssembler(as_i386_solaris_info,Tx86ATTAssembler);
 {$endif x86_64}