Commit c6d62f25 authored by Camil Staps's avatar Camil Staps 🍃

Hotfix for commit 670cf2d1: the IDE has no gst_world field; use accFiles instead

parent a492a812
Pipeline #31076 passed with stage
in 42 seconds
......@@ -1801,14 +1801,8 @@ 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)
# (errs,ps) = accFiles (write_link_opts_file abcpaths) ps
| not (isEmpty errs) = (False, updateErrorWindow errs ps)
# ps = showInfo (Level2 ("Linking bytecode for '" +++ RemovePath bcpath +++ "'")) ps
# (exitcode,err,ps) = RunExternalCommand bclink (["-f",linkoptsfilename,"-o",bcpath]) startupdir ps
......@@ -1817,6 +1811,17 @@ ByteCodeLink fileinfo project ps
(err ++ ["Bytecode linker failed (exit code: " +++ toString exitcode +++ ")"])
# ps = updateErrorWindow err ps
= (exitcode == 0, ps)
where
linkoptsfilename = TempDir +++ DirSeparatorString +++ "bclinkopts"
write_link_opts_file abcpaths w
# (ok,linkoptsfile,w) = fopen linkoptsfilename FWriteText w
| not ok = (err, w)
# linkoptsfile = foldl (\f path -> f <<< path <<< "\n") linkoptsfile abcpaths
(ok,w) = fclose linkoptsfile w
= (if ok [] err, w)
where
err = ["Failed to write bytecode linker options file"]
ByteCodeStrip :: !Bool !FileInfoCache !Project !*GeneralSt -> *(!Bool, !*GeneralSt)
ByteCodeStrip keep_symbols fileinfo project ps
......
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