Skip to content

Commit

Permalink
cmake: Inline the add_llvm_symbol_exports.py script
Browse files Browse the repository at this point in the history
This fixes stand-alone builds.

Reviewed By: andrewng

Differential Revision: https://reviews.llvm.org/D137611
  • Loading branch information
tstellar committed Nov 10, 2022
1 parent 1cb97a1 commit a7ba84a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 27 deletions.
8 changes: 7 additions & 1 deletion llvm/cmake/modules/AddLLVM.cmake
Expand Up @@ -103,7 +103,13 @@ function(add_llvm_symbol_exports target_name export_file)
# FIXME: Don't write the "local:" line on OpenBSD.
# in the export file, also add a linker script to version LLVM symbols (form: LLVM_N.M)
add_custom_command(OUTPUT ${native_export_file}
COMMAND "${Python3_EXECUTABLE}" ${LLVM_MAIN_SRC_DIR}/utils/add_llvm_symbol_exports.py ${LLVM_VERSION_MAJOR} ${export_file} ${native_export_file}
COMMAND "${Python3_EXECUTABLE}" "-c"
"import sys; \
lines = [' ' + l.rstrip() for l in sys.stdin] + [' local: *;']; \
print('LLVM_${LLVM_VERSION_MAJOR} {'); \
print(' global:') if len(lines) > 1 else None; \
print(';\\n'.join(lines) + '\\n};')"
< ${export_file} > ${native_export_file}
DEPENDS ${export_file}
VERBATIM
COMMENT "Creating export file for ${target_name}")
Expand Down
26 changes: 0 additions & 26 deletions llvm/utils/add_llvm_symbol_exports.py

This file was deleted.

0 comments on commit a7ba84a

Please sign in to comment.