[PATCH] [LinkModules] Intelligently merge triples that differ only in the minimum version number if the vendor is apple

Tom Stellard thomas.stellard at amd.com
Thu Feb 12 08:59:01 PST 2015




================
Comment at: lib/Linker/LinkModules.cpp:1501-1505
@@ -1487,3 +1500,7 @@
                 DstM->getTargetTriple() + "'\n");
-  }
+
+  // If vendor is apple, pick the triple with the larger version number.
+  if (SrcTriple.getVendor() == Triple::Apple)
+    if (DstTriple.isOSVersionLT(SrcTriple))
+      DstM->setTargetTriple(SrcM->getTargetTriple());
 
----------------

I've run into this problem too when trying to link amdgcn triples with differing operating systems  (e.g. amgcn-- and amdgcn--amdhsa).

Would it be possible to move this part into a separate function like you've done for triplesMatch(), so that it could be more easily updated for other targets.

Thanks,
Tom

http://reviews.llvm.org/D7591

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list