Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
buildsupport
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
buildsupport
Commits
46e59cf1
Commit
46e59cf1
authored
Sep 15, 2017
by
Thanassis Tsiodras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Emit the environment variables per target, as set in the new ocarina_components.aadl
parent
8b666391
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
52 additions
and
15 deletions
+52
-15
ada/buildsupport.adb
ada/buildsupport.adb
+9
-1
ada/buildsupport_utils.adb
ada/buildsupport_utils.adb
+11
-0
ada/buildsupport_utils.ads
ada/buildsupport_utils.ads
+2
-0
ada/imported_routines.ads
ada/imported_routines.ads
+3
-1
c/c_ast_construction.c
c/c_ast_construction.c
+19
-12
c/vertical_transformation.c
c/vertical_transformation.c
+5
-0
include/c_ast_construction.h
include/c_ast_construction.h
+2
-1
include/my_types.h
include/my_types.h
+1
-0
No files found.
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
;
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment