Skip to content

Commit c40a251

Browse files
committed
wpc-plugin now exports cbits sources also for debug purposes
1 parent cbd5605 commit c40a251

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

wpc-plugin/src/WPC/Plugin.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ runPhaseFun phase = do
156156
make output_fn relative to odir
157157
copy output object file to extra-compilation-artifacts/wpc-plugin/cbits/
158158
-}
159+
-- save cbits source as well
160+
do
161+
let wpcForeignSrc = odir </> "extra-compilation-artifacts" </> "wpc-plugin" </> "cbits-source" </> input_fn
162+
createDirectoryIfMissing True (takeDirectory wpcForeignSrc)
163+
copyFile input_fn wpcForeignSrc
164+
putStrLn $ " ###### wpc-plugin runPhaseFun copy file (from, to) " ++ show (input_fn, wpcForeignSrc)
159165
pure output_fn
160166
T_Hsc _hscEnv modSummary -> do
161167
modifyIORef globalEnvIORef $ \d -> d {geModSummary = Just modSummary}

0 commit comments

Comments
 (0)