Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/apple/stable/20190619' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
swift-ci committed Oct 8, 2019
2 parents dbf97d9 + 7c4fe05 commit 36a5e1a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
8 changes: 6 additions & 2 deletions cmake/modules/AddClang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,13 @@ macro(add_clang_library name)
# llvm_add_library ignores BUILD_SHARED_LIBS if STATIC is explicitly set,
# so we need to handle it here.
if(BUILD_SHARED_LIBS)
set(LIBTYPE SHARED OBJECT)
set(LIBTYPE SHARED)
else()
set(LIBTYPE STATIC OBJECT)
set(LIBTYPE STATIC)
endif()
if(NOT XCODE)
# The Xcode generator doesn't handle object libraries correctly.
list(APPEND LIBTYPE OBJECT)
endif()
set_property(GLOBAL APPEND PROPERTY CLANG_STATIC_LIBS ${name})
endif()
Expand Down
1 change: 1 addition & 0 deletions include/indexstore/indexstore.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ typedef enum {
INDEXSTORE_SYMBOL_ROLE_ADDRESSOF = 1 << 7,
INDEXSTORE_SYMBOL_ROLE_IMPLICIT = 1 << 8,
INDEXSTORE_SYMBOL_ROLE_UNDEFINITION = 1 << 19,
INDEXSTORE_SYMBOL_ROLE_NAMEREFERENCE = 1 << 20,

// Relation roles.
INDEXSTORE_SYMBOL_ROLE_REL_CHILDOF = 1 << 9,
Expand Down
6 changes: 5 additions & 1 deletion lib/DirectoryWatcher/DirectoryWatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ struct DirectoryScan {
# define __has_include(x) 0
#endif

#if __has_include(<CoreServices/CoreServices.h>)
#if !defined(__is_target_os)
#define __is_target_os(x) 0
#endif

#if __is_target_os(macos)
# include "DirectoryWatcher-mac.inc.h"
#elif __has_include(<sys/inotify.h>)
# include "DirectoryWatcher-linux.inc.h"
Expand Down
5 changes: 5 additions & 0 deletions lib/Index/IndexDataStoreUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ SymbolRoleSet index::getSymbolRoles(uint64_t Roles) {
SymbolRoles |= (SymbolRoleSet)SymbolRole::RelationIBTypeOf;
if (Roles & INDEXSTORE_SYMBOL_ROLE_REL_SPECIALIZATIONOF)
SymbolRoles |= (SymbolRoleSet)SymbolRole::RelationSpecializationOf;
if (Roles & INDEXSTORE_SYMBOL_ROLE_NAMEREFERENCE)
SymbolRoles |= (SymbolRoleSet)SymbolRole::NameReference;

return SymbolRoles;
}
Expand Down Expand Up @@ -511,6 +513,9 @@ uint64_t index::getIndexStoreRoles(SymbolRoleSet Roles) {
case SymbolRole::RelationSpecializationOf:
storeRoles |= INDEXSTORE_SYMBOL_ROLE_REL_SPECIALIZATIONOF;
break;
case SymbolRole::NameReference:
storeRoles |= INDEXSTORE_SYMBOL_ROLE_NAMEREFERENCE;
break;
}
});
return storeRoles;
Expand Down
8 changes: 7 additions & 1 deletion tools/clang-shlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ endif()
get_property(clang_libs GLOBAL PROPERTY CLANG_STATIC_LIBS)

foreach (lib ${clang_libs})
list(APPEND _OBJECTS $<TARGET_OBJECTS:obj.${lib}>)
if(XCODE)
# Xcode doesn't support object libraries, so we have to trick it into
# linking the static libraries instead.
list(APPEND _DEPS "-force_load" ${lib})
else()
list(APPEND _OBJECTS $<TARGET_OBJECTS:obj.${lib}>)
endif()
list(APPEND _DEPS $<TARGET_PROPERTY:${lib},INTERFACE_LINK_LIBRARIES>)
list(APPEND _DEPS $<TARGET_PROPERTY:${lib},LINK_LIBRARIES>)
endforeach ()
Expand Down

0 comments on commit 36a5e1a

Please sign in to comment.