Commit 06f55a97 authored by Mart Lubbers's avatar Mart Lubbers

Support options2 for linker as well

The following entry in IDEEnvs:
EnvironmentLinker:	lib/exe/linker:-h 200m:-lmysql

Will call the linker with a heap of 200M and pass -lmysql to gcc/ld

In some extravagant cases (large projects with descriptors etc.), the
linker needs more heap as well
parent 0138914b
Pipeline #17645 passed with stage
in 55 seconds
......@@ -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,opts) = get_path_name_and_options linker startupdir
# (linker,linker_dir,options1,options2) = get_path_name_and_options2 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 opts (StrictListToList (Append library_file_names "-lm"))]
# ld_args = ["-o",path,temp_file_name:add_options_string_to_args 0 options2 (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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment