mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-31 18:30:29 +02:00
Also generate FPC_HAS_FEATURE_XXX macros for programs, libraries and packages
git-svn-id: trunk@37732 -
This commit is contained in:
parent
c0a6715db2
commit
5780c608be
@ -1444,6 +1444,7 @@ type
|
||||
uu : tused_unit;
|
||||
module_name: ansistring;
|
||||
pentry: ppackageentry;
|
||||
feature : tfeature;
|
||||
begin
|
||||
Status.IsPackage:=true;
|
||||
Status.IsExe:=true;
|
||||
@ -1565,6 +1566,10 @@ type
|
||||
AddUnit('system',false);
|
||||
systemunit:=tglobalsymtable(symtablestack.top);
|
||||
load_intern_types;
|
||||
{ system unit is loaded, now insert feature defines }
|
||||
for feature:=low(tfeature) to high(tfeature) do
|
||||
if feature in features then
|
||||
def_system_macro('FPC_HAS_FEATURE_'+featurestr[feature]);
|
||||
end;
|
||||
|
||||
{Load the units used by the program we compile.}
|
||||
@ -1878,6 +1883,7 @@ type
|
||||
sc : array of TProgramParam;
|
||||
i : Longint;
|
||||
sysinitmod: tmodule;
|
||||
feature : tfeature;
|
||||
begin
|
||||
Status.IsLibrary:=IsLibrary;
|
||||
Status.IsPackage:=false;
|
||||
@ -2024,6 +2030,11 @@ type
|
||||
{ load system unit }
|
||||
loadsystemunit;
|
||||
|
||||
{ system unit is loaded, now insert feature defines }
|
||||
for feature:=low(tfeature) to high(tfeature) do
|
||||
if feature in features then
|
||||
def_system_macro('FPC_HAS_FEATURE_'+featurestr[feature]);
|
||||
|
||||
{ load standard units, e.g objpas,profile unit }
|
||||
loaddefaultunits;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user