Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
buildsupport
Compare Revisions
8b66639159b30e991050517ee6f0385b3a5c7533...46e59cf19cc2a3fe005ba5bd1f71e8507e45b0dc
Commits (1)
Emit the environment variables per target, as set in the new ocarina_components.aadl
· 46e59cf1
Thanassis Tsiodras
authored
Sep 15, 2017
46e59cf1
Hide whitespace changes
Inline
Side-by-side
ada/buildsupport.adb
View file @
46e59cf1
...
...
@@ -1094,6 +1094,7 @@ procedure BuildSupport is
if
Get_Category_Of_Component
(
Tmp_CI
)
=
CC_Process
then
declare
Node_Coverage
:
Boolean
:=
False
;
Env_Vars
:
Name_Id
:=
No_Name
;
begin
if
Is_Defined_Property
(
Tmp_CI
,
"taste_dv_properties::coverageenabled"
)
...
...
@@ -1109,6 +1110,7 @@ procedure BuildSupport is
end
if
;
CPU
:=
Get_Bound_Processor
(
Tmp_CI
);
Env_Vars
:=
Get_Env_Vars
(
CPU
);
Set_Str_To_Name_Buffer
(
""
);
CPU_Name
:=
Name
(
Identifier
(
Parent_Subcomponent
(
CPU
)));
...
...
@@ -1141,7 +1143,13 @@ procedure BuildSupport is
Get_Name_String
(
CPU_Classifier
),
Get_Name_String
(
CPU_Classifier
)'
Length
,
Supported_Execution_Platform
'
Image
(
CPU_Platform
),
Supported_Execution_Platform
'
Image
(
CPU_Platform
)'
Length
);
Supported_Execution_Platform
'
Image
(
CPU_Platform
)'
Length
,
(
if
Env_Vars
/=
No_Name
then
Get_Name_String
(
Env_Vars
)
else
""
),
(
if
Env_Vars
/=
No_Name
then
Get_Name_String
(
Env_Vars
)'
Length
else
0
));
C_New_Process
(
Get_Name_String
...
...
ada/buildsupport_utils.adb
View file @
46e59cf1
...
...
@@ -224,6 +224,17 @@ package body Buildsupport_Utils is
return
Get_String_Property
(
D
,
Interface_Name
);
end
Get_Interface_Name
;
------------------
-- Get_Env_Vars --
------------------
function
Get_Env_Vars
(
D
:
Node_Id
)
return
Name_Id
is
Interface_Name
:
constant
Name_id
:=
Get_String_Name
(
"envvars"
);
begin
return
Get_String_Property
(
D
,
Interface_Name
);
end
Get_Env_Vars
;
---------------------------
-- Get ASN.1 Module name --
---------------------------
...
...
ada/buildsupport_utils.ads
View file @
46e59cf1
...
...
@@ -83,6 +83,8 @@ package Buildsupport_Utils is
function
Get_Interface_Name
(
D
:
Node_Id
)
return
Name_Id
;
function
Get_Env_Vars
(
D
:
Node_Id
)
return
Name_Id
;
function
Get_ASN1_Module_Name
(
D
:
Node_Id
)
return
String
;
function
Get_Properties_Map
(
D
:
Node_Id
)
return
Property_Maps
.
Map
;
...
...
ada/imported_routines.ads
View file @
46e59cf1
...
...
@@ -44,7 +44,9 @@ package Imported_Routines is
Classifier
:
String
;
Classifier_Len
:
Integer
;
Platform
:
String
;
Platform_Len
:
Integer
);
Platform_Len
:
Integer
;
EnvVars
:
String
;
EnvVars_Len
:
Integer
);
procedure
C_New_Bus
(
Name
:
String
;
Name_Len
:
Integer
;
...
...
c/c_ast_construction.c
View file @
46e59cf1
...
...
@@ -553,22 +553,29 @@ void New_Process(char *procname,
void
New_Processor
(
char
*
name
,
size_t
name_length
,
char
*
classifier
,
size_t
classifier_length
,
char
*
platform
,
size_t
platform_length
)
char
*
platform
,
size_t
platform_length
,
char
*
envvars
,
size_t
envvars_length
)
{
processor
=
malloc
(
sizeof
(
Processor
));
assert
(
NULL
!=
processor
);
processor
->
name
=
NULL
;
processor
->
classifier
=
NULL
;
processor
->
platform_name
=
NULL
;
build_string
(
&
(
processor
->
name
),
name
,
name_length
);
build_string
(
&
(
processor
->
classifier
),
classifier
,
classifier_length
);
if
(
platform_length
>
0
)
{
build_string
(
&
(
processor
->
platform_name
),
platform
,
platform_length
);
}
processor
->
name
=
NULL
;
processor
->
classifier
=
NULL
;
processor
->
platform_name
=
NULL
;
processor
->
envvars
=
NULL
;
build_string
(
&
(
processor
->
name
),
name
,
name_length
);
build_string
(
&
(
processor
->
classifier
),
classifier
,
classifier_length
);
if
(
platform_length
>
0
)
{
build_string
(
&
(
processor
->
platform_name
),
platform
,
platform_length
);
}
if
(
envvars_length
>
0
)
{
build_string
(
&
(
processor
->
envvars
),
envvars
,
envvars_length
);
}
}
...
...
c/vertical_transformation.c
View file @
46e59cf1
...
...
@@ -816,6 +816,11 @@ void GenerateProcessImplementation(Process *p)
fprintf
(
nodes
,
" coverage"
);
}
fprintf
(
nodes
,
"
\n
"
);
/* Env vars per target */
if
(
(
p
->
cpu
!=
NULL
)
&&
(
p
->
cpu
->
envvars
!=
NULL
)
)
fprintf
(
nodes
,
"envvars %s
\n
"
,
p
->
cpu
->
envvars
);
FOREACH
(
b
,
Aplc_binding
,
p
->
bindings
,
{
fprintf
(
nodes
,
"%s
\n
"
,
b
->
fv
->
name
);
});
...
...
include/c_ast_construction.h
View file @
46e59cf1
...
...
@@ -32,7 +32,8 @@ void New_Drivers_Section();
void
End_Drivers_Section
();
void
New_Processor
(
char
*
name
,
size_t
name_length
,
char
*
classifier
,
size_t
classifier_length
,
char
*
platform
,
size_t
platform_length
);
char
*
platform
,
size_t
platform_length
,
char
*
envvars
,
size_t
envvars_length
);
void
New_Process
(
char
*
,
size_t
,
char
*
,
size_t
,
char
*
,
size_t
,
bool
);
void
Set_OutDir
(
char
*
o
,
size_t
len
);
void
Set_Interfaceview
(
char
*
name
,
size_t
len
);
...
...
include/my_types.h
View file @
46e59cf1
...
...
@@ -265,6 +265,7 @@ typedef struct t_processor {
char
*
name
;
char
*
classifier
;
char
*
platform_name
;
char
*
envvars
;
}
Processor
;
/*
...
...