summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/patches/patch-r221503-default-target-triple.diff
blob: ee08af46d32a90ea13a790c610d9b82ef5eb3cf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
This patch ensures the target triple that is passed during the compiler build is
respected, instead of mangling it.

Introduced here: http://svnweb.freebsd.org/changeset/base/221503

Index: lib/Support/Unix/Host.inc
===================================================================
--- lib/Support/Unix/Host.inc
+++ lib/Support/Unix/Host.inc
@@ -26,6 +26,11 @@
 
 using namespace llvm;
 
+#ifdef __FreeBSD__
+std::string sys::getDefaultTargetTriple() {
+  return LLVM_DEFAULT_TARGET_TRIPLE;
+}
+#else // __FreeBSD__
 static std::string getOSVersion() {
   struct utsname info;
 
@@ -61,3 +66,4 @@ std::string sys::getDefaultTargetTriple() {
 
   return Triple;
 }
+#endif // __FreeBSD__
OpenPOWER on IntegriCloud