mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-11 10:58:23 +02:00
* Endianness
git-svn-id: trunk@47743 -
This commit is contained in:
parent
07819e0115
commit
7f2c8857da
@ -51,6 +51,7 @@ Type
|
||||
FCPUTarget: String;
|
||||
FDefaultPackageName: String;
|
||||
FEmitNotes: Boolean;
|
||||
FEndianNess: String;
|
||||
FFormat: String;
|
||||
FHidePrivate: Boolean;
|
||||
FHideProtected: Boolean;
|
||||
@ -69,6 +70,7 @@ Type
|
||||
Published
|
||||
Property OSTarget : String Read FOSTarget Write FOStarget;
|
||||
Property CPUTarget : String Read FCPUTarget Write FCPUTarget;
|
||||
Property EndianNess : String Read FEndianNess Write FEndianNess;
|
||||
Property Language : String Read FLanguage Write fLanguage;
|
||||
Property Backend : String Read FFormat Write FFormat;
|
||||
Property BackendOptions : TStrings Read FBackEndoptions Write SetBackendOptions;
|
||||
@ -81,6 +83,7 @@ Type
|
||||
Property DefaultPackageName : String Read FDefaultPackageName Write FDefaultPackageName;
|
||||
Property DontTrim : Boolean Read FDontTrim Write FDontTrim;
|
||||
Property EmitNotes : Boolean Read FEmitNotes Write FEmitNotes;
|
||||
|
||||
end;
|
||||
|
||||
{ TFPDocProject }
|
||||
|
@ -12,6 +12,11 @@ const
|
||||
DefCPUTarget = {$I %FPCTARGETCPU%};
|
||||
DefFPCVersion = {$I %FPCVERSION%};
|
||||
DefFPCDate = {$I %FPCDATE%};
|
||||
{$IFDEF FPC_BIG_ENDIAN}
|
||||
DefEndianNess = 'FPC_BIG_ENDIAN';
|
||||
{$ELSE}
|
||||
DefEndianNess = 'FPC_LITTLE_ENDIAN';
|
||||
{$ENDIF}
|
||||
|
||||
Type
|
||||
|
||||
@ -126,7 +131,7 @@ begin
|
||||
SplitInputFIleOption(S,UN,Opts);
|
||||
if CompareText(ChangeFileExt(ExtractFileName(Un),''),AUnitName)=0 then
|
||||
begin
|
||||
AInputFile:=FixInputFile(UN)+' '+Opts;
|
||||
AInputFile:=FixInputFile(UN)+' '+Opts+' -d'+Options.EndianNess;
|
||||
OSTarget:=FProject.Options.OSTarget;
|
||||
CPUTarget:=FProject.Options.CPUTarget;
|
||||
FProcessedUnits.Add(UN);
|
||||
@ -197,6 +202,7 @@ begin
|
||||
FProject.Options.StopOnParseError:=False;
|
||||
FProject.Options.CPUTarget:=DefCPUTarget;
|
||||
FProject.Options.OSTarget:=DefOSTarget;
|
||||
FProject.Options.EndianNess:=DefEndianNess;
|
||||
FProcessedUnits:=TStringList.Create;
|
||||
FProjectMacros:=TStringList.Create;
|
||||
end;
|
||||
@ -243,7 +249,8 @@ begin
|
||||
Free;
|
||||
end;
|
||||
// Output content files
|
||||
Writeln('Content file : ',APackage.ContentFile);
|
||||
if FVerbose then
|
||||
DoLog('Content file : '+APackage.ContentFile);
|
||||
if Length(APackage.ContentFile) > 0 then
|
||||
Engine.WriteContentFile(APackage.ContentFile);
|
||||
end;
|
||||
@ -292,13 +299,15 @@ begin
|
||||
try
|
||||
// get options from input packages
|
||||
SplitInputFileOption(APackage.Inputs[i],Cmd,Arg);
|
||||
arg:=Arg+' -d'+Options.EndianNess;
|
||||
// make absolute filepath
|
||||
Cmd:=FixInputFile(Cmd);
|
||||
if FProcessedUnits.IndexOf(Cmd)=-1 then
|
||||
begin
|
||||
FProcessedUnits.Add(Cmd);
|
||||
|
||||
// Parce sources for OS Target
|
||||
//WriteLn(Format('Parcing unit: %s', [ExtractFilenameOnly(Cmd)]));
|
||||
//WriteLn(Format('Parsing unit: %s', [ExtractFilenameOnly(Cmd)]));
|
||||
ParseSource(Engine,Cmd+' '+Arg, Options.OSTarget, Options.CPUTarget,[poUseStreams]);
|
||||
end;
|
||||
except
|
||||
|
Loading…
Reference in New Issue
Block a user