clang-cl: Support the run-time selection options (/MD, /MT et al.)

These flags set some preprocessor macros and injects a dependency
on the runtime library into the object file, which later is picked up
by the linker.

This also adds a new CC1 flag for adding a dependent library.

Differential Revision: http://llvm-reviews.chandlerc.com/D1315

llvm-svn: 187945
This commit is contained in:
Hans Wennborg
2013-08-08 00:17:41 +00:00
parent a5689e69af
commit 75958c41e2
10 changed files with 121 additions and 5 deletions

View File

@@ -502,6 +502,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
}
}
Opts.DependentLibraries = Args.getAllArgValues(OPT_dependent_lib);
return Success;
}