rts/Linker.c: Split RTS symbols out into separate file
ClosedPublic

Authored by erikd on Oct 23 2015, 8:01 PM.

Details

Summary

Pull the RtsSymbolVal typedef and rtsSyms[] array out into a separate
header and C file. No change in functionality.

Test Plan

validate

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
erikd updated this revision to Diff 4644.Oct 23 2015, 8:01 PM
erikd retitled this revision from to rts/Linker.c: Split RTS symbols out into separate file.
erikd updated this object.
erikd edited the test plan for this revision. (Show Details)
erikd added reviewers: austin, bgamari, simonmar.
bgamari added inline comments.Oct 24 2015, 4:55 AM
rts/RtsSymbols.h
8

What about an #ifndef RTS_SYMBOLS_H guard?

Phyx added a subscriber: Phyx.Oct 24 2015, 4:59 AM
Phyx added inline comments.
rts/RtsSymbols.c
49

We don't support Cygwin builds anymore, So these can be dropped. Only msys2/mingw is supported for Windows.

bgamari requested changes to this revision.Oct 24 2015, 5:11 AM
bgamari edited edge metadata.
This revision now requires changes to proceed.Oct 24 2015, 5:11 AM
erikd updated this revision to Diff 4654.Oct 24 2015, 5:21 AM
erikd edited edge metadata.
  • Add include guard to RtsSymbols.h.
This revision was automatically updated to reflect the committed changes.
awson added a subscriber: awson.Oct 24 2015, 2:39 PM

This breaks Windows 64-bit (didn't try 32-bit) build immediately.

Do anybody test things on Windows before committing?

awson added a comment.Oct 24 2015, 3:00 PM

To cure things one should add

#if defined(mingw32_HOST_OS)
#include <sys/stat.h>
#include <io.h>
#include <windows.h>
#include <shfolder.h> /* SHGetFolderPathW */
#endif

to RtsSymbols.c

The line
#include <shfolder.h> /* SHGetFolderPathW */
(and, perhaps, some others) can be removed from Linker.c