From dcb860ba4e88cad44083a2d9ff7e15dc437cc231 Mon Sep 17 00:00:00 2001 Date: Sun, 16 May 2021 12:16:41 -0700 Subject: [PATCH 02/24] MacPorts Only: Don't embed the deployment target in the asm when using -fno-integrated-as --- 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 85754bf29d0c..2a5c09b15d6d 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -286,8 +286,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.21.1 (Apple Git-122.3)