Skip to content

Different linker support #197

Answered by edubart
stefanos82 asked this question in Q&A
Oct 20, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Is there a way to append -fuse-ld=mold to LDFLAG?

Yes, use the following in your Nelua code:

## ldflags '-fuse-ld=mold'

Although using cflags will also work:

## cflags '-fuse-ld=mold'

Technically it's more correct to use ldflags, since this is a linkage flag. The main difference between using ldflags instead of cflags, is that ldflags options won't be used when Nelua attempts to compile object files and static libraries.

This can also be set via command line, just like --cflags, you can also use --ldflags.

If I'm not mistaken there's a way to modify the global settings via Lua script or something like that.

Yes, creating a ~/.config/nelua/neluacfg.lua like the following:

return {
  cf…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@stefanos82
Comment options

Answer selected by edubart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants