This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Remove used --sysroot option
ClosedPublic

Authored by sbc100 on Dec 2 2017, 3:43 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.Dec 2 2017, 3:43 PM
sbc100 added a reviewer: ruiu.Dec 2 2017, 3:44 PM
sbc100 added a subscriber: llvm-commits.
sbc100 updated this revision to Diff 125280.Dec 2 2017, 3:44 PM
  • remove from .td file

Sysroot is a useful feature on other platforms. What is the reason for removing it, rather than implementing it :-)?

sbc100 added a comment.Dec 3 2017, 9:18 AM

I'm not removing --sysroot from the toolchain (i.e. clang and the driver), only from lld. In lld only the ELF driver supports sysroot and the only thing is provides is that ability for the user to pass special -L flag with = at the start. i.e. -L=/path/in/sysroot. Do you think this is useful feature? Normally the sysroot library paths are constructed by clang based on the --sysroot you pass to it, and are fully expanded by the time the linker sees them.

sbc100 added a comment.Dec 3 2017, 9:20 AM

It allows one to write:

lld --sysroot=/foo -L=/usr/lib -L=/usr/local/lib

as shorthand for:

lld -L/foo/usr/lib -L/foo/usr/local/lib

(although in this case is actually shorter to write the latter).

I've need seen this used in practice and its not used by the clang driver.

sbc100 added a comment.Dec 3 2017, 9:21 AM

I would argue that we can always add this feature if the future, but implementing now seems unnecessary.

Ok, cool. Yeah, I was mainly thinking about --sysroot in clang.

ruiu accepted this revision.Dec 4 2017, 10:49 AM

I'm happy to see it's gone. LGTM

This revision is now accepted and ready to land.Dec 4 2017, 10:49 AM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.