[PATCH] lld: handling of -flavor / -core command line switches

Oleg Ranevskyy llvm.mail.list at gmail.com
Wed Sep 17 13:35:48 PDT 2014


>>! In D5384#11, @ruiu wrote:
> Nick's concern makes sense. We should allow -flavor only at the first
> argument (i.e. argv[1]) because -flavor can be a valid command line
> argument of the other linker.
> 
> You should process raw argv and argc first for -flavor, and then pass the
> rest to parseArgs.

Thank you for your remark. There is still a problem with this.
1. I am not sure it can always be controlled by user because the user might not run lld directly. E.g., lld might be executed by Boost.Build. I will play with Boost.Build more tomorrow to check again if it's possible to put -flavor first.
2. Passing "the rest" is still incorrect. E.g., GnuLdDriver addresses argv[0] and expects the program name to be there. Mere arguments skipping by doing += on argv to get the rest won't work.

http://reviews.llvm.org/D5384






More information about the llvm-commits mailing list