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
C
clean-ide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
clean-ide
Commits
63d4e7b9
Commit
63d4e7b9
authored
Apr 08, 2019
by
johnvg@science.ru.nl
1
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/bytecode-prelinker'
parents
4c621b37
a721b565
Pipeline
#20781
passed with stage
in 57 seconds
Changes
12
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
59 additions
and
7 deletions
+59
-7
BatchBuild/IdeState.dcl
BatchBuild/IdeState.dcl
+1
-0
BatchBuild/IdeState.icl
BatchBuild/IdeState.icl
+5
-0
Ide/IdeState.dcl
Ide/IdeState.dcl
+1
-0
Ide/IdeState.icl
Ide/IdeState.icl
+5
-0
Ide/PmDialogues.icl
Ide/PmDialogues.icl
+3
-0
Ide/targetui.icl
Ide/targetui.icl
+16
-7
Pm/PmDriver.icl
Pm/PmDriver.icl
+19
-0
Pm/PmEnvironment.dcl
Pm/PmEnvironment.dcl
+1
-0
Pm/PmEnvironment.icl
Pm/PmEnvironment.icl
+4
-0
Pm/PmFiles.icl
Pm/PmFiles.icl
+1
-0
Pm/PmTypes.dcl
Pm/PmTypes.dcl
+1
-0
Pm/PmTypes.icl
Pm/PmTypes.icl
+2
-0
No files found.
BatchBuild/IdeState.dcl
View file @
63d4e7b9
...
...
@@ -67,6 +67,7 @@ getCurrentAbcOpt :: !*GeneralSt -> (!String,!*GeneralSt)
getCurrentBCgen
::
!*
GeneralSt
->
(!
String
,!*
GeneralSt
)
getCurrentBClink
::
!*
GeneralSt
->
(!
String
,!*
GeneralSt
)
getCurrentBCstrip
::
!*
GeneralSt
->
(!
String
,!*
GeneralSt
)
getCurrentBCprelink
::
!*
GeneralSt
->
(!
String
,!*
GeneralSt
)
getCurrentLink
::
!*
GeneralSt
->
(!
String
,!*
GeneralSt
)
getCurrentDynl
::
!*
GeneralSt
->
(!
String
,!*
GeneralSt
)
getCurrentVers
::
!*
GeneralSt
->
(!
Int
,!*
GeneralSt
)
...
...
BatchBuild/IdeState.icl
View file @
63d4e7b9
...
...
@@ -198,6 +198,11 @@ getCurrentBCstrip ps
#
(
ct
,
ps
)
=
accPLoc
(\
p
=:{
pm_targets
,
pm_curtarg
}->(
pm_targets
!!
pm_curtarg
,
p
))
ps
=
(
ct
.
target_bcstrip
,
ps
)
getCurrentBCprelink
::
!*
GeneralSt
->
(!
String
,!*
GeneralSt
)
getCurrentBCprelink
ps
#
(
ct
,
ps
)
=
accPLoc
(\
p
=:{
pm_targets
,
pm_curtarg
}->(
pm_targets
!!
pm_curtarg
,
p
))
ps
=
(
ct
.
target_bcprelink
,
ps
)
getCurrentLink
::
!*
GeneralSt
->
(!
String
,!*
GeneralSt
)
getCurrentLink
ps
#
(
ct
,
ps
)
=
accPLoc
(\
p
=:{
pm_targets
,
pm_curtarg
}->(
pm_targets
!!
pm_curtarg
,
p
))
ps
...
...
Ide/IdeState.dcl
View file @
63d4e7b9
...
...
@@ -183,6 +183,7 @@ getCurrentAbcOpt :: !*(PSt *General) -> (!String,!*PSt *General)
getCurrentBCgen
::
!*(
PSt
*
General
)
->
(!
String
,!*
PSt
*
General
)
getCurrentBClink
::
!*(
PSt
*
General
)
->
(!
String
,!*
PSt
*
General
)
getCurrentBCstrip
::
!*(
PSt
*
General
)
->
(!
String
,!*
PSt
*
General
)
getCurrentBCprelink
::
!*(
PSt
*
General
)
->
(!
String
,!*
PSt
*
General
)
getCurrentLink
::
!*(
PSt
*
General
)
->
(!
String
,!*
PSt
*
General
)
getCurrentDynl
::
!*(
PSt
*
General
)
->
(!
String
,!*
PSt
*
General
)
getCurrentVers
::
!*(
PSt
*
General
)
->
(!
Int
,!*
PSt
*
General
)
...
...
Ide/IdeState.icl
View file @
63d4e7b9
...
...
@@ -460,6 +460,11 @@ getCurrentBCstrip ps
#
(
ct
,
ps
)
=
accPLoc
(\
p
=:{
pm_targets
,
pm_curtarg
}->(
pm_targets
!!
pm_curtarg
,
p
))
ps
=
(
ct
.
target_bcstrip
,
ps
)
getCurrentBCprelink
::
!*(
PSt
*
General
)
->
(!
String
,!*
PSt
*
General
)
getCurrentBCprelink
ps
#
(
ct
,
ps
)
=
accPLoc
(\
p
=:{
pm_targets
,
pm_curtarg
}->(
pm_targets
!!
pm_curtarg
,
p
))
ps
=
(
ct
.
target_bcprelink
,
ps
)
getCurrentLink
::
!*(
PSt
*
General
)
->
(!
String
,!*
PSt
*
General
)
getCurrentLink
ps
#
(
ct
,
ps
)
=
accPLoc
(\
p
=:{
pm_targets
,
pm_curtarg
}->(
pm_targets
!!
pm_curtarg
,
p
))
ps
...
...
Ide/PmDialogues.icl
View file @
63d4e7b9
...
...
@@ -401,6 +401,9 @@ where
:+:
CheckControl
[(
"Keep bytecode symbols"
,
Nothing
,
toMark
lo
.
keep_bytecode_symbols
,
noPS
(\
l
->{
l
&
lo
.
keep_bytecode_symbols
=
not
l
.
lo
.
keep_bytecode_symbols
}))]
(
Columns
1
)
[
ControlPos
(
Left
,
zero
)]
:+:
CheckControl
[(
"Prelink bytecode"
,
Nothing
,
toMark
lo
.
prelink_bytecode
,
noPS
(\
l
->{
l
&
lo
.
prelink_bytecode
=
not
l
.
lo
.
prelink_bytecode
}))]
(
Columns
1
)
[
ControlPos
(
Left
,
zero
)]
:+:
TextControl
(
"Generate main bytecode file as: "
+++
bytecodepath
)
[
ControlId
bytecodepathId
,
ControlPos
(
Left
,
zero
):
if
actualProject
[]
[
ControlHide
]]
:+:
ButtonControl
"Set bytecode file..."
[
ControlFunction
setbytecodepath
,
ControlPos
(
Left
,
zero
):
if
actualProject
[]
[
ControlHide
]]
)
...
...
Ide/targetui.icl
View file @
63d4e7b9
...
...
@@ -425,6 +425,7 @@ editTargets getTs setTs ps
,
bcGenId
::
!
Id
// bytecode generator
,
bcLinkId
::
!
Id
// bytecode linker
,
bcStripId
::
!
Id
// bytecode stripper
,
bcPrelinkId
::
!
Id
// bytecode prelinker
}
envDialog
ap
pp
ts
ct
getTs
setTs
ps
...
...
@@ -483,7 +484,7 @@ envDialog ap pp ts ct getTs setTs ps
)
// selection update function
lbsllId
[
ControlViewSize
{
h
=
siz
.
Size
.
h
,
w
=
300
}]
#
([
compId
,
cgenId
,
linkId
,
dynlId
,
versId
,
methId
,
abcOptId
,
bcGenId
,
bcLinkId
,
bcStripId
:_],
ps
)
=
openIds
10
ps
#
([
compId
,
cgenId
,
linkId
,
dynlId
,
versId
,
methId
,
abcOptId
,
bcGenId
,
bcLinkId
,
bcStripId
,
bcPrelinkId
:_],
ps
)
=
openIds
11
ps
#
environmentSettingsIds
=
{
compId
=
compId
,
cgenId
=
cgenId
...
...
@@ -495,6 +496,7 @@ envDialog ap pp ts ct getTs setTs ps
,
bcGenId
=
bcGenId
,
bcLinkId
=
bcLinkId
,
bcStripId
=
bcStripId
,
bcPrelinkId
=
bcPrelinkId
}
#
(
c1id
,
ps
)
=
openId
ps
#
(
c2id
,
ps
)
=
openId
ps
...
...
@@ -539,7 +541,7 @@ where
:+:
Pane
"Object Modules"
(
objmpane
inifull
lbobj
c4id
r4id
)
)
(
Columns
2
)
[
ControlPos
(
Left
,
zero
)]
buttons
wid
okId
cancelId
getTs
setTs
ct
ts
{
compId
,
cgenId
,
linkId
,
dynlId
,
versId
,
methId
,
abcOptId
,
bcGenId
,
bcLinkId
,
bcStripId
}
buttons
wid
okId
cancelId
getTs
setTs
ct
ts
{
compId
,
cgenId
,
linkId
,
dynlId
,
versId
,
methId
,
abcOptId
,
bcGenId
,
bcLinkId
,
bcStripId
,
bcPrelinkId
}
=
ButtonControl
"Done"
[
ControlFunction
savefun
,
ControlId
okId
,
ControlPos
(
Right
,
zero
)
...
...
@@ -590,13 +592,13 @@ where
=
abort
"Fatal error in environment dialog: window has disappeared."
#
wdef
=
fromJust
wdef
#
[(
ok1
,
comp
),(
ok2
,
cgen
),(
ok3
,
link
),(
ok4
,
dynl
),(
ok5
,
vers
),(
ok6
,
mnum
),
(
ok7
,
abcopt
),(
ok8
,
bcgen
),(
ok9
,
bclink
),(
ok10
,
bcstrip
):_]
=
getControlTexts
[
compId
,
cgenId
,
linkId
,
dynlId
,
versId
,
methId
,
abcOptId
,
bcGenId
,
bcLinkId
,
bcStripId
]
wdef
|
not
(
ok1
&&
ok2
&&
ok3
&&
ok4
&&
ok5
&&
ok6
&&
ok7
&&
ok8
&&
ok9
&&
ok10
)
(
ok7
,
abcopt
),(
ok8
,
bcgen
),(
ok9
,
bclink
),(
ok10
,
bcstrip
)
,(
ok11
,
bcprelink
)
:_]
=
getControlTexts
[
compId
,
cgenId
,
linkId
,
dynlId
,
versId
,
methId
,
abcOptId
,
bcGenId
,
bcLinkId
,
bcStripId
,
bcPrelinkId
]
wdef
|
not
(
ok1
&&
ok2
&&
ok3
&&
ok4
&&
ok5
&&
ok6
&&
ok7
&&
ok8
&&
ok9
&&
ok10
&&
ok11
)
=
abort
"Fatal error in environment dialog: controls have disappeared."
|
(
isNothing
comp
)
||
(
isNothing
cgen
)
||
(
isNothing
link
)
||
(
isNothing
dynl
)
||
(
isNothing
vers
)
||
(
isNothing
mnum
)
||
isNothing
abcopt
||
isNothing
bcgen
||
isNothing
bclink
||
isNothing
bcstrip
||
isNothing
abcopt
||
isNothing
bcgen
||
isNothing
bclink
||
isNothing
bcstrip
||
isNothing
bcprelink
=
abort
"Fatal error in environment dialog: controls are empty."
#
comp
=
fromJust
comp
#
cgen
=
fromJust
cgen
...
...
@@ -608,6 +610,7 @@ where
#
bcgen
=
fromJust
bcgen
#
bclink
=
fromJust
bclink
#
bcstrip
=
fromJust
bcstrip
#
bcprelink
=
fromJust
bcprelink
#
ls
=
{
ls
&
tg
.
target_comp
=
comp
...
...
@@ -619,6 +622,7 @@ where
,
tg
.
target_bcgen
=
bcgen
,
tg
.
target_bclink
=
bclink
,
tg
.
target_bcstrip
=
bcstrip
,
tg
.
target_bcprelink
=
bcprelink
}
#
ls
=
case
ls
.
tg
.
target_meth
of
(
CompileAsync
_)
->
{
ls
&
tg
.
target_meth
=
CompileAsync
(
toInt
mnum
)}
...
...
@@ -631,7 +635,7 @@ where
title
=
TextControl
"Environment Options"
[
ControlPos
(
Center
,
zero
)]
toolpane
tg
{
compId
,
cgenId
,
linkId
,
dynlId
,
versId
,
methId
,
abcOptId
,
bcGenId
,
bcLinkId
,
bcStripId
}
toolpane
tg
{
compId
,
cgenId
,
linkId
,
dynlId
,
versId
,
methId
,
abcOptId
,
bcGenId
,
bcLinkId
,
bcStripId
,
bcPrelinkId
}
=
TextControl
"Compiler: "
[
ControlWidth
textWidth
]
:+:
EditControl
tg
.
target_comp
(
PixelWidth
250
)
1
[
ControlId
compId
...
...
@@ -672,6 +676,11 @@ toolpane tg {compId,cgenId,linkId,dynlId,versId,methId,abcOptId,bcGenId,bcLinkId
[
ControlId
bcStripId
,
ControlActivate
(
noLS
(
appPIO
(
setEditControlSelection
bcStripId
1
0
)))
]
:+:
TextControl
"Bytecode Prelinker: "
[
ControlPos
(
Left
,
zero
),
ControlWidth
textWidth
]
:+:
EditControl
tg
.
target_bcprelink
(
PixelWidth
250
)
1
[
ControlId
bcPrelinkId
,
ControlActivate
(
noLS
(
appPIO
(
setEditControlSelection
bcPrelinkId
1
0
)))
]
:+:
TextControl
"ABC version: "
[
ControlPos
(
Left
,
zero
),
ControlWidth
textWidth
]
:+:
EditControl
(
toString
tg
.
target_vers
)
(
PixelWidth
250
)
1
[
ControlId
versId
...
...
Pm/PmDriver.icl
View file @
63d4e7b9
...
...
@@ -817,6 +817,9 @@ step intr (DLink ds=:{ok, newpaths, fileinfo, libsinfo, modpaths, abccache, proj
|
not
ok
=
continue
False
newpaths
False
fileinfo
libsinfo
modpaths
project
intr
(
abccache
,
ps
)
#
(
ok
,
ps
)
=
if
(
lo
.
strip_bytecode
&&
PR_GetByteCodePath
project
<>
""
)
(
ByteCodeStrip
lo
.
keep_bytecode_symbols
fileinfo
project
ps
)
(
True
,
ps
)
|
not
ok
=
continue
False
newpaths
False
fileinfo
libsinfo
modpaths
project
intr
(
abccache
,
ps
)
#
(
ok
,
ps
)
=
if
(
lo
.
prelink_bytecode
&&
PR_GetByteCodePath
project
<>
""
)
(
ByteCodePrelink
project
ps
)
(
True
,
ps
)
|
not
ok
=
continue
False
newpaths
False
fileinfo
libsinfo
modpaths
project
intr
(
abccache
,
ps
)
...
...
@@ -1744,3 +1747,19 @@ ByteCodeStrip keep_symbols fileinfo project ps
(
err
++
[
"Bytecode stripper failed (exit code: "
+++
toString
exitcode
+++
")"
])
#
ps
=
updateErrorWindow
err
ps
=
(
exitcode
==
0
,
ps
)
ByteCodePrelink
::
!
Project
!*
GeneralSt
->
*(!
Bool
,
!*
GeneralSt
)
ByteCodePrelink
project
ps
#
(
startupdir
,
ps
)
=
getStup
ps
(
bcprelink
,
ps
)
=
getCurrentBCprelink
ps
bcprelink
=
startupdir
+++
DirSeparatorString
+++
bcprelink
#
bcpath
=
fulPath
startupdir
(
PR_GetRootDir
project
)
(
PR_GetByteCodePath
project
)
pbcpath
=
(
bcpath
%
(
0
,
size
bcpath
-3
))
+++
"pbc"
#
ps
=
showInfo
(
Level2
(
"Prelinking bytecode for '"
+++
RemovePath
bcpath
+++
"'"
))
ps
#
(
exitcode
,
err
,
ps
)
=
RunExternalCommand
bcprelink
[
bcpath
,
"-o"
,
pbcpath
]
startupdir
ps
#
err
=
if
(
exitcode
==
0
)
err
(
err
++
[
"Bytecode prelinker failed (exit code: "
+++
toString
exitcode
+++
")"
])
#
ps
=
updateErrorWindow
err
ps
=
(
exitcode
==
0
,
ps
)
Pm/PmEnvironment.dcl
View file @
63d4e7b9
...
...
@@ -18,6 +18,7 @@ EnvsFileName :== "IDEEnvs"
,
target_bcgen
::
!
String
// bytecode generator
,
target_bclink
::
!
String
// bytecode linker
,
target_bcstrip
::
!
String
// bytecode stripper
,
target_bcprelink
::
!
String
// bytecode prelinker
,
target_link
::
!
String
// static/eager linker
,
target_dynl
::
!
String
// dynamic linker
,
target_vers
::
!
Int
// abc version
...
...
Pm/PmEnvironment.icl
View file @
63d4e7b9
...
...
@@ -31,6 +31,7 @@ t_StdEnv
,
target_bcgen
::
!
String
// bytecode generator
,
target_bclink
::
!
String
// bytecode linker
,
target_bcstrip
::
!
String
// bytecode stripper
,
target_bcprelink
::
!
String
// bytecode prelinker
,
target_link
::
!
String
// static/eager linker
,
target_dynl
::
!
String
// dynamic linker
,
target_vers
::
!
Int
// abc version
...
...
@@ -137,6 +138,7 @@ emptyTarget =
,
target_bcgen
=
""
,
target_bclink
=
""
,
target_bcstrip
=
""
,
target_bcprelink
=
""
,
target_link
=
""
,
target_dynl
=
""
,
target_vers
=
42
...
...
@@ -171,6 +173,7 @@ TargetTable =
,
SimpleOption
"EnvironmentByteCodeGen"
(\
a
->
a
.
target_bcgen
)
(\
v
a
->{
a
&
target_bcgen
=
v
})
,
SimpleOption
"EnvironmentByteCodeLink"
(\
a
->
a
.
target_bclink
)
(\
v
a
->{
a
&
target_bclink
=
v
})
,
SimpleOption
"EnvironmentByteCodeStrip"
(\
a
->
a
.
target_bcstrip
)
(\
v
a
->{
a
&
target_bcstrip
=
v
})
,
SimpleOption
"EnvironmentByteCodePrelink"
(\
a
->
a
.
target_bcprelink
)
(\
v
a
->{
a
&
target_bcprelink
=
v
})
,
SimpleOption
"EnvironmentLinker"
(\
a
->
a
.
target_link
)
(\
v
a
->{
a
&
target_link
=
v
})
,
SimpleOption
"EnvironmentDynLink"
(\
a
->
a
.
target_dynl
)
(\
v
a
->{
a
&
target_dynl
=
v
})
,
SimpleOption
"EnvironmentVersion"
(\
a
->
toString
a
.
target_vers
)
(\
v
a
->{
a
&
target_vers
=
toInt
v
})
...
...
@@ -212,6 +215,7 @@ t_StdEnv20
,
target_bcgen
=
compiler_and_linker_directory
+++
DirSeparatorString
+++
IF_WINDOWS
"ByteCodeGenerator.exe"
"bcgen"
,
target_bclink
=
compiler_and_linker_directory
+++
DirSeparatorString
+++
IF_WINDOWS
"ByteCodeLinker.exe"
"bclink"
,
target_bcstrip
=
compiler_and_linker_directory
+++
DirSeparatorString
+++
IF_WINDOWS
"ByteCodeStripper.exe"
"bcstrip"
,
target_bcprelink
=
compiler_and_linker_directory
+++
DirSeparatorString
+++
IF_WINDOWS
"ByteCodePrelinker.exe"
"bcprelink"
,
target_link
=
IF_MACOSX
"/usr/bin/gcc"
(
compiler_and_linker_directory
+++
DirSeparatorString
+++
IF_WINDOWS
"StaticLinker.exe"
"linker"
)
,
target_dynl
=
"Tools"
+++
DirSeparatorString
+++
"Dynamics"
+++
DirSeparatorString
+++
"DynamicLinker.exe"
,
target_vers
=
920
...
...
Pm/PmFiles.icl
View file @
63d4e7b9
...
...
@@ -444,6 +444,7 @@ LinkOptionsTable =
// , SimpleOption "AddCarbResource" (\a->a.add_carb_resource) (\v a->{a & add_carb_resource = v})
,
SimpleOption
"StripByteCode"
(\
a
->
a
.
strip_bytecode
)
(\
v
a
->{
a
&
strip_bytecode
=
v
})
,
SimpleOption
"KeepByteCodeSymbols"
(\
a
->
a
.
keep_bytecode_symbols
)
(\
v
a
->{
a
&
keep_bytecode_symbols
=
v
})
,
SimpleOption
"PrelinkByteCode"
(\
a
->
a
.
prelink_bytecode
)
(\
v
a
->{
a
&
prelink_bytecode
=
v
})
}
EditWdOptionsTable
::
OptionsTable
EditWdOptions
...
...
Pm/PmTypes.dcl
View file @
63d4e7b9
...
...
@@ -41,6 +41,7 @@ instance fromString Processor
,
strip_bytecode
::
!
Bool
// strip ABC bytecode
,
keep_bytecode_symbols
::
!
Bool
// only meaningful when strip_bytecode=True
,
prelink_bytecode
::
!
Bool
// prelink bytecode for location-dependent interpretation
}
DefaultLinkOptions
::
LinkOptions
...
...
Pm/PmTypes.icl
View file @
63d4e7b9
...
...
@@ -142,6 +142,7 @@ where
,
strip_bytecode
::
!
Bool
// strip ABC bytecode
,
keep_bytecode_symbols
::
!
Bool
// only meaningful when strip_bytecode=True
,
prelink_bytecode
::
!
Bool
// prelink bytecode for location-dependent interpretation
}
/*
instance == LinkOptions // do we need to check resource linking flags???
...
...
@@ -174,6 +175,7 @@ DefaultLinkOptions =
// , add_carb_resource = False // Clean2 ide targets Carbon?!
,
strip_bytecode
=
True
,
keep_bytecode_symbols
=
True
,
prelink_bytecode
=
False
}
::
LinkMethod
...
...
Camil Staps
🚀
@cstaps
mentioned in merge request
!13 (closed)
·
Apr 08, 2019
mentioned in merge request
!13 (closed)
mentioned in merge request !13
Toggle commit list
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