www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Commandline compatibility with Clang?

reply Shriramana Sharma <samjnaa_dont_spam_me gmail.com> writes:
Hello. I downloaded ldc expecting that it will have relative Commandline 
compatibility with Clang, especially that the -o option will work just like 
in Clang/GCC. But neither the ldc2 nor ldmd2 provides the -o option but goes 
-of= like DMD. Can I open an issue requesting this or is there a particular 
reason that the syntax deviates?

Thanks.

-- 

Oct 16 2015
parent reply Kai Nacke <kai redstar.de> writes:
On Friday, 16 October 2015 at 13:33:36 UTC, Shriramana Sharma 
wrote:
 Hello. I downloaded ldc expecting that it will have relative 
 Commandline compatibility with Clang, especially that the -o 
 option will work just like in Clang/GCC. But neither the ldc2 
 nor ldmd2 provides the -o option but goes -of= like DMD. Can I 
 open an issue requesting this or is there a particular reason 
 that the syntax deviates?

 Thanks.
Hi Shriramana! There are 2 reasons for the naming of command line options. First, ldc predates Clang. Second, ldc links against LLVM and inherits all the command line options which are also not compatible with Clang. I think about introducing a new ldc driver and sanitizing the command line options. But many tools (e.g. dub) depends on the current options ldc2 provides. This will not change. Regards, Kai
Oct 22 2015
next sibling parent reply Kagamin <spam here.lot> writes:
On Thursday, 22 October 2015 at 19:16:00 UTC, Kai Nacke wrote:
 There are 2 reasons for the naming of command line options. 
 First, ldc predates Clang. Second, ldc links against LLVM and 
 inherits all the command line options which are also not 
 compatible with Clang.
How is that? AFAIK all llvm tools use gcc-like -o option.
Oct 23 2015
parent reply Kai Nacke <kai redstar.de> writes:
On Friday, 23 October 2015 at 08:37:38 UTC, Kagamin wrote:
 On Thursday, 22 October 2015 at 19:16:00 UTC, Kai Nacke wrote:
 There are 2 reasons for the naming of command line options. 
 First, ldc predates Clang. Second, ldc links against LLVM and 
 inherits all the command line options which are also not 
 compatible with Clang.
How is that? AFAIK all llvm tools use gcc-like -o option.
You not only want the -o option but also all of the -f/-m options. The LLVM libraries do not use -f/-m options. Regards, Kai
Oct 24 2015
parent Kagamin <spam here.lot> writes:
On Saturday, 24 October 2015 at 21:47:31 UTC, Kai Nacke wrote:
 You not only want the -o option but also all of the -f/-m 
 options. The LLVM libraries do not use -f/-m options.
I mean only -o option: -of= is just too weird. Other options are ok, e.g. -debug is definitely better than -fdebug. That said, LLVM tools options convention seems to be generally better than that of gcc. -m options may be better to implement as traditional -W/-X/-L forwarding. I think it would be great to be able to forward llc options to codegen stage.
Oct 26 2015
prev sibling parent Kagamin <spam here.lot> writes:
https://github.com/llvm-mirror/llvm/blob/master/tools/llc/llc.cpp#L59
Oct 23 2015