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
376ad7a8
Commit
376ad7a8
authored
Jan 10, 2019
by
John van Groningen
Browse files
Merge branch 'support-options2-for-linker' into 'master'
Support options2 for linker as well See merge request
!5
parents
2bda4703
fb6b8d97
Pipeline
#17648
passed with stage
in 54 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
MacOSX/PmCleanSystem.icl
View file @
376ad7a8
...
...
@@ -403,7 +403,7 @@ Link linker winfun path
applicationOptions
=:{
ss
,
hs
,
initial_heap_size
,
profiling
,
heap_size_multiple
,
o
,
memoryProfilingMinimumHeapSize
=
minheap
}
optionspathname
library_file_names
object_file_names
static_libraries
static
gen_relocs
gen_symbol_table
gen_linkmap
link_resources
resource_path
gen_dll
dll_syms
startupdir
dynlstr
_
use_64_bit_processor
ps
#
(
linker
,
linkerdir
,
_
)
=
get_path_name_and_options
linker
startupdir
#
(
linker
,
linkerdir
,
options1
,
options2
)
=
get_path_name_and_options
2
linker
""
#
flags
=
ApplicationOptionsToFlags
applicationOptions
#
optdirpath
=
RemoveFilename
optionspathname
#
((
ok
,
pd_optdirpath
),
ps
)
=
pd_StringToPath
optdirpath
ps
...
...
@@ -442,8 +442,8 @@ Link linker winfun path
#
(
err
,
ps
)
=
if
is_gcc
(
Nothing
,
ps
)
(
accFiles
(
WriteLinkOpts
linkoptspath
linkopts
)
ps
)
|
isJust
err
=
(
winfun
(
fromJust
err
)
ps
,
False
)
#
linker_args
=
if
is_gcc
[
"-s"
,
"-o"
,
path
:
[
optionspathname
:
StrictListToList
(
RemoveDup
object_file_names
)]++
StrictListToList
library_file_names
]
[
"-I"
,
linkoptspath
,
"-O"
,
linkerrspath
]
#
linker_args
=
if
is_gcc
[
"-s"
,
"-o"
,
path
:
[
optionspathname
:
StrictListToList
(
RemoveDup
object_file_names
)]++
add_options_string_to_args
0
options2
(
StrictListToList
library_file_names
)
]
(
add_options_string_to_args
0
options1
[
"-I"
,
linkoptspath
,
"-O"
,
linkerrspath
]
)
#
(
argv
,
args_memory
)
=
make_argv
[
linker
:
linker_args
]
#
ld_pid
=
fork
|
ld_pid
<
0
...
...
Unix/PmCleanSystem.icl
View file @
376ad7a8
...
...
@@ -375,7 +375,7 @@ Link linker winfun path
applicationOptions
=:{
ss
,
hs
,
initial_heap_size
,
profiling
,
heap_size_multiple
,
o
,
memoryProfilingMinimumHeapSize
=
minheap
}
optionspathname
library_file_names
object_file_names
static_libraries
static
gen_relocs
gen_symbol_table
gen_linkmap
link_resources
resource_path
gen_dll
dll_syms
startupdir
dynlstr
_
use_64_bit_processor
ps
#
(
linker
,
linker_dir
,
opt
s
)
=
get_path_name_and_options
linker
startupdir
#
(
linker
,
linker_dir
,
opt
ions1
,
options2
)
=
get_path_name_and_options
2
linker
startupdir
#
flags
=
ApplicationOptionsToFlags
applicationOptions
optdirpath
=
RemoveFilename
optionspathname
((
ok
,
pd_optdirpath
),
ps
)
=
pd_StringToPath
optdirpath
ps
...
...
@@ -403,7 +403,7 @@ Link linker winfun path
|
r
==
-1
=
abort
"close failed
\n
"
//Call optimized linker
#
linker_args
=
[
temp_file_name
:
object_paths
]
#
linker_args
=
add_options_string_to_args
0
options1
[
temp_file_name
:
object_paths
]
#
(
argv
,
args_memory
)
=
make_argv
[
linker
:
linker_args
]
#
linker_pid
=
fork
...
...
@@ -429,7 +429,7 @@ Link linker winfun path
=
(
ps
,
link_ok
)
=
(
ps
,
link_ok
)
//Call gcc
#
ld_args
=
[
"-o"
,
path
,
temp_file_name
:
add_options_string_to_args
0
opt
s
(
StrictListToList
(
Append
library_file_names
"-lm"
))]
#
ld_args
=
[
"-o"
,
path
,
temp_file_name
:
add_options_string_to_args
0
opt
ions2
(
StrictListToList
(
Append
library_file_names
"-lm"
))]
ld_args
=
IF_MACOSX
ld_args
(
IF_INT_64_OR_32
[
"-no-pie"
:
ld_args
]
ld_args
)
ld_args
=
if
gen_symbol_table
ld_args
[
"-s"
:
ld_args
]
#
ld
=
"/usr/bin/gcc"
...
...
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