summaryrefslogtreecommitdiffstats
path: root/clang/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
commit75958c41e220358b66a12c257f3f87abe4b372d5 (patch)
tree7fb948b065b519816df001efa9bf4691ffb0ea0c /clang/lib/CodeGen/ModuleBuilder.cpp
parenta5689e69afbd1b43c35958be453192a48c507d37 (diff)
downloadbcm5719-llvm-75958c41e220358b66a12c257f3f87abe4b372d5.tar.gz
bcm5719-llvm-75958c41e220358b66a12c257f3f87abe4b372d5.zip
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
Diffstat (limited to 'clang/lib/CodeGen/ModuleBuilder.cpp')
-rw-r--r--clang/lib/CodeGen/ModuleBuilder.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/ModuleBuilder.cpp b/clang/lib/CodeGen/ModuleBuilder.cpp
index 7e0e3aac072..c6d40330e0c 100644
--- a/clang/lib/CodeGen/ModuleBuilder.cpp
+++ b/clang/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) {
OpenPOWER on IntegriCloud