diff --git a/libcxx/lib/CMakeLists.txt b/libcxx/lib/CMakeLists.txt index 231ccda614fa..c6a94e3b8149 100644 --- a/libcxx/lib/CMakeLists.txt +++ b/libcxx/lib/CMakeLists.txt @@ -332,7 +332,7 @@ if (LIBCXX_ENABLE_SHARED AND LIBCXX_ENABLE_ABI_LINKER_SCRIPT) # after cxx builds. add_custom_command(TARGET cxx_shared POST_BUILD COMMAND - ${PYTHON_EXECUTABLE} ${LIBCXX_SOURCE_DIR}/utils/gen_link_script/gen_link_script.py + ${PYTHON_EXECUTABLE} ${LIBCXX_SOURCE_DIR}/utils/gen_link_script.py ARGS "$" ${LIBCXX_INTERFACE_LIBRARY_NAMES} diff --git a/libcxx/lib/abi/CMakeLists.txt b/libcxx/lib/abi/CMakeLists.txt index 464643c70a9e..c207674258a1 100644 --- a/libcxx/lib/abi/CMakeLists.txt +++ b/libcxx/lib/abi/CMakeLists.txt @@ -27,7 +27,7 @@ endif() if (LIBCXX_HAS_ABILIST_CONFIGURATION) set(ABILIST_FILE "${CMAKE_CURRENT_LIST_DIR}/${GENERIC_TARGET_TRIPLE}.abilist") - set(SYMDIFF_EXE "${LIBCXX_SOURCE_DIR}/utils/sym_check/sym_diff.py") + set(SYMDIFF_EXE "${LIBCXX_SOURCE_DIR}/utils/sym_diff.py") add_custom_target(check-cxx-abilist ${SYMDIFF_EXE} --only-stdlib-symbols --strict ${ABILIST_FILE} $ diff --git a/libcxx/test/libcxx/test/config.py b/libcxx/test/libcxx/test/config.py index ae48c735a233..f1bfe3b9edc9 100644 --- a/libcxx/test/libcxx/test/config.py +++ b/libcxx/test/libcxx/test/config.py @@ -932,7 +932,7 @@ class Configuration(object): # Configure run shortcut sub.append(('%run', exec_str + ' %t.exe')) # Configure not program substitutions - not_py = os.path.join(self.libcxx_src_root, 'utils', 'not', 'not.py') + not_py = os.path.join(self.libcxx_src_root, 'utils', 'not.py') not_str = '%s %s ' % (sys.executable, not_py) sub.append(('not ', not_str)) diff --git a/libcxx/utils/gen_link_script/gen_link_script.py b/libcxx/utils/gen_link_script.py similarity index 100% rename from libcxx/utils/gen_link_script/gen_link_script.py rename to libcxx/utils/gen_link_script.py diff --git a/libcxx/utils/libcxx/__init__.py b/libcxx/utils/libcxx/__init__.py new file mode 100644 index 000000000000..7523a3d8bb9b --- /dev/null +++ b/libcxx/utils/libcxx/__init__.py @@ -0,0 +1,17 @@ +#===----------------------------------------------------------------------===## +# +# The LLVM Compiler Infrastructure +# +# This file is dual licensed under the MIT and the University of Illinois Open +# Source Licenses. See LICENSE.TXT for details. +# +#===----------------------------------------------------------------------===## + +"""libcxx python utilities""" + +__author__ = 'Eric Fiselier' +__email__ = 'eric@efcs.ca' +__versioninfo__ = (0, 1, 0) +__version__ = ' '.join(str(v) for v in __versioninfo__) + 'dev' + +__all__ = [] diff --git a/libcxx/utils/sym_check/sym_check/__init__.py b/libcxx/utils/libcxx/sym_check/__init__.py similarity index 100% rename from libcxx/utils/sym_check/sym_check/__init__.py rename to libcxx/utils/libcxx/sym_check/__init__.py diff --git a/libcxx/utils/sym_check/sym_check/diff.py b/libcxx/utils/libcxx/sym_check/diff.py similarity index 98% rename from libcxx/utils/sym_check/sym_check/diff.py rename to libcxx/utils/libcxx/sym_check/diff.py index c89c4ef696ed..55443bd6fd59 100644 --- a/libcxx/utils/sym_check/sym_check/diff.py +++ b/libcxx/utils/libcxx/sym_check/diff.py @@ -11,7 +11,7 @@ diff - A set of functions for diff-ing two symbol lists. """ -from sym_check import util +from libcxx.sym_check import util def _symbol_difference(lhs, rhs): diff --git a/libcxx/utils/sym_check/sym_check/extract.py b/libcxx/utils/libcxx/sym_check/extract.py similarity index 99% rename from libcxx/utils/sym_check/sym_check/extract.py rename to libcxx/utils/libcxx/sym_check/extract.py index d132e22822bb..596302bf3c9f 100644 --- a/libcxx/utils/sym_check/sym_check/extract.py +++ b/libcxx/utils/libcxx/sym_check/extract.py @@ -14,7 +14,7 @@ import distutils.spawn import sys import re -from sym_check import util +from libcxx.sym_check import util extract_ignore_names = ['_init', '_fini'] diff --git a/libcxx/utils/sym_check/sym_check/match.py b/libcxx/utils/libcxx/sym_check/match.py similarity index 100% rename from libcxx/utils/sym_check/sym_check/match.py rename to libcxx/utils/libcxx/sym_check/match.py diff --git a/libcxx/utils/sym_check/sym_check/util.py b/libcxx/utils/libcxx/sym_check/util.py similarity index 98% rename from libcxx/utils/sym_check/sym_check/util.py rename to libcxx/utils/libcxx/sym_check/util.py index 32055d84c893..58e0b954ca71 100644 --- a/libcxx/utils/sym_check/sym_check/util.py +++ b/libcxx/utils/libcxx/sym_check/util.py @@ -152,9 +152,9 @@ def is_library_file(filename): def extract_or_load(filename): - import sym_check.extract + import libcxx.sym_check.extract if is_library_file(filename): - return sym_check.extract.extract_symbols(filename) + return libcxx.sym_check.extract.extract_symbols(filename) return read_syms_from_file(filename) def adjust_mangled_name(name): diff --git a/libcxx/utils/not/not.py b/libcxx/utils/not.py similarity index 100% rename from libcxx/utils/not/not.py rename to libcxx/utils/not.py diff --git a/libcxx/utils/sym_check/sym_diff.py b/libcxx/utils/sym_diff.py similarity index 98% rename from libcxx/utils/sym_check/sym_diff.py rename to libcxx/utils/sym_diff.py index 631f9c6b4988..c01f71c928d9 100755 --- a/libcxx/utils/sym_check/sym_diff.py +++ b/libcxx/utils/sym_diff.py @@ -13,7 +13,7 @@ sym_diff - Compare two symbol lists and output the differences. from argparse import ArgumentParser import sys -from sym_check import diff, util +from libcxx.sym_check import diff, util def main(): diff --git a/libcxx/utils/sym_check/sym_extract.py b/libcxx/utils/sym_extract.py similarity index 97% rename from libcxx/utils/sym_check/sym_extract.py rename to libcxx/utils/sym_extract.py index 27765679ed80..0d9d2eeb8e5a 100755 --- a/libcxx/utils/sym_check/sym_extract.py +++ b/libcxx/utils/sym_extract.py @@ -11,7 +11,7 @@ sym_extract - Extract and output a list of symbols from a shared library. """ from argparse import ArgumentParser -from sym_check import extract, util +from libcxx.sym_check import extract, util def main(): diff --git a/libcxx/utils/sym_check/sym_match.py b/libcxx/utils/sym_match.py similarity index 97% rename from libcxx/utils/sym_check/sym_match.py rename to libcxx/utils/sym_match.py index 231bdc8b367a..48582ce66672 100755 --- a/libcxx/utils/sym_check/sym_match.py +++ b/libcxx/utils/sym_match.py @@ -13,7 +13,7 @@ sym_match - Match all symbols in a list against a list of regexes. """ from argparse import ArgumentParser import sys -from sym_check import util, match, extract +from libcxx.sym_check import util, match, extract def main(): diff --git a/libcxx/utils/sym_check/linux_blacklist.txt b/libcxx/utils/symcheck-blacklists/linux_blacklist.txt similarity index 100% rename from libcxx/utils/sym_check/linux_blacklist.txt rename to libcxx/utils/symcheck-blacklists/linux_blacklist.txt diff --git a/libcxx/utils/sym_check/osx_blacklist.txt b/libcxx/utils/symcheck-blacklists/osx_blacklist.txt similarity index 100% rename from libcxx/utils/sym_check/osx_blacklist.txt rename to libcxx/utils/symcheck-blacklists/osx_blacklist.txt