Skip to content

-link-internally on Posix requires manually specifying arguments #2717

@dlblv

Description

@dlblv

Archlinux, ldc 1.9.0, using DUB 1.9.0 to build projects.

dflags "-link-internally"
ldc2: Unknown command line argument '-link-internally'.  Try: 'ldc2 -help'

dflags "-linker=lld"
gcc: error: unrecognized command line option ‘-fuse-ld=lld’; did you mean ‘-fuse-ld=bfd’?

dflags "-linker=ld.lld"
gcc: error: unrecognized command line option ‘-fuse-ld=ld.lld’; did you mean ‘-fuse-ld=gold’?

Why does LDC 1.9.0 still use GCC? How can I switch it to use LLVM stack only (under both Linux and Windows)?

On version 1.10.0 beta1 strange thing occurs:

~/ldc2-1.10.0-beta1-linux-x86_64/bin/ldc2 -link-internally retrycatch.d                                                                                                   
 ���: error: unknown argument: --no-warn-search-mismatch
 ���: error: unable to find library -lrt
 ���: error: unable to find library -ldl
 ���: error: unable to find library -lpthread
 ���: error: unable to find library -lm
Error: linking with LLD failed

or

CC=clang ~/ldc2-1.10.0-beta1-linux-x86_64/bin/ldc2 -linker=lld retrycatch.d
/usr/bin/ld.lld: error: unknown argument: --no-warn-search-mismatch
clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)
Error: /usr/bin/clang failed with status: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions