digitalmars.D.internals - including "globals.h" in "mscoffobj.c"
- Benjamin Thaut (14/14) Jul 16 2017 Currently when compiling dmd it seems to be setup so that
- Walter Bright (4/16) Jul 16 2017 This is intentional because global.params is part of the front end, and
- Benjamin Thaut (3/8) Jul 17 2017 Thank you, I will take a look at backconfig.c and mimic the way
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
Jul 16 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.cThis 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.
Jul 16 2017
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.
Jul 17 2017