mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 11:16:09 +02:00
IDE/lazbuild: append project/global additions to custom compiler options as last
git-svn-id: trunk@48396 -
This commit is contained in:
parent
5e498c6211
commit
1a28636b9e
@ -2041,7 +2041,6 @@ function TBaseCompilerOptions.GetInheritedOption(
|
|||||||
var
|
var
|
||||||
AddOptionsList: TFPList; // list of TAdditionalCompilerOptions
|
AddOptionsList: TFPList; // list of TAdditionalCompilerOptions
|
||||||
p: TCompilerOptionsParseType;
|
p: TCompilerOptionsParseType;
|
||||||
ParsedValue, UnparsedValue: String;
|
|
||||||
begin
|
begin
|
||||||
if (fInheritedOptParseStamps<>CompilerParseStamp)
|
if (fInheritedOptParseStamps<>CompilerParseStamp)
|
||||||
then begin
|
then begin
|
||||||
@ -2057,23 +2056,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
AddOptionsList.Free;
|
AddOptionsList.Free;
|
||||||
end;
|
end;
|
||||||
// add project additions
|
|
||||||
if Assigned(OnAppendCustomOption) then begin
|
|
||||||
UnparsedValue:='';
|
|
||||||
OnAppendCustomOption(Self,UnparsedValue,bmgtAll);
|
|
||||||
if Assigned(ParsedOpts.OnLocalSubstitute) then
|
|
||||||
begin
|
|
||||||
//DebugLn(['TParsedCompilerOptions.DoParseOption local "',ParsedValue,'" ...']);
|
|
||||||
ParsedValue:=ParsedOpts.OnLocalSubstitute(UnparsedValue,false);
|
|
||||||
end else
|
|
||||||
ParsedValue:=UnparsedValue;
|
|
||||||
ParsedValue:=SpecialCharsToSpaces(ParsedValue,true);
|
|
||||||
UnparsedValue:=SpecialCharsToSpaces(UnparsedValue,true);
|
|
||||||
fInheritedOptions[coptParsed][icoCustomOptions]:=
|
|
||||||
MergeCustomOptions(fInheritedOptions[coptParsed][icoCustomOptions],ParsedValue);
|
|
||||||
fInheritedOptions[coptUnparsed][icoCustomOptions]:=
|
|
||||||
MergeCustomOptions(fInheritedOptions[coptUnparsed][icoCustomOptions],UnparsedValue);
|
|
||||||
end;
|
|
||||||
fInheritedOptParseStamps:=CompilerParseStamp;
|
fInheritedOptParseStamps:=CompilerParseStamp;
|
||||||
end;
|
end;
|
||||||
Result:=fInheritedOptions[Parsed][Option];
|
Result:=fInheritedOptions[Parsed][Option];
|
||||||
@ -3820,6 +3802,7 @@ var
|
|||||||
Opts: TBaseCompilerOptions;
|
Opts: TBaseCompilerOptions;
|
||||||
VarName: String;
|
VarName: String;
|
||||||
Vars: TCTCfgScriptVariables;
|
Vars: TCTCfgScriptVariables;
|
||||||
|
MoreOptions: String;
|
||||||
begin
|
begin
|
||||||
Result:=Values[Option].UnparsedValue;
|
Result:=Values[Option].UnparsedValue;
|
||||||
Opts:=nil;
|
Opts:=nil;
|
||||||
@ -3843,7 +3826,19 @@ begin
|
|||||||
pcosLinkerOptions:
|
pcosLinkerOptions:
|
||||||
Result:=MergeLinkerOptions(Result,Vars[VarName]);
|
Result:=MergeLinkerOptions(Result,Vars[VarName]);
|
||||||
pcosCustomOptions:
|
pcosCustomOptions:
|
||||||
Result:=MergeCustomOptions(Result,Vars[VarName]);
|
begin
|
||||||
|
Result:=MergeCustomOptions(Result,Vars[VarName]);
|
||||||
|
// add project/global overrides
|
||||||
|
if (Owner is TBaseCompilerOptions) and Assigned(OnAppendCustomOption) then
|
||||||
|
begin
|
||||||
|
MoreOptions:='';
|
||||||
|
OnAppendCustomOption(Opts,MoreOptions,bmgtAll);
|
||||||
|
if Assigned(OnLocalSubstitute) then
|
||||||
|
MoreOptions:=OnLocalSubstitute(MoreOptions,false);
|
||||||
|
MoreOptions:=SpecialCharsToSpaces(MoreOptions,true);
|
||||||
|
Result:=MergeCustomOptions(Result,MoreOptions);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
pcosOutputDir,pcosCompilerPath:
|
pcosOutputDir,pcosCompilerPath:
|
||||||
if Vars.IsDefined(PChar(VarName)) then
|
if Vars.IsDefined(PChar(VarName)) then
|
||||||
Result:=GetForcedPathDelims(Vars[VarName]);
|
Result:=GetForcedPathDelims(Vars[VarName]);
|
||||||
|
Loading…
Reference in New Issue
Block a user