mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-21 20:29:35 +01:00
IDE: using absolute paths for compiling, because some external tools resolve symlinked directories
git-svn-id: trunk@17643 -
This commit is contained in:
parent
35789f98bf
commit
aa6a1cb30d
@ -391,7 +391,7 @@ begin
|
|||||||
try
|
try
|
||||||
// create compiler command line options
|
// create compiler command line options
|
||||||
CmdLineParams:=Options.MakeOptionsString(BogusFilename,nil,
|
CmdLineParams:=Options.MakeOptionsString(BogusFilename,nil,
|
||||||
[ccloAddVerboseAll,ccloDoNotAppendOutFileOption])
|
[ccloAddVerboseAll,ccloDoNotAppendOutFileOption,cclAbsolutePaths])
|
||||||
+' '+BogusFilename;
|
+' '+BogusFilename;
|
||||||
|
|
||||||
CompileTool:=TExternalToolOptions.Create;
|
CompileTool:=TExternalToolOptions.Create;
|
||||||
|
|||||||
@ -2125,7 +2125,8 @@ begin
|
|||||||
|
|
||||||
// inherited Linker options
|
// inherited Linker options
|
||||||
if (not (ccloNoLinkerOpts in Flags)) then begin
|
if (not (ccloNoLinkerOpts in Flags)) then begin
|
||||||
InhLinkerOpts:=GetInheritedOption(icoLinkerOptions,true,coptParsed);
|
InhLinkerOpts:=GetInheritedOption(icoLinkerOptions,
|
||||||
|
not (cclAbsolutePaths in Flags),coptParsed);
|
||||||
if InhLinkerOpts<>'' then
|
if InhLinkerOpts<>'' then
|
||||||
switches := switches + ' ' + ConvertOptionsToCmdLine(' ','-k', InhLinkerOpts);
|
switches := switches + ' ' + ConvertOptionsToCmdLine(' ','-k', InhLinkerOpts);
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -9285,9 +9285,10 @@ begin
|
|||||||
|
|
||||||
CompilerFilename:=Project1.GetCompilerFilename;
|
CompilerFilename:=Project1.GetCompilerFilename;
|
||||||
//DebugLn(['TMainIDE.DoBuildProject CompilerFilename="',CompilerFilename,'" CompilerPath="',Project1.CompilerOptions.CompilerPath,'"']);
|
//DebugLn(['TMainIDE.DoBuildProject CompilerFilename="',CompilerFilename,'" CompilerPath="',Project1.CompilerOptions.CompilerPath,'"']);
|
||||||
|
// Note: use absolute paths, because some external tools resolve symlinked directories
|
||||||
CompilerParams :=
|
CompilerParams :=
|
||||||
Project1.CompilerOptions.MakeOptionsString(SrcFilename,nil,[]) + ' ' +
|
Project1.CompilerOptions.MakeOptionsString(SrcFilename,nil,[cclAbsolutePaths])
|
||||||
PrepareCmdLineOption(SrcFilename);
|
+ ' ' + PrepareCmdLineOption(SrcFilename);
|
||||||
//DebugLn('TMainIDE.DoBuildProject WorkingDir="',WorkingDir,'" SrcFilename="',SrcFilename,'" CompilerFilename="',CompilerFilename,'" CompilerParams="',CompilerParams,'"');
|
//DebugLn('TMainIDE.DoBuildProject WorkingDir="',WorkingDir,'" SrcFilename="',SrcFilename,'" CompilerFilename="',CompilerFilename,'" CompilerParams="',CompilerParams,'"');
|
||||||
|
|
||||||
// warn for ambiguous files
|
// warn for ambiguous files
|
||||||
|
|||||||
@ -2851,8 +2851,9 @@ begin
|
|||||||
|
|
||||||
SrcFilename:=APackage.GetSrcFilename;
|
SrcFilename:=APackage.GetSrcFilename;
|
||||||
CompilerFilename:=APackage.GetCompilerFilename;
|
CompilerFilename:=APackage.GetCompilerFilename;
|
||||||
|
// Note: use absolute paths, because some external tools resolve symlinked directories
|
||||||
CompilerParams:=APackage.CompilerOptions.MakeOptionsString(Globals,
|
CompilerParams:=APackage.CompilerOptions.MakeOptionsString(Globals,
|
||||||
APackage.CompilerOptions.DefaultMakeOptionsFlags)
|
APackage.CompilerOptions.DefaultMakeOptionsFlags+[cclAbsolutePaths])
|
||||||
+' '+CreateRelativePath(SrcFilename,APackage.Directory);
|
+' '+CreateRelativePath(SrcFilename,APackage.Directory);
|
||||||
//DebugLn(['TLazPackageGraph.CompilePackage SrcFilename="',SrcFilename,'" CompilerFilename="',CompilerFilename,'" CompilerParams="',CompilerParams,'" TargetCPU=',Globals.TargetCPU,' TargetOS=',Globals.TargetOS]);
|
//DebugLn(['TLazPackageGraph.CompilePackage SrcFilename="',SrcFilename,'" CompilerFilename="',CompilerFilename,'" CompilerParams="',CompilerParams,'" TargetCPU=',Globals.TargetCPU,' TargetOS=',Globals.TargetOS]);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user