Skip to content

Commit 8876f16

Browse files
authored
Revert "Fix a cmake error when using the Xcode generator. (#119403)"
This reverts commit 1842a3d.
1 parent 7b05367 commit 8876f16

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clang/cmake/modules/AddClang.cmake

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,13 @@ macro(add_clang_library name)
109109
llvm_add_library(${name} ${LIBTYPE} ${ARG_UNPARSED_ARGUMENTS} ${srcs})
110110

111111
if(MSVC AND NOT CLANG_LINK_CLANG_DYLIB)
112-
# Make sure all consumers also turn off visibility macros so they're not
113-
# trying to dllimport symbols.
112+
# Make sure all consumers also turn off visibility macros so there not trying to dllimport symbols.
114113
target_compile_definitions(${name} PUBLIC CLANG_BUILD_STATIC)
115114
if(TARGET "obj.${name}")
116115
target_compile_definitions("obj.${name}" PUBLIC CLANG_BUILD_STATIC)
117116
endif()
118-
elseif(TARGET "obj.${name}" AND NOT ARG_SHARED AND NOT ARG_STATIC)
119-
# Clang component libraries linked to clang-cpp are declared without SHARED or STATIC
117+
elseif(NOT ARG_SHARED AND NOT ARG_STATIC)
118+
# Clang component libraries linked in to clang-cpp are declared without SHARED or STATIC
120119
target_compile_definitions("obj.${name}" PUBLIC CLANG_EXPORTS)
121120
endif()
122121

0 commit comments

Comments
 (0)