Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-ide
Commits
9694df8e
Verified
Commit
9694df8e
authored
Apr 07, 2019
by
Camil Staps
Browse files
Add option KeepByteCodeSymbols to keep the symbol table when stripping bytecode
parent
77053aa3
Pipeline
#20755
passed with stage
in 55 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Ide/PmDialogues.icl
View file @
9694df8e
...
...
@@ -398,6 +398,9 @@ where
:+:
CheckControl
[(
"Strip bytecode"
,
Nothing
,
toMark
lo
.
strip_bytecode
,
noPS
(\
l
->{
l
&
lo
.
strip_bytecode
=
not
l
.
lo
.
strip_bytecode
}))]
(
Columns
1
)
[
ControlPos
(
Left
,
zero
)]
:+:
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
)]
:+:
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
]]
)
...
...
Pm/PmDriver.icl
View file @
9694df8e
...
...
@@ -816,7 +816,7 @@ step intr (DLink ds=:{ok, newpaths, fileinfo, libsinfo, modpaths, abccache, proj
#
(
ok
,
ps
)
=
if
(
PR_GetByteCodePath
project
<>
""
)
(
ByteCodeLink
fileinfo
project
ps
)
(
True
,
ps
)
|
not
ok
=
continue
False
newpaths
False
fileinfo
libsinfo
modpaths
project
intr
(
abccache
,
ps
)
#
(
ok
,
ps
)
=
if
(
lo
.
strip_bytecode
&&
PR_GetByteCodePath
project
<>
""
)
(
ByteCodeStrip
fileinfo
project
ps
)
(
True
,
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
)
...
...
@@ -1718,15 +1718,17 @@ ByteCodeLink fileinfo project ps
#
ps
=
updateErrorWindow
err
ps
=
(
exitcode
==
0
,
ps
)
ByteCodeStrip
::
!
FileInfoCache
!
Project
!*
GeneralSt
->
*(!
Bool
,
!*
GeneralSt
)
ByteCodeStrip
fileinfo
project
ps
ByteCodeStrip
::
!
Bool
!
FileInfoCache
!
Project
!*
GeneralSt
->
*(!
Bool
,
!*
GeneralSt
)
ByteCodeStrip
keep_symbols
fileinfo
project
ps
#
(
startupdir
,
ps
)
=
getStup
ps
(
bcstrip
,
ps
)
=
getCurrentBCstrip
ps
bcstrip
=
startupdir
+++
DirSeparatorString
+++
bcstrip
#
bcpath
=
fulPath
startupdir
(
PR_GetRootDir
project
)
(
PR_GetByteCodePath
project
)
#
ps
=
showInfo
(
Level2
(
"Stripping bytecode for '"
+++
RemovePath
bcpath
+++
"'"
))
ps
#
(
exitcode
,
err
,
ps
)
=
RunExternalCommand
bcstrip
[
bcpath
,
"-o"
,
bcpath
]
startupdir
ps
#
opts
=
[
bcpath
,
"-o"
,
bcpath
]
opts
=
if
keep_symbols
[
"-s"
:
opts
]
opts
#
(
exitcode
,
err
,
ps
)
=
RunExternalCommand
bcstrip
opts
startupdir
ps
#
err
=
if
(
exitcode
==
0
)
err
(
err
++
[
"Bytecode stripper failed (exit code: "
+++
toString
exitcode
+++
")"
])
...
...
Pm/PmFiles.icl
View file @
9694df8e
...
...
@@ -443,6 +443,7 @@ LinkOptionsTable =
,
SimpleOption
"ExportedNames"
(\
a
->
a
.
dll_export_list_name
)
(\
v
a
->{
a
&
dll_export_list_name
=
v
})
// , 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
})
}
EditWdOptionsTable
::
OptionsTable
EditWdOptions
...
...
Pm/PmTypes.dcl
View file @
9694df8e
...
...
@@ -40,6 +40,7 @@ instance fromString Processor
// , add_carb_resource :: !Bool // Mac-only!
,
strip_bytecode
::
!
Bool
// strip ABC bytecode
,
keep_bytecode_symbols
::
!
Bool
// only meaningful when strip_bytecode=True
}
DefaultLinkOptions
::
LinkOptions
...
...
Pm/PmTypes.icl
View file @
9694df8e
...
...
@@ -141,6 +141,7 @@ where
// , add_carb_resource :: !Bool // Mac-only!
,
strip_bytecode
::
!
Bool
// strip ABC bytecode
,
keep_bytecode_symbols
::
!
Bool
// only meaningful when strip_bytecode=True
}
/*
instance == LinkOptions // do we need to check resource linking flags???
...
...
@@ -171,7 +172,8 @@ DefaultLinkOptions =
,
generate_dll
=
False
,
dll_export_list_name
=
""
// , add_carb_resource = False // Clean2 ide targets Carbon?!
,
strip_bytecode
=
False
,
strip_bytecode
=
True
,
keep_bytecode_symbols
=
True
}
::
LinkMethod
...
...
Write
Preview
Supports
Markdown
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