summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2019-05-31 01:34:51 +0000
committerPetr Hosek <phosek@chromium.org>2019-05-31 01:34:51 +0000
commit0f1b23db1a689863550cba3e7b5b9d6dfdc70450 (patch)
treee33ede95b1d64bfc1b4d9c8629ddfa015ef9880e /cmake
parentaa455897d0206d4d64782433a7d70eeb3d93256e (diff)
downloadclang-0f1b23db1a689863550cba3e7b5b9d6dfdc70450.tar.gz
[CMake] Provide an option to use relative paths in debug info
CMake always uses absolute file paths in the generated compiler invocation which results in absolute file paths being embedded in debug info. This is undesirable when building a toolchain e.g. on bots as the debug info may embed the bot source checkout path which is meaningless anywhere else. This change introduces the LLVM_USE_RELATIVE_PATHS_IN_DEBUG_INFO which uses -fdebug-prefix-map (where supported) options to rewrite paths embedded into debug info with relative ones. Additionally, LLVM_SOURCE_PREFIX can be used to override the path to source directory with a different one. Differential Revision: https://reviews.llvm.org/D62622 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/caches/Fuchsia-stage2.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/caches/Fuchsia-stage2.cmake b/cmake/caches/Fuchsia-stage2.cmake
index cedc69fa6f..100a9b164e 100644
--- a/cmake/caches/Fuchsia-stage2.cmake
+++ b/cmake/caches/Fuchsia-stage2.cmake
@@ -15,6 +15,7 @@ set(LLVM_ENABLE_ZLIB ON CACHE BOOL "")
set(LLVM_EXTERNALIZE_DEBUGINFO ON CACHE BOOL "")
set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
+set(LLVM_USE_RELATIVE_PATHS_IN_DEBUG_INFO ON CACHE BOOL "")
set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "")
if(NOT APPLE)