Commit 795f8bd4 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

hschooks.c: Ensure correct header file is included

Consider the case of building a stage1 compiler. `hschooks.c` will be
built by stage0 `ghc` and linked against the `stage0` RTS. Despite this
it was #including the stage1 `Rts.h`. There is, of course, no guarantee
that this is ABI-compatible with the stage0 RTS and when they diverge
Bad Things happen (e.g. bells ringing at inappropriate times in D2699).

Test Plan: Validate

Reviewers: simonmar, austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2763
parent fe3748bc
......@@ -5,11 +5,18 @@ in instead of the defaults.
*/
#include "../rts/PosixSource.h"
#include "../includes/Rts.h"
/*
* This should be linked against Rts.h from the compiler which is compiling us.
* For instance, if we are compiling this file to produce the stage1 compiler,
* we should use Rts.h from stage0.
*/
#include "Rts.h"
#include "HsFFI.h"
#include <string.h>
#include <stdbool.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
......
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