mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 04:16:06 +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
|
||||
AddOptionsList: TFPList; // list of TAdditionalCompilerOptions
|
||||
p: TCompilerOptionsParseType;
|
||||
ParsedValue, UnparsedValue: String;
|
||||
begin
|
||||
if (fInheritedOptParseStamps<>CompilerParseStamp)
|
||||
then begin
|
||||
@ -2057,23 +2056,6 @@ begin
|
||||
end;
|
||||
AddOptionsList.Free;
|
||||
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;
|
||||
end;
|
||||
Result:=fInheritedOptions[Parsed][Option];
|
||||
@ -3820,6 +3802,7 @@ var
|
||||
Opts: TBaseCompilerOptions;
|
||||
VarName: String;
|
||||
Vars: TCTCfgScriptVariables;
|
||||
MoreOptions: String;
|
||||
begin
|
||||
Result:=Values[Option].UnparsedValue;
|
||||
Opts:=nil;
|
||||
@ -3843,7 +3826,19 @@ begin
|
||||
pcosLinkerOptions:
|
||||
Result:=MergeLinkerOptions(Result,Vars[VarName]);
|
||||
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:
|
||||
if Vars.IsDefined(PChar(VarName)) then
|
||||
Result:=GetForcedPathDelims(Vars[VarName]);
|
||||
|
Loading…
Reference in New Issue
Block a user