[Dlang-internal] including "globals.h" in "mscoffobj.c"
Walter Bright via Dlang-internal
dlang-internal at puremagic.com
Sun Jul 16 14:11:20 PDT 2017
On 7/16/2017 10:56 AM, Benjamin Thaut wrote:
> Currently when compiling dmd it seems to be setup so that "globals.h" can not be
> included from "mscoffobj.c". I'm wondering now if this is intentional. If it is
> intentional how would one access certain flags which are part of the
> globals.params struct inside mscoffobj.c?
>
> I can think of two ways right now
> 1) Add additional arguments to MsCoffObj::init
> 2) Pull out the condition into the dmd frontend (this would be a lot of
> boilerplate code to add in this case)
>
> In case details are needed look at this file and search for "global.params":
> https://github.com/Ingrater/dmd/blob/DllSupportD2/src/backend/mscoffobj.c
This is intentional because global.params is part of the front end, and
mscoffobj.c is part of the back end. I try to not tangle them up together.
See backconfig.c on how information is transmitted by the front end to the back end.
More information about the Dlang-internal
mailing list