Re: Dub generates a library file that is larger in size than the one built on command line.
TY Mike, that explains it. Thanks Ivan.
Re: Dub generates a library file that is larger in size than the one built on command line.
On Sunday, 17 December 2017 at 02:42:44 UTC, Venkat wrote: dub build --vverbose That is the command I used. Would it be right to assume that -g is being added because --vverbose ? The reason I ask is the file size is about the same when I run the below command. dub build You need to add "--build=release", otherwise dub will build debug by default.
Re: Dub generates a library file that is larger in size than the one built on command line.
On Sunday, 17 December 2017 at 02:42:44 UTC, Venkat wrote: dub build --vverbose That is the command I used. Would it be right to assume that -g is being added because --vverbose ? The reason I ask is the file size is about the same when I run the below command. dub build It's because debug builds are the default. See: https://code.dlang.org/docs/commandline#buildI
Re: Dub generates a library file that is larger in size than the one built on command line.
dub build --vverbose That is the command I used. Would it be right to assume that -g is being added because --vverbose ? The reason I ask is the file size is about the same when I run the below command. dub build
Re: Dub generates a library file that is larger in size than the one built on command line.
On Sunday, December 17, 2017 02:08:00 Venkat via Digitalmars-d-learn wrote: > The following is the command output by dub with --vverbose > switch. It generates a file which is 6094400 bytes in size > > dmd -lib > -of.dub/build/library-debug-linux.posix-x86_64-dmd_2077-7BB682AB55F152616E > 128DD715E887DF/libdjni.a -debug -g -w -version=Have_djni -Isource/ > source/app.d source/jni/JavaArray.d source/jni/JavaClass.d > source/jni/JavaEnv.d source/jni/JavaField.d source/jni/JavaMethod.d > source/jni/JavaObject.d source/jni/JavaString.d source/jni/JavaVM.d > source/jni/JniHelper.d source/jni/JniProxy.d source/jni/jni.d > source/jni/package.d -vcolumns > > > The below command generates a library file of size 3586152 bytes. > > dmd -oflibDJni.a -lib -H -Hdimport/jni source/jni/*.d > > so the file generated by dub is almost twice in size. Why such a > difference ? What does dub include in the generated file ? The most likely culprit would be -g, which adds symbolic debug info. - Jonathan M Davis