IDE: using absolute paths for compiling, because some external tools resolve symlinked directories

git-svn-id: trunk@17643 -
This commit is contained in:
mattias 2008-12-01 10:53:42 +00:00
parent 35789f98bf
commit aa6a1cb30d
4 changed files with 10 additions and 7 deletions

View File

@ -391,8 +391,8 @@ begin
try
// create compiler command line options
CmdLineParams:=Options.MakeOptionsString(BogusFilename,nil,
[ccloAddVerboseAll,ccloDoNotAppendOutFileOption])
+' '+BogusFilename;
[ccloAddVerboseAll,ccloDoNotAppendOutFileOption,cclAbsolutePaths])
+' '+BogusFilename;
CompileTool:=TExternalToolOptions.Create;
CompileTool.Title:=dlgCCOTestToolCompilingEmptyFile;

View File

@ -2125,7 +2125,8 @@ begin
// inherited Linker options
if (not (ccloNoLinkerOpts in Flags)) then begin
InhLinkerOpts:=GetInheritedOption(icoLinkerOptions,true,coptParsed);
InhLinkerOpts:=GetInheritedOption(icoLinkerOptions,
not (cclAbsolutePaths in Flags),coptParsed);
if InhLinkerOpts<>'' then
switches := switches + ' ' + ConvertOptionsToCmdLine(' ','-k', InhLinkerOpts);
end;

View File

@ -9285,9 +9285,10 @@ begin
CompilerFilename:=Project1.GetCompilerFilename;
//DebugLn(['TMainIDE.DoBuildProject CompilerFilename="',CompilerFilename,'" CompilerPath="',Project1.CompilerOptions.CompilerPath,'"']);
// Note: use absolute paths, because some external tools resolve symlinked directories
CompilerParams :=
Project1.CompilerOptions.MakeOptionsString(SrcFilename,nil,[]) + ' ' +
PrepareCmdLineOption(SrcFilename);
Project1.CompilerOptions.MakeOptionsString(SrcFilename,nil,[cclAbsolutePaths])
+ ' ' + PrepareCmdLineOption(SrcFilename);
//DebugLn('TMainIDE.DoBuildProject WorkingDir="',WorkingDir,'" SrcFilename="',SrcFilename,'" CompilerFilename="',CompilerFilename,'" CompilerParams="',CompilerParams,'"');
// warn for ambiguous files

View File

@ -2851,9 +2851,10 @@ begin
SrcFilename:=APackage.GetSrcFilename;
CompilerFilename:=APackage.GetCompilerFilename;
// Note: use absolute paths, because some external tools resolve symlinked directories
CompilerParams:=APackage.CompilerOptions.MakeOptionsString(Globals,
APackage.CompilerOptions.DefaultMakeOptionsFlags)
+' '+CreateRelativePath(SrcFilename,APackage.Directory);
APackage.CompilerOptions.DefaultMakeOptionsFlags+[cclAbsolutePaths])
+' '+CreateRelativePath(SrcFilename,APackage.Directory);
//DebugLn(['TLazPackageGraph.CompilePackage SrcFilename="',SrcFilename,'" CompilerFilename="',CompilerFilename,'" CompilerParams="',CompilerParams,'" TargetCPU=',Globals.TargetCPU,' TargetOS=',Globals.TargetOS]);
// check if compilation is needed and if a clean build is needed