[PATCH] D75328: [cmake] Fix LLVM_USE_SPLIT_DWARF
Michael Liao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 28 11:12:18 PST 2020
hliao updated this revision to Diff 247321.
hliao added a comment.
Think again. There's no need to tell the languages for adding that compile option.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75328/new/
https://reviews.llvm.org/D75328
Files:
llvm/cmake/modules/HandleLLVMOptions.cmake
Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -747,8 +747,12 @@
endif()
# Turn on -gsplit-dwarf if requested
-if(LLVM_USE_SPLIT_DWARF)
- add_definitions("-gsplit-dwarf")
+if (LLVM_USE_SPLIT_DWARF)
+ # Limit to clang and gcc so far. Add compilers supporting this option.
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
+ CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ add_compile_options(-gsplit-dwarf)
+ endif()
endif()
add_definitions( -D__STDC_CONSTANT_MACROS )
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75328.247321.patch
Type: text/x-patch
Size: 645 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200228/3543a964/attachment.bin>
More information about the llvm-commits
mailing list