mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 16:39:24 +01:00 
			
		
		
		
	* make DoPipe() a method of TExternalAssembler and use it in
TAArch64AppleAssembler to determine whether we have to add extra
    parameters to support assembling via a pipe ("as" is a symlink to
    clang for Arch64 on OS X, and needs to be explicitly told its going to
    receive assembler code from standard input)
git-svn-id: trunk@29952 -
			
			
This commit is contained in:
		
							parent
							
								
									1edd3ac511
								
							
						
					
					
						commit
						bb1274a8ee
					
				@ -41,6 +41,7 @@ unit agcpugas;
 | 
			
		||||
 | 
			
		||||
      TAArch64AppleAssembler=class(TAppleGNUassembler)
 | 
			
		||||
        constructor create(smart: boolean); override;
 | 
			
		||||
        function MakeCmdLine: TCmdStr; override;
 | 
			
		||||
      end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -77,6 +78,18 @@ unit agcpugas;
 | 
			
		||||
        InstrWriter := TAArch64InstrWriter.create(self);
 | 
			
		||||
      end;
 | 
			
		||||
 | 
			
		||||
    function TAArch64AppleAssembler.MakeCmdLine: TCmdStr;
 | 
			
		||||
      begin
 | 
			
		||||
        { 'as' calls through to clang for aarch64, and that one only supports
 | 
			
		||||
          reading from standard input in case "-" is specified as input file
 | 
			
		||||
          (in which case you also have to specify the language via -x) }
 | 
			
		||||
        result:=inherited;
 | 
			
		||||
{$ifdef hasunix}
 | 
			
		||||
        if DoPipe then
 | 
			
		||||
          result:=result+' -x assembler -'
 | 
			
		||||
{$endif}
 | 
			
		||||
      end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{****************************************************************************}
 | 
			
		||||
{                  Helper routines for Instruction Writer                    }
 | 
			
		||||
 | 
			
		||||
@ -83,6 +83,7 @@ interface
 | 
			
		||||
        lastsectype : TAsmSectionType;
 | 
			
		||||
        procedure WriteSourceLine(hp: tailineinfo);
 | 
			
		||||
        procedure WriteTempalloc(hp: tai_tempalloc);
 | 
			
		||||
        Function DoPipe:boolean;
 | 
			
		||||
      public
 | 
			
		||||
        {# Returns the complete path and executable name of the assembler
 | 
			
		||||
           program.
 | 
			
		||||
@ -271,7 +272,7 @@ Implementation
 | 
			
		||||
                                 TExternalAssembler
 | 
			
		||||
*****************************************************************************}
 | 
			
		||||
 | 
			
		||||
    Function DoPipe:boolean;
 | 
			
		||||
    Function TExternalAssembler.DoPipe:boolean;
 | 
			
		||||
      begin
 | 
			
		||||
        DoPipe:=(cs_asm_pipe in current_settings.globalswitches) and
 | 
			
		||||
                (([cs_asm_extern,cs_asm_leave,cs_link_on_target] * current_settings.globalswitches) = []) and
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user