digitalmars.D - Compiler switches in source code
- Vinod K Chandran (4/4) Feb 13 2021 Why Compiler Writers Accept instructions for the compiler as
- Daniel N (5/9) Feb 14 2021 You are in luck, dmd does provide support for this...
- kinke (1/1) Feb 14 2021 https://dlang.org/spec/pragma.html#linkerDirective
- Vinod K Chandran (2/3) Feb 14 2021 Thanks @kinke. Let me check.
- Walter Bright (4/7) Feb 14 2021 There are a couple pragmas that do it
- Vinod K Chandran (6/14) Feb 14 2021 Thanks @ Walter Bright
- Walter Bright (4/9) Feb 14 2021 https://dlang.org/spec/pragma.html
- Vinod K Chandran (5/9) Feb 14 2021 I had already read that page.
- Mike Parker (3/6) Feb 14 2021 There is no pragma for those switches.
- Vinod K Chandran (2/5) Feb 15 2021 Thanks @Mike Parker. And special thanks for the book "Learning D".
- Petar Kirov [ZombineDev] (5/9) Feb 15 2021 I think rund [1] offers what you're looking for. Give it a try
- Vinod K Chandran (3/6) Feb 15 2021 Thanks @Petar Kirov [ZombineDev]. Let me try it.
- Vinod K Chandran (5/6) Feb 15 2021 Hi, I just installed it successfully. But I am little bit
- Jonathan Marler (4/11) Feb 16 2021 This is the section you're looking for:
Why Compiler Writers Accept instructions for the compiler as compiler switches rather than through the source code. What's wrong with providing options like "L/SUBSYSTEM:WINDOWS" through the source code?
Feb 13 2021
On Sunday, 14 February 2021 at 07:56:43 UTC, Vinod K Chandran wrote:Why Compiler Writers Accept instructions for the compiler as compiler switches rather than through the source code. What's wrong with providing options like "L/SUBSYSTEM:WINDOWS" through the source code?You are in luck, dmd does provide support for this... https://dlang.org/spec/pragma.html#linkerDirective ... and it's wonderful, I wish all compilers followed suit.
Feb 14 2021
On Sunday, 14 February 2021 at 08:41:15 UTC, kinke wrote:https://dlang.org/spec/pragma.html#linkerDirectiveThanks kinke. Let me check.
Feb 14 2021
On 2/13/2021 11:56 PM, Vinod K Chandran wrote:Why Compiler Writers Accept instructions for the compiler as compiler switches rather than through the source code. What's wrong with providing options like "L/SUBSYSTEM:WINDOWS" through the source code?There are a couple pragmas that do it https://dlang.org/spec/pragma.html#linkerDirective but people generally prefer to do those with their build system.
Feb 14 2021
On Sunday, 14 February 2021 at 08:59:32 UTC, Walter Bright wrote:On 2/13/2021 11:56 PM, Vinod K Chandran wrote:Thanks Walter Bright So I can write like this -- pragma(linkerDirective, "L/SUBSYSTEM:WINDOWS") Am i right ? If so, i would like to know more about like which compiler switches are allowed to use with pragmas.Why Compiler Writers Accept instructions for the compiler as compiler switches rather than through the source code. What's wrong with providing options like "L/SUBSYSTEM:WINDOWS" through the source code?There are a couple pragmas that do it https://dlang.org/spec/pragma.html#linkerDirective but people generally prefer to do those with their build system.
Feb 14 2021
On 2/14/2021 8:58 AM, Vinod K Chandran wrote:So I can write like this -- pragma(linkerDirective, "L/SUBSYSTEM:WINDOWS") Am i right ?yesIf so, i would like to know more about like which compiler switches are allowed to use with pragmas.https://dlang.org/spec/pragma.html The linkerDirective, however, is for linker switches.
Feb 14 2021
On Sunday, 14 February 2021 at 22:26:54 UTC, Walter Bright wrote:On 2/14/2021 8:58 AM, Vinod K Chandran wrote: yesThanks for the reply.https://dlang.org/spec/pragma.htmlI had already read that page.The linkerDirective, however, is for linker switches.I would like to know how compiler switches like "-i", "-j" are using in "pragma"
Feb 14 2021
On Monday, 15 February 2021 at 07:32:06 UTC, Vinod K Chandran wrote:I would like to know how compiler switches like "-i", "-j" are using in "pragma"There is no pragma for those switches.
Feb 14 2021
On Monday, 15 February 2021 at 07:46:55 UTC, Mike Parker wrote:Thanks Mike Parker. And special thanks for the book "Learning D".I would like to know how compiler switches like "-i", "-j" are using in "pragma"There is no pragma for those switches.
Feb 15 2021
On Sunday, 14 February 2021 at 07:56:43 UTC, Vinod K Chandran wrote:Why Compiler Writers Accept instructions for the compiler as compiler switches rather than through the source code. What's wrong with providing options like "L/SUBSYSTEM:WINDOWS" through the source code?I think rund [1] offers what you're looking for. Give it a try and let us know what you think! [1]: https://github.com/dragon-lang/rund
Feb 15 2021
On Monday, 15 February 2021 at 08:40:44 UTC, Petar Kirov [ZombineDev] wrote:I think rund [1] offers what you're looking for. Give it a try and let us know what you think! [1]: https://github.com/dragon-lang/rundThanks Petar Kirov [ZombineDev]. Let me try it.
Feb 15 2021
On Monday, 15 February 2021 at 08:40:44 UTC, Petar Kirov [ZombineDev] wrote:[1]: https://github.com/dragon-lang/rundHi, I just installed it successfully. But I am little bit confused about the usage. There are some examples under the heading "Idea". Do i need to use the "Config" data type ?
Feb 15 2021
On Monday, 15 February 2021 at 14:28:36 UTC, Vinod K Chandran wrote:On Monday, 15 February 2021 at 08:40:44 UTC, Petar Kirov [ZombineDev] wrote:This is the section you're looking for: https://github.com/dragon-lang/rund#source-compiler-directives[1]: https://github.com/dragon-lang/rundHi, I just installed it successfully. But I am little bit confused about the usage. There are some examples under the heading "Idea". Do i need to use the "Config" data type ?
Feb 16 2021