diff options
-rw-r--r-- | tools/CIndex/CIndex.darwin.exports | 81 | ||||
-rw-r--r-- | tools/CIndex/CIndex.exports | 162 | ||||
-rw-r--r-- | tools/CIndex/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tools/CIndex/Makefile | 3 |
4 files changed, 169 insertions, 83 deletions
diff --git a/tools/CIndex/CIndex.darwin.exports b/tools/CIndex/CIndex.darwin.exports new file mode 100644 index 0000000000..b361168053 --- /dev/null +++ b/tools/CIndex/CIndex.darwin.exports @@ -0,0 +1,81 @@ +_clang_annotateTokens +_clang_codeComplete +_clang_codeCompleteGetDiagnostic +_clang_codeCompleteGetNumDiagnostics +_clang_constructUSR_ObjCCategory +_clang_constructUSR_ObjCClass +_clang_constructUSR_ObjCIvar +_clang_constructUSR_ObjCMethod +_clang_constructUSR_ObjCProperty +_clang_constructUSR_ObjCProtocol +_clang_createIndex +_clang_createTranslationUnit +_clang_createTranslationUnitFromSourceFile +_clang_defaultDiagnosticDisplayOptions +_clang_disposeCodeCompleteResults +_clang_disposeDiagnostic +_clang_disposeIndex +_clang_disposeString +_clang_disposeTokens +_clang_disposeTranslationUnit +_clang_enableStackTraces +_clang_equalCursors +_clang_equalLocations +_clang_formatDiagnostic +_clang_getCString +_clang_getClangVersion +_clang_getCompletionChunkCompletionString +_clang_getCompletionChunkKind +_clang_getCompletionChunkText +_clang_getCursor +_clang_getCursorDefinition +_clang_getCursorExtent +_clang_getCursorKind +_clang_getCursorKindSpelling +_clang_getCursorLanguage +_clang_getCursorLinkage +_clang_getCursorLocation +_clang_getCursorReferenced +_clang_getCursorSpelling +_clang_getCursorUSR +_clang_getDefinitionSpellingAndExtent +_clang_getDiagnostic +_clang_getDiagnosticFixIt +_clang_getDiagnosticLocation +_clang_getDiagnosticNumFixIts +_clang_getDiagnosticNumRanges +_clang_getDiagnosticRange +_clang_getDiagnosticSeverity +_clang_getDiagnosticSpelling +_clang_getFile +_clang_getFileName +_clang_getFileTime +_clang_getInclusions +_clang_getInstantiationLocation +_clang_getLocation +_clang_getNullCursor +_clang_getNullLocation +_clang_getNullRange +_clang_getNumCompletionChunks +_clang_getNumDiagnostics +_clang_getRange +_clang_getRangeEnd +_clang_getRangeStart +_clang_getTokenExtent +_clang_getTokenKind +_clang_getTokenLocation +_clang_getTokenSpelling +_clang_getTranslationUnitCursor +_clang_getTranslationUnitSpelling +_clang_isCursorDefinition +_clang_isDeclaration +_clang_isExpression +_clang_isInvalid +_clang_isPreprocessing +_clang_isReference +_clang_isStatement +_clang_isTranslationUnit +_clang_isUnexposed +_clang_setUseExternalASTGeneration +_clang_tokenize +_clang_visitChildren diff --git a/tools/CIndex/CIndex.exports b/tools/CIndex/CIndex.exports index b361168053..991bb067f7 100644 --- a/tools/CIndex/CIndex.exports +++ b/tools/CIndex/CIndex.exports @@ -1,81 +1,81 @@ -_clang_annotateTokens -_clang_codeComplete -_clang_codeCompleteGetDiagnostic -_clang_codeCompleteGetNumDiagnostics -_clang_constructUSR_ObjCCategory -_clang_constructUSR_ObjCClass -_clang_constructUSR_ObjCIvar -_clang_constructUSR_ObjCMethod -_clang_constructUSR_ObjCProperty -_clang_constructUSR_ObjCProtocol -_clang_createIndex -_clang_createTranslationUnit -_clang_createTranslationUnitFromSourceFile -_clang_defaultDiagnosticDisplayOptions -_clang_disposeCodeCompleteResults -_clang_disposeDiagnostic -_clang_disposeIndex -_clang_disposeString -_clang_disposeTokens -_clang_disposeTranslationUnit -_clang_enableStackTraces -_clang_equalCursors -_clang_equalLocations -_clang_formatDiagnostic -_clang_getCString -_clang_getClangVersion -_clang_getCompletionChunkCompletionString -_clang_getCompletionChunkKind -_clang_getCompletionChunkText -_clang_getCursor -_clang_getCursorDefinition -_clang_getCursorExtent -_clang_getCursorKind -_clang_getCursorKindSpelling -_clang_getCursorLanguage -_clang_getCursorLinkage -_clang_getCursorLocation -_clang_getCursorReferenced -_clang_getCursorSpelling -_clang_getCursorUSR -_clang_getDefinitionSpellingAndExtent -_clang_getDiagnostic -_clang_getDiagnosticFixIt -_clang_getDiagnosticLocation -_clang_getDiagnosticNumFixIts -_clang_getDiagnosticNumRanges -_clang_getDiagnosticRange -_clang_getDiagnosticSeverity -_clang_getDiagnosticSpelling -_clang_getFile -_clang_getFileName -_clang_getFileTime -_clang_getInclusions -_clang_getInstantiationLocation -_clang_getLocation -_clang_getNullCursor -_clang_getNullLocation -_clang_getNullRange -_clang_getNumCompletionChunks -_clang_getNumDiagnostics -_clang_getRange -_clang_getRangeEnd -_clang_getRangeStart -_clang_getTokenExtent -_clang_getTokenKind -_clang_getTokenLocation -_clang_getTokenSpelling -_clang_getTranslationUnitCursor -_clang_getTranslationUnitSpelling -_clang_isCursorDefinition -_clang_isDeclaration -_clang_isExpression -_clang_isInvalid -_clang_isPreprocessing -_clang_isReference -_clang_isStatement -_clang_isTranslationUnit -_clang_isUnexposed -_clang_setUseExternalASTGeneration -_clang_tokenize -_clang_visitChildren +clang_annotateTokens +clang_codeComplete +clang_codeCompleteGetDiagnostic +clang_codeCompleteGetNumDiagnostics +clang_constructUSR_ObjCCategory +clang_constructUSR_ObjCClass +clang_constructUSR_ObjCIvar +clang_constructUSR_ObjCMethod +clang_constructUSR_ObjCProperty +clang_constructUSR_ObjCProtocol +clang_createIndex +clang_createTranslationUnit +clang_createTranslationUnitFromSourceFile +clang_defaultDiagnosticDisplayOptions +clang_disposeCodeCompleteResults +clang_disposeDiagnostic +clang_disposeIndex +clang_disposeString +clang_disposeTokens +clang_disposeTranslationUnit +clang_enableStackTraces +clang_equalCursors +clang_equalLocations +clang_formatDiagnostic +clang_getCString +clang_getClangVersion +clang_getCompletionChunkCompletionString +clang_getCompletionChunkKind +clang_getCompletionChunkText +clang_getCursor +clang_getCursorDefinition +clang_getCursorExtent +clang_getCursorKind +clang_getCursorKindSpelling +clang_getCursorLanguage +clang_getCursorLinkage +clang_getCursorLocation +clang_getCursorReferenced +clang_getCursorSpelling +clang_getCursorUSR +clang_getDefinitionSpellingAndExtent +clang_getDiagnostic +clang_getDiagnosticFixIt +clang_getDiagnosticLocation +clang_getDiagnosticNumFixIts +clang_getDiagnosticNumRanges +clang_getDiagnosticRange +clang_getDiagnosticSeverity +clang_getDiagnosticSpelling +clang_getFile +clang_getFileName +clang_getFileTime +clang_getInclusions +clang_getInstantiationLocation +clang_getLocation +clang_getNullCursor +clang_getNullLocation +clang_getNullRange +clang_getNumCompletionChunks +clang_getNumDiagnostics +clang_getRange +clang_getRangeEnd +clang_getRangeStart +clang_getTokenExtent +clang_getTokenKind +clang_getTokenLocation +clang_getTokenSpelling +clang_getTranslationUnitCursor +clang_getTranslationUnitSpelling +clang_isCursorDefinition +clang_isDeclaration +clang_isExpression +clang_isInvalid +clang_isPreprocessing +clang_isReference +clang_isStatement +clang_isTranslationUnit +clang_isUnexposed +clang_setUseExternalASTGeneration +clang_tokenize +clang_visitChildren diff --git a/tools/CIndex/CMakeLists.txt b/tools/CIndex/CMakeLists.txt index 6aa7a57983..609719e627 100644 --- a/tools/CIndex/CMakeLists.txt +++ b/tools/CIndex/CMakeLists.txt @@ -32,9 +32,13 @@ add_clang_library(CIndex if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # FIXME: Deal with LLVM_SUBMIT_VERSION? + # FIXME: This uses a special darwin-specific exports file in order to + # get underscore-prefixed names. It would be better to have build rules + # which know how to produce a darwin-suitable exports file from the + # regular exports file. set_target_properties(CIndex PROPERTIES - LINK_FLAGS "-avoid-version -Wl,-exported_symbols_list -Wl,${CMAKE_CURRENT_SOURCE_DIR}/CIndex.exports -Wl,-dead_strip -Wl,-seg1addr -Wl,0xE0000000" + LINK_FLAGS "-avoid-version -Wl,-exported_symbols_list -Wl,${CMAKE_CURRENT_SOURCE_DIR}/CIndex.darwin.exports -Wl,-dead_strip -Wl,-seg1addr -Wl,0xE0000000" INSTALL_NAME_DIR "@executable_path/../lib" ) endif() diff --git a/tools/CIndex/Makefile b/tools/CIndex/Makefile index 650bcd3645..391746d4d4 100644 --- a/tools/CIndex/Makefile +++ b/tools/CIndex/Makefile @@ -10,6 +10,8 @@ LEVEL = ../../../.. LIBRARYNAME = CIndex +EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/CIndex.exports + CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include # Include this here so we can get the configuration of the targets @@ -40,7 +42,6 @@ ifeq ($(HOST_OS),Darwin) # extra options to override libtool defaults LLVMLibsOptions := $(LLVMLibsOptions) \ -avoid-version \ - -Wl,-exported_symbols_list -Wl,$(PROJ_SRC_DIR)/CIndex.exports \ -Wl,-dead_strip \ -Wl,-seg1addr -Wl,0xE0000000 |