summaryrefslogtreecommitdiff
path: root/utils/iserv/cbits
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2018-06-07 13:36:24 -0400
committerBen Gamari <ben@smart-cactus.org>2018-06-07 20:11:25 -0400
commit6fbe5f274ba84181f5db50901639ae382ef68c4b (patch)
tree064239eb875d7d1188182bc8cd4a32c53397b475 /utils/iserv/cbits
parent200c8e046b44e38698d7e7bb9801f306e9570a0a (diff)
downloadhaskell-6fbe5f274ba84181f5db50901639ae382ef68c4b.tar.gz
Move `iserv` into `utils` and change package name from `iserv-bin` to `iserv`
This is done for consistency. We usually call the package file the same name the folder has. The move into `utils` is done so that we can move the library into `libraries/iserv` and the proxy into `utils/iserv-proxy` and then break the `iserv.cabal` apart. This will make building the cross compiler with TH simpler, because we can build the library and proxy as separate packages. Test Plan: ./validate Reviewers: bgamari, goldfire, erikd Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4436
Diffstat (limited to 'utils/iserv/cbits')
-rw-r--r--utils/iserv/cbits/iservmain.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/utils/iserv/cbits/iservmain.c b/utils/iserv/cbits/iservmain.c
new file mode 100644
index 0000000000..daefd35251
--- /dev/null
+++ b/utils/iserv/cbits/iservmain.c
@@ -0,0 +1,17 @@
+#include "../rts/PosixSource.h"
+#include "Rts.h"
+
+#include "HsFFI.h"
+
+int main (int argc, char *argv[])
+{
+ RtsConfig conf = defaultRtsConfig;
+
+ // We never know what symbols GHC will look up in the future, so
+ // we must retain CAFs for running interpreted code.
+ conf.keep_cafs = 1;
+
+ conf.rts_opts_enabled = RtsOptsAll;
+ extern StgClosure ZCMain_main_closure;
+ hs_main(argc, argv, &ZCMain_main_closure, conf);
+}