Login Page - Create Account

Support Board


Date/Time: Thu, 30 Apr 2026 16:37:46 +0000



Huge difference in compiled dll's between Remote Standard and older VS Community Compiler

View Count: 27

[2026-04-30 14:10:13]
User92573 - Posts: 584
Dear John / Support

I'm currently re-compiling some studies that I've used for a few years without issue (naming changes).

Previously I compiled them using Visual Studio's Compiler but I've not installed the Community Edition on this PC so I thought I'd simply use the remote compiler (standard).

However, for some reason the same compiled dll's are typically 8 to 10 times larger.

Does this sound correct, or is there an issue?

Many thanks.
[2026-04-30 15:14:47]
seandunaway - Posts: 382
yeah, interesting

% du -h *.dll
124K  local_build_arm64.dll
132K  local_build_x64.dll
220K  remote_build_arm64.dll
896K  remote_build_x64.dll

the remote arm64 is about double the size and remote x64 is about 7x the size

interestingly the x64 remote build is using the console subsystem instead of gui, that could pull in some unnecessary things (missing flag -mwindows)

% file *.dll
local_build_arm64.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
local_build_x64.dll: PE32+ executable (DLL) (GUI) x86-64, for MS Windows
remote_build_arm64.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
remote_build_x64.dll: PE32+ executable (DLL) (console) x86-64 (stripped to external PDB), for MS Windows

we can see it's not debug symbols or anything but actual additional text section or code

% llvm-size -A *.dll

local_build_x64.dll :
section size addr
.text 78822 6442455040
.rdata 43156 6442536960
.data 2560 6442582016
.pdata 4812 6442590208
.gfids 128 6442598400
_RDATA 500 6442602496
.reloc 1596 6442606592
Total 131574

remote_build_x64.dll :
section size addr
.text 716824 1711280128
.data 12064 1712001024
.rdata 65088 1712013312
.pdata 43920 1712078848
.xdata 61688 1712123904
.bss 0 1712189440
.edata 129 1712197632
.idata 3732 1712201728
.CRT 88 1712205824
.tls 16 1712209920
.reloc 5744 1712214016
Total 909293

a little deeper we can see x64 version uses a different linker

% llvm-readobj -h -l -S *.dll | grep -E "(File:|Linker)"
File: local_build_arm64.dll
MajorLinkerVersion: 14
MinorLinkerVersion: 0
File: local_build_x64.dll
MajorLinkerVersion: 14
MinorLinkerVersion: 0
File: remote_build_arm64.dll
MajorLinkerVersion: 14
MinorLinkerVersion: 0
File: remote_build_x64.dll
MajorLinkerVersion: 2
MinorLinkerVersion: 34

my guess is arm64 builds use llvm's lld and x64 is using gcc's linker (missing flag -fuse-ld=lld)

all of which probably suggests the x64 remote builds are using the mingw toolchain instead of the native msvc (but arm64 doesn't), which if i remember correctly pulls in a lot of redundant stuffs

some of it might be able to be eliminated with something like

-fuse-ld=lld
-fno-exceptions
-fno-rtti
-fno-unwind-tables
-fno-asynchronous-unwind-tables
-fno-stack-protector
-ffunction-sections
-fdata-sections
-Wl,--gc-sections

or, preferably, just use the same compiler and msvc toolchain for the x64 builds


but the good news is that while this is all interesting for nerds, the true practical reality is the code will run with identical performance and make zero difference at all, minus less than a lousy megabyte of memory
Date Time Of Last Edit: 2026-04-30 15:26:34

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account