Commit a492a812 authored by John van Groningen's avatar John van Groningen

Merge branch 'bclink-options-file' into 'master'

Use separate link options file for the bytecode linker to avoid long command lines

See merge request !23
parents e19d05b1 670cf2d1
Pipeline #30899 passed with stage
in 39 seconds
......@@ -1801,8 +1801,17 @@ ByteCodeLink fileinfo project ps
root = root % (0,size root-4) +++ "bc"
abcpaths = [root:removeMember root abcpaths]
# linkoptsfilename = TempDir +++ DirSeparatorString +++ "bclinkopts"
(ok,linkoptsfile,w) = fopen linkoptsfilename FWriteText ps.gst_world
ps & gst_world = w
| not ok = (False, updateErrorWindow ["Failed to write bytecode linker options file"] ps)
# linkoptsfile = foldl (\f path -> f <<< path <<< "\n") linkoptsfile abcpaths
(ok,w) = fclose linkoptsfile ps.gst_world
ps & gst_world = w
| not ok = (False, updateErrorWindow ["Failed to write bytecode linker options file"] ps)
# ps = showInfo (Level2 ("Linking bytecode for '" +++ RemovePath bcpath +++ "'")) ps
# (exitcode,err,ps) = RunExternalCommand bclink (abcpaths ++ ["-o",bcpath]) startupdir ps
# (exitcode,err,ps) = RunExternalCommand bclink (["-f",linkoptsfilename,"-o",bcpath]) startupdir ps
# err = if (exitcode == 0)
err
(err ++ ["Bytecode linker failed (exit code: " +++ toString exitcode +++ ")"])
......
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