diff options
-rw-r--r-- | clang/cmake/modules/AddClang.cmake | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake index cdc8bd5..091aec9 100644 --- a/clang/cmake/modules/AddClang.cmake +++ b/clang/cmake/modules/AddClang.cmake @@ -109,14 +109,13 @@ macro(add_clang_library name) llvm_add_library(${name} ${LIBTYPE} ${ARG_UNPARSED_ARGUMENTS} ${srcs}) if(MSVC AND NOT CLANG_LINK_CLANG_DYLIB) - # Make sure all consumers also turn off visibility macros so they're not - # trying to dllimport symbols. + # Make sure all consumers also turn off visibility macros so there not trying to dllimport symbols. target_compile_definitions(${name} PUBLIC CLANG_BUILD_STATIC) if(TARGET "obj.${name}") target_compile_definitions("obj.${name}" PUBLIC CLANG_BUILD_STATIC) endif() - elseif(TARGET "obj.${name}" AND NOT ARG_SHARED AND NOT ARG_STATIC) - # Clang component libraries linked to clang-cpp are declared without SHARED or STATIC + elseif(NOT ARG_SHARED AND NOT ARG_STATIC) + # Clang component libraries linked in to clang-cpp are declared without SHARED or STATIC target_compile_definitions("obj.${name}" PUBLIC CLANG_EXPORTS) endif() |