From 9cf659947ce441ab497be344ede8025f0f347bd2 Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Sat, 17 Jan 2015 16:41:30 -0800
Subject: [PATCH] MacPorts Only: Don't embed the deployment target in the asm
 when using -fno-integrated-as

http://llvm.org/bugs/show_bug.cgi?id=21636

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
---
 llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index c7eb0257d71b..75c4a19bf9f1 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -269,8 +269,10 @@ bool AsmPrinter::doInitialization(Module &M) {
   // alternative is duplicated code in each of the target asm printers that
   // use the directive, where it would need the same conditionalization
   // anyway.
-  const Triple &Target = TM.getTargetTriple();
-  OutStreamer->emitVersionForTarget(Target, M.getSDKVersion());
+  if (MAI->useIntegratedAssembler()) {
+    const Triple &Target = TM.getTargetTriple();
+    OutStreamer->emitVersionForTarget(Target, M.getSDKVersion());
+  }
 
   // Allow the target to emit any magic that it wants at the start of the file.
   emitStartOfAsmFile(M);
-- 
2.37.2

