Thread overview | |||||
---|---|---|---|---|---|
|
July 16, 2017 including "globals.h" in "mscoffobj.c" | ||||
---|---|---|---|---|
| ||||
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 Kind Regards Benjamin Thaut |
July 16, 2017 Re: including "globals.h" in "mscoffobj.c" | ||||
---|---|---|---|---|
| ||||
Posted in reply to Benjamin Thaut | 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.
|
July 17, 2017 Re: including "globals.h" in "mscoffobj.c" | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Sunday, 16 July 2017 at 21:11:20 UTC, Walter Bright wrote:
>
> 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.
Thank you, I will take a look at backconfig.c and mimic the way information is passed through there for my use case.
|
Copyright © 1999-2021 by the D Language Foundation