summaryrefslogtreecommitdiff
path: root/lib/CodeGen/ModuleBuilder.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2013-08-08 00:17:41 +0000
committerHans Wennborg <hans@hanshq.net>2013-08-08 00:17:41 +0000
commitb3574796d7cc0113e54b6516fc16e17ca09459fb (patch)
tree111eb33a631b2786477fc39dde10313586262f64 /lib/CodeGen/ModuleBuilder.cpp
parent712b7473f9de7cc1979c3754d03e15a2f492349e (diff)
downloadclang-b3574796d7cc0113e54b6516fc16e17ca09459fb.tar.gz
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187945 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ModuleBuilder.cpp')
-rw-r--r--lib/CodeGen/ModuleBuilder.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/ModuleBuilder.cpp b/lib/CodeGen/ModuleBuilder.cpp
index 7e0e3aac07..c6d40330e0 100644
--- a/lib/CodeGen/ModuleBuilder.cpp
+++ b/lib/CodeGen/ModuleBuilder.cpp
@@ -60,6 +60,9 @@ namespace {
TD.reset(new llvm::DataLayout(Ctx->getTargetInfo().getTargetDescription()));
Builder.reset(new CodeGen::CodeGenModule(Context, CodeGenOpts, *M, *TD,
Diags));
+
+ for (size_t i = 0, e = CodeGenOpts.DependentLibraries.size(); i < e; ++i)
+ HandleDependentLibrary(CodeGenOpts.DependentLibraries[i]);
}
virtual void HandleCXXStaticMemberVarInstantiation(VarDecl *VD) {