Author: phosek Date: Thu May 30 18:34:51 2019 New Revision: 362185 URL: http://llvm.org/viewvc/llvm-project?rev=362185&view=rev Log: [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 Modified: cfe/trunk/cmake/caches/Fuchsia-stage2.cmake Modified: cfe/trunk/cmake/caches/Fuchsia-stage2.cmake URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/cmake/caches/Fuchsia-stage2.cmake?rev=362185&r1=362184&r2=362185&view=diff ============================================================================== --- cfe/trunk/cmake/caches/Fuchsia-stage2.cmake (original) +++ cfe/trunk/cmake/caches/Fuchsia-stage2.cmake Thu May 30 18:34:51 2019 @@ -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) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits