Commit 670cf2d1 authored by Camil Staps's avatar Camil Staps 🍃

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

parent 2eea5773
Pipeline #30896 passed with stage
in 41 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