Strip ext from exe name passed to compiler option -o. This is to make change in lazconf.pp work with unpatched compilers

Patch/Contributed by ccrause

git-svn-id: trunk@62756 -
This commit is contained in:
martin 2020-03-12 14:21:14 +00:00
parent 9df6eea67a
commit 147cf21fef

View File

@ -2594,6 +2594,14 @@ var
tempsw+=c;
end;
function FixExeExtForEmbeddedCompiler(exename: string): string;
begin
if SameStr(TargetOS, 'embedded') then
Result := ChangeFileExt(exename, '')
else
Result := exename;
end;
begin
switches := '';
@ -3214,7 +3222,8 @@ begin
if not (ccloAbsolutePaths in Flags) then
CurTargetFilename := CreateRelativePath(CurTargetFilename, BaseDirectory);
if CurTargetFilename<>'' then
switches := switches + ' '+PrepareCmdLineOption('-o' + CurTargetFilename);
switches := switches + ' '+PrepareCmdLineOption('-o' +
FixExeExtForEmbeddedCompiler(CurTargetFilename));
end;
// append custom options as last, so they can override