From 75958c41e220358b66a12c257f3f87abe4b372d5 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Thu, 8 Aug 2013 00:17:41 +0000 Subject: 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 --- clang/lib/Frontend/CompilerInvocation.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/Frontend') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 27ddd84d52f..a4c93fa5b50 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -502,6 +502,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, } } + Opts.DependentLibraries = Args.getAllArgValues(OPT_dependent_lib); + return Success; } -- cgit v1.2.3