From e5e407beb4f5f097ede7f3cc9af706128a197f7e Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Tue, 29 Nov 2016 04:17:30 +0000 Subject: [PATCH] Add comments. llvm-svn: 288111 --- lld/COFF/DriverUtils.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lld/COFF/DriverUtils.cpp b/lld/COFF/DriverUtils.cpp index c548bbac930b..6c0486ef2cd9 100644 --- a/lld/COFF/DriverUtils.cpp +++ b/lld/COFF/DriverUtils.cpp @@ -666,8 +666,11 @@ llvm::opt::InputArgList ArgParser::parse(ArrayRef ArgsArr) { return Args; } +// link.exe has an interesting feature. If LINK environment exists, +// its contents are handled as a command line string. So you can pass +// extra arguments using the environment variable. llvm::opt::InputArgList ArgParser::parseLINK(ArrayRef Args) { - // Concatenate LINK env and given arguments and parse them. + // Concatenate LINK env and command line arguments, and then parse them. Optional Env = Process::GetEnv("LINK"); if (!Env) return parse(Args);