Using Clang: Linkers with Different Platforms

I am using clang++ as the linker with both Ubuntu Linux and Mac OS X. The Ubuntu version invokes collect2, which has parameters –whole-archive and –no-whole-archive to force linking libraries, whereas the Mac OS X version invokes ld (llvm based), which has -force_load for the same purpose.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.