mirror of
				https://github.com/MaskRay/ccls.git
				synced 2025-11-04 14:17:07 +00:00 
			
		
		
		
	Let clang use libc++.
This commit is contained in:
		
							parent
							
								
									990d10a605
								
							
						
					
					
						commit
						5998ae555d
					
				@ -63,6 +63,7 @@ else()
 | 
				
			|||||||
  if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
 | 
					  if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
 | 
				
			||||||
    target_compile_options(ccls PRIVATE
 | 
					    target_compile_options(ccls PRIVATE
 | 
				
			||||||
                           $<$<CONFIG:Debug>:-fno-limit-debug-info>)
 | 
					                           $<$<CONFIG:Debug>:-fno-limit-debug-info>)
 | 
				
			||||||
 | 
					    target_compile_options(ccls PRIVATE -stdlib=libc++)
 | 
				
			||||||
  endif()
 | 
					  endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if(ASAN)
 | 
					  if(ASAN)
 | 
				
			||||||
@ -81,6 +82,13 @@ if(NOT SYSTEM_CLANG)
 | 
				
			|||||||
  download_and_extract_clang(${CLANG_VERSION} ${CLANG_DOWNLOAD_LOCATION})
 | 
					  download_and_extract_clang(${CLANG_VERSION} ${CLANG_DOWNLOAD_LOCATION})
 | 
				
			||||||
  # Used by FindClang
 | 
					  # Used by FindClang
 | 
				
			||||||
  set(CLANG_ROOT ${DOWNLOADED_CLANG_DIR})
 | 
					  set(CLANG_ROOT ${DOWNLOADED_CLANG_DIR})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
 | 
				
			||||||
 | 
					    target_link_libraries(ccls PRIVATE ${CLANG_ROOT}/lib/libc++.a
 | 
				
			||||||
 | 
					                                       ${CLANG_ROOT}/lib/libc++abi.a
 | 
				
			||||||
 | 
					                                       ${CLANG_ROOT}/lib/libc++experimental.a)
 | 
				
			||||||
 | 
					  endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
else()
 | 
					else()
 | 
				
			||||||
  message(STATUS "Using system Clang")
 | 
					  message(STATUS "Using system Clang")
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user