Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/compiler-rt/files/9999/
Date: Fri, 02 Sep 2016 21:40:15
Message-Id: 1472852403.abbca1be052d1edd4b3dc90845a4d39773b2a851.mgorny@gentoo
1 commit: abbca1be052d1edd4b3dc90845a4d39773b2a851
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 2 20:52:25 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 2 21:40:03 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abbca1be
7
8 sys-libs/compiler-rt: Add missing (not committed) patch
9
10 ...-cmake-Support-overriding-llvm-config-que.patch | 46 ++++++++++++++++++++++
11 1 file changed, 46 insertions(+)
12
13 diff --git a/sys-libs/compiler-rt/files/9999/0001-compiler-rt-cmake-Support-overriding-llvm-config-que.patch b/sys-libs/compiler-rt/files/9999/0001-compiler-rt-cmake-Support-overriding-llvm-config-que.patch
14 new file mode 100644
15 index 00000000..5ee5f81
16 --- /dev/null
17 +++ b/sys-libs/compiler-rt/files/9999/0001-compiler-rt-cmake-Support-overriding-llvm-config-que.patch
18 @@ -0,0 +1,46 @@
19 +From 5c956f1867c268111ec05b443ab8fbe0e3b9d500 Mon Sep 17 00:00:00 2001
20 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
21 +Date: Mon, 29 Aug 2016 23:18:25 +0200
22 +Subject: [PATCH] [compiler-rt cmake] Support overriding llvm-config query
23 + results
24 +
25 +Support overriding LLVM_* variables obtained from llvm-config when doing
26 +stand-alone builds. The override of LLVM_MAIN_SRC_DIR is necessary to
27 +provide LLVM sources when the initial directory used to build LLVM does
28 +no longer exist when compiler-rt is built stand-alone. This is
29 +especially the case when building the projects separately in temporary
30 +directories with unpredictable names.
31 +
32 +The code is based on existing CMakeLists.txt from clang. Alike clang, it
33 +extends the override to all queried variables.
34 +---
35 + cmake/Modules/CompilerRTUtils.cmake | 13 +++++++++----
36 + 1 file changed, 9 insertions(+), 4 deletions(-)
37 +
38 +diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
39 +index b2f27c0..5523c0a 100644
40 +--- a/cmake/Modules/CompilerRTUtils.cmake
41 ++++ b/cmake/Modules/CompilerRTUtils.cmake
42 +@@ -197,10 +197,15 @@ macro(load_llvm_config)
43 + message(FATAL_ERROR "llvm-config failed with status ${HAD_ERROR}")
44 + endif()
45 + string(REGEX REPLACE "[ \t]*[\r\n]+[ \t]*" ";" CONFIG_OUTPUT ${CONFIG_OUTPUT})
46 +- list(GET CONFIG_OUTPUT 0 LLVM_BINARY_DIR)
47 +- list(GET CONFIG_OUTPUT 1 LLVM_TOOLS_BINARY_DIR)
48 +- list(GET CONFIG_OUTPUT 2 LLVM_LIBRARY_DIR)
49 +- list(GET CONFIG_OUTPUT 3 LLVM_MAIN_SRC_DIR)
50 ++ list(GET CONFIG_OUTPUT 0 LLVM_OBJ_ROOT)
51 ++ list(GET CONFIG_OUTPUT 1 TOOLS_BINARY_DIR)
52 ++ list(GET CONFIG_OUTPUT 2 LIBRARY_DIR)
53 ++ list(GET CONFIG_OUTPUT 3 MAIN_SRC_DIR)
54 ++
55 ++ set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
56 ++ set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
57 ++ set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
58 ++ set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
59 +
60 + # Make use of LLVM CMake modules.
61 + file(TO_CMAKE_PATH ${LLVM_BINARY_DIR} LLVM_BINARY_DIR_CMAKE_STYLE)
62 +--
63 +2.9.3
64 +