mold icon indicating copy to clipboard operation
mold copied to clipboard

Feature Request: Use environment flags for mold-specific switches

Open EndlessEden opened this issue 1 year ago • 1 comments

What: Add a check for env flags on launch that executes mold with mold specific switches

Why: When trying to use mold with GCC/Clang using the LDFLAGS variable, gcc/clang produces a error when supplied with mold-specific flags during startup. preventing building prior to reaching the linker stage.

EndlessEden avatar Nov 11 '24 04:11 EndlessEden

gcc does, as far as I can determine, not use the LDFLAGS variable. Do ld.bfd flags, like --gc-sections, work? Are you prefixing your linker flags with -Wl,?

Alcaro avatar Nov 11 '24 04:11 Alcaro