Building static libs with -o-

Jeremy DeHaan via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Thu Apr 2 09:24:45 PDT 2015


On Thursday, 2 April 2015 at 15:34:39 UTC, John Colvin wrote:
> On Thursday, 2 April 2015 at 06:30:36 UTC, Jeremy DeHaan wrote:
>> I started playing around with ldc v 0.15.1 on Linux, and when 
>> building static libraries I noticed that it still produced 
>> object files. I don't need object files for what I am doing, 
>> so I tried to use the -o- switch and just get the static 
>> libraries. Unfortunately, this causes no static library files 
>> to be produced either. Is this supposed to be the case or did 
>> I do something wrong?
>
> -od lets you choose where those object files are put
>
> ldc2 -od=obj_files myFile.d myOtherFile.d && rm -r obj_files
>
> -singleobj puts everything in one object file, which can 
> sometimes mean faster executables and also makes it easier to 
> find and delete.

Yeah, that is the route that I ended up going.

You say -singleobj can sometimes mean faster executables. In what 
cases?


More information about the digitalmars-d-ldc mailing list