Merge pull request #2610 from Daniel-B-Smith/clang-link

Add link option specific to Clang
This commit is contained in:
Alex Miller 2020-01-29 18:19:04 -08:00 committed by GitHub
commit 99a1a3694b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -199,6 +199,10 @@ else()
endif()
if (CLANG)
add_compile_options()
# Clang has link errors unless `atomic` is specifically requested.
if(NOT APPLE)
add_link_options(-latomic)
endif()
if (APPLE OR USE_LIBCXX)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-stdlib=libc++>)
add_compile_definitions(WITH_LIBCXX)