summaryrefslogtreecommitdiff
blob: 904a72a358a96da0a4b83e3e38efa3a957000cee (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From b28503def986bcbc388a04be0d51cbe80bc59506 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Tue, 9 Jun 2015 12:11:50 +0200
Subject: [PATCH] Install clang runtime into /usr/lib (without suffix)

---
 lib/Driver/Driver.cpp               | 3 +--
 lib/Frontend/CompilerInvocation.cpp | 3 +--
 lib/Headers/CMakeLists.txt          | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index a04a1f8..418d46a 100644
--- a/tools/clang/lib/Driver/Driver.cpp
+++ b/tools/clang//lib/Driver/Driver.cpp
@@ -66,8 +66,7 @@ Driver::Driver(StringRef ClangExecutable, StringRef DefaultTargetTriple,
   if (ClangResourceDir != "") {
     llvm::sys::path::append(P, ClangResourceDir);
   } else {
-    StringRef ClangLibdirSuffix(CLANG_LIBDIR_SUFFIX);
-    llvm::sys::path::append(P, "..", Twine("lib") + ClangLibdirSuffix, "clang",
+    llvm::sys::path::append(P, "..", "lib", "clang",
                             CLANG_VERSION_STRING);
   }
   ResourceDir = P.str();
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 9485767..0b9ecbd 100644
--- a/tools/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/tools/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1053,8 +1053,7 @@ std::string CompilerInvocation::GetResourcesPath(const char *Argv0,
   if (ClangResourceDir != "") {
     llvm::sys::path::append(P, ClangResourceDir);
   } else {
-    StringRef ClangLibdirSuffix(CLANG_LIBDIR_SUFFIX);
-    llvm::sys::path::append(P, "..", Twine("lib") + ClangLibdirSuffix, "clang",
+    llvm::sys::path::append(P, "..", "lib", "clang",
                             CLANG_VERSION_STRING);
   }
 
diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
index 29a738e..3769d23 100644
--- a/tools/clang/lib/Headers/CMakeLists.txt
+++ b/tools/clang/lib/Headers/CMakeLists.txt
@@ -93,4 +93,4 @@ set_target_properties(clang-headers PROPERTIES FOLDER "Misc")
 install(
   FILES ${files} ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h
   PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
-  DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
+  DESTINATION lib/clang/${CLANG_VERSION}/include)
-- 
2.4.3