libclang: Fixes for the python script that generates the export list

This script was added in 0cf37a3b0617457daaed3224373ffa07724f8482.
This commit is contained in:
Tom Stellard 2021-07-26 18:20:14 -07:00
parent fbaa35e169
commit 0300e16eb0
2 changed files with 4 additions and 4 deletions

View File

@ -64,7 +64,7 @@ endif ()
option(LIBCLANG_BUILD_STATIC
"Build libclang as a static library (in addition to a shared one)" OFF)
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/libclang.exports)
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_BINARY_DIR}/libclang-generic.exports)
set(LIBCLANG_VERSION_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/libclang.map)
if(MSVC)

View File

@ -3,9 +3,9 @@ import os
import sys
input_file = open(sys.argv[1])
output_file = open(sys.argv[2])
output_file = open(sys.argv[2], 'w')
for line in input_file:
m = re.search('clang_[^;]+', line)
m = re.search('^\s+(clang_[^;]+)', line)
if m:
output_file.write(m.group(0))
output_file.write(m.group(1) + "\n")