Skip to content

Commit

Permalink
Merge pull request #44 from adrian-prantl/fast-forward
Browse files Browse the repository at this point in the history
Fast forward apple/stable/20190619 to Sep 4.
  • Loading branch information
JDevlieghere authored Oct 29, 2019
2 parents f77138b + 00ca90d commit d07eb80
Show file tree
Hide file tree
Showing 2,725 changed files with 28,536 additions and 95,329 deletions.
35 changes: 19 additions & 16 deletions libcxx/utils/libcxx/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,24 +253,27 @@ def killProcessAndChildren(pid):
TODO: Reimplement this without using psutil so we can
remove our dependency on it.
"""
import psutil
try:
psutilProc = psutil.Process(pid)
# Handle the different psutil API versions
if platform.system() == 'AIX':
subprocess.call('kill -kill $(ps -o pid= -L{})'.format(pid), shell=True)
else:
import psutil
try:
# psutil >= 2.x
children_iterator = psutilProc.children(recursive=True)
except AttributeError:
# psutil 1.x
children_iterator = psutilProc.get_children(recursive=True)
for child in children_iterator:
psutilProc = psutil.Process(pid)
# Handle the different psutil API versions
try:
child.kill()
except psutil.NoSuchProcess:
pass
psutilProc.kill()
except psutil.NoSuchProcess:
pass
# psutil >= 2.x
children_iterator = psutilProc.children(recursive=True)
except AttributeError:
# psutil 1.x
children_iterator = psutilProc.get_children(recursive=True)
for child in children_iterator:
try:
child.kill()
except psutil.NoSuchProcess:
pass
psutilProc.kill()
except psutil.NoSuchProcess:
pass


def executeCommandVerbose(cmd, *args, **kwargs):
Expand Down
66 changes: 40 additions & 26 deletions lldb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ set(CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
)

include(LLDBStandalone)
# If we are not building as part of LLVM, build LLDB as a standalone project,
# using LLVM as an external library.
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
project(lldb)
include(LLDBStandalone)
endif()

include(LLDBConfig)
include(AddLLDB)

Expand All @@ -34,15 +40,38 @@ if (NOT LLDB_DISABLE_PYTHON)
add_subdirectory(scripts)
endif ()

# We need the headers generated by instrinsics_gen before we can compile
# any source file in LLDB as the imported Clang modules might include
# some of these generated headers. This approach is copied from Clang's main
# CMakeLists.txt, so it should kept in sync the code in Clang which was added
# in llvm-svn 308844.
if(LLVM_ENABLE_MODULES AND NOT LLDB_BUILT_STANDALONE)
list(APPEND LLVM_COMMON_DEPENDS intrinsics_gen)
endif()

if(CMAKE_CROSSCOMPILING AND LLDB_BUILT_STANDALONE)
set(LLVM_USE_HOST_TOOLS ON)
include(CrossCompile)
if (NOT NATIVE_LLVM_DIR OR NOT NATIVE_Clang_DIR)
message(FATAL_ERROR
"Crosscompiling standalone requires the variables NATIVE_{CLANG,LLVM}_DIR
for building the native lldb-tblgen used during the build process.")
endif()
llvm_create_cross_target(lldb NATIVE "" Release
-DLLVM_DIR=${NATIVE_LLVM_DIR}
-DClang_DIR=${NATIVE_Clang_DIR})
endif()

# TableGen
add_subdirectory(utils/TableGen)

add_subdirectory(source)
add_subdirectory(tools)
add_subdirectory(docs)

option(LLDB_INCLUDE_TESTS "Generate build targets for the LLDB unit tests." ${LLVM_INCLUDE_TESTS})
option(LLDB_TEST_USE_CUSTOM_C_COMPILER "Use the C compiler provided via LLDB_TEST_C_COMPILER for building test inferiors (instead of the just-built compiler). Defaults to OFF." OFF)
option(LLDB_TEST_USE_CUSTOM_CXX_COMPILER "Use the C++ compiler provided via LLDB_TEST_CXX_COMPILER for building test inferiors (instead of the just-built compiler). Defaults to OFF." OFF)
if(LLDB_INCLUDE_TESTS)
set(LLDB_TEST_BUILD_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lldb-test-build.noindex" CACHE PATH "The build root for building tests.")

# Set the path to the default lldb test executable.
set(LLDB_DEFAULT_TEST_EXECUTABLE "${LLVM_RUNTIME_OUTPUT_INTDIR}/lldb${CMAKE_EXECUTABLE_SUFFIX}")
Expand All @@ -51,15 +80,11 @@ if(LLDB_INCLUDE_TESTS)
set(LLDB_DEFAULT_TEST_DSYMUTIL "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/dsymutil${CMAKE_EXECUTABLE_SUFFIX}")
set(LLDB_DEFAULT_TEST_FILECHECK "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/FileCheck${CMAKE_EXECUTABLE_SUFFIX}")

if (NOT LLDB_TEST_USE_CUSTOM_C_COMPILER AND TARGET clang)
if (TARGET clang)
set(LLDB_DEFAULT_TEST_C_COMPILER "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}")
else()
set(LLDB_DEFAULT_TEST_C_COMPILER "")
endif()

if (NOT LLDB_TEST_USE_CUSTOM_CXX_COMPILER AND TARGET clang)
set(LLDB_DEFAULT_TEST_CXX_COMPILER "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX}")
else()
set(LLDB_DEFAULT_TEST_C_COMPILER "")
set(LLDB_DEFAULT_TEST_CXX_COMPILER "")
endif()

Expand All @@ -71,7 +96,7 @@ if(LLDB_INCLUDE_TESTS)

if (("${LLDB_TEST_C_COMPILER}" STREQUAL "") OR
("${LLDB_TEST_CXX_COMPILER}" STREQUAL ""))
message(FATAL_ERROR "LLDB test compilers not specified. Tests will not run")
message(FATAL_ERROR "LLDB test compilers not specified. Tests will not run.")
endif()

set(LLDB_TEST_DEPS lldb)
Expand All @@ -88,14 +113,6 @@ if(LLDB_INCLUDE_TESTS)
list(APPEND LLDB_TEST_DEPS lldb-server)
endif()

if(TARGET debugserver)
list(APPEND LLDB_TEST_DEPS debugserver)
endif()

if(TARGET lldb-mi)
list(APPEND LLDB_TEST_DEPS lldb-mi)
endif()

if(TARGET lldb-vscode)
list(APPEND LLDB_TEST_DEPS lldb-vscode)
endif()
Expand Down Expand Up @@ -196,19 +213,12 @@ if (NOT LLDB_DISABLE_PYTHON)
DEPENDS ${lldb_scripts_dir}/lldb.py
COMMENT "Python script sym-linking LLDB Python API")

if (TARGET readline)
set(readline_dep readline)
endif()
add_dependencies(finish_swig swig_wrapper liblldb lldb-argdumper ${readline_dep})
add_dependencies(finish_swig swig_wrapper liblldb lldb-argdumper)
set_target_properties(finish_swig swig_wrapper PROPERTIES FOLDER "lldb misc")

# Ensure we do the python post-build step when building lldb.
add_dependencies(lldb finish_swig)

if(LLDB_BUILD_FRAMEWORK)
add_dependencies(lldb-framework finish_swig)
endif()

# Add a Post-Build Event to copy the custom Python DLL to the lldb binaries dir so that Windows can find it when launching
# lldb.exe or any other executables that were linked with liblldb.
if (WIN32 AND NOT "${PYTHON_DLL}" STREQUAL "")
Expand All @@ -222,3 +232,7 @@ if (NOT LLDB_DISABLE_PYTHON)
COMMENT "Copying Python DLL to LLDB binaries directory.")
endif ()
endif ()

if(LLDB_BUILT_STANDALONE AND NOT LLVM_ENABLE_IDE)
llvm_distribution_add_targets()
endif()
8 changes: 0 additions & 8 deletions lldb/CODE_OWNERS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ D: Watchpoints, Trampolines, Target, Command Interpreter, C++ / Objective-C Lang
D: Expression evaluator, IR interpreter, Clang integration
D: Data Formatters

N: Ilia K
E: ki.stfu@gmail.com
D: lldb-mi

N: Ed Maste
E: emaste@freebsd.org
D: FreeBSD
Expand All @@ -34,10 +30,6 @@ E: jmolenda@apple.com
D: ABI, Disassembler, Unwinding, iOS, debugserver, Platform, ObjectFile, SymbolFile,
D: SymbolVendor, DWARF, gdb-remote

N: Hafiz Abid Qadeer
E: abidh.haq@gmail.com
D: lldb-mi

N: Kamil Rytarowski
E: kamil@netbsd.org
D: NetBSD
Expand Down
18 changes: 0 additions & 18 deletions lldb/INSTALL.txt

This file was deleted.

14 changes: 0 additions & 14 deletions lldb/cmake/XcodeHeaderGenerator/CMakeLists.txt

This file was deleted.

8 changes: 8 additions & 0 deletions lldb/cmake/caches/Apple-lldb-Linux.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include(${CMAKE_CURRENT_LIST_DIR}/Apple-lldb-base.cmake)

set(LLVM_DISTRIBUTION_COMPONENTS
lldb
liblldb
lldb-argdumper
lldb-server
CACHE STRING "")
14 changes: 14 additions & 0 deletions lldb/cmake/caches/Apple-lldb-Xcode.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
include(${CMAKE_CURRENT_LIST_DIR}/Apple-lldb-base.cmake)

set(CMAKE_GENERATOR Xcode CACHE STRING "")
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "")
set(CMAKE_XCODE_GENERATE_SCHEME ON CACHE BOOL "")

set(LLDB_BUILD_FRAMEWORK ON CACHE BOOL "")

# Apparently, module-enabled builds clash with Xcode's analysis.
set(LLVM_ENABLE_MODULES OFF CACHE BOOL "" FORCE)

# Print a warning with instructions, if we
# build with Xcode and didn't use this cache.
set(LLDB_EXPLICIT_XCODE_CACHE_USED ON CACHE INTERNAL "")
8 changes: 2 additions & 6 deletions lldb/cmake/caches/Apple-lldb-base.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@ set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "")

set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64 CACHE STRING "")
set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
set(LLVM_ENABLE_MODULES ON CACHE BOOL "")

# Release builds set these explicitly:
#set(LLDB_VERSION_MAJOR 9999 CACHE STRING "")
#set(LLDB_VERSION_MINOR 9 CACHE STRING "")
#set(LLDB_VERSION_PATCH 9 CACHE STRING "")
#set(LLDB_VERSION_SUFFIX git CACHE STRING "")
set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
set(LIBCXX_ENABLE_STATIC OFF CACHE BOOL "")
27 changes: 17 additions & 10 deletions lldb/cmake/caches/Apple-lldb-macOS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@ include(${CMAKE_CURRENT_LIST_DIR}/Apple-lldb-base.cmake)

set(LLDB_BUILD_FRAMEWORK ON CACHE BOOL "")
set(LLDB_NO_INSTALL_DEFAULT_RPATH ON CACHE BOOL "")
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.11 CACHE STRING "")

# Set the install prefix to the default install location on the enduser machine.
# If the location is not writeable on the build machine, specify another prefix
# in the DESTDIR environment variable, e.g.: DESTDIR=/tmp ninja install
# Default install location on the enduser machine. On the build machine, use the
# DESTDIR environment variable in order to relocate the whole installation, e.g.:
# `DESTDIR=/tmp ninja install-distribution`
set(CMAKE_INSTALL_PREFIX /Applications/Xcode.app/Contents/Developer/usr CACHE STRING "")

# Choose the install location for LLDB.framework so that it matches the
# INSTALL_RPATH of the lldb driver. It's either absolute or relative to
# CMAKE_INSTALL_PREFIX. In any case, DESTDIR will be an extra prefix.
# Install location for LLDB.framework on the enduser machine.
# DESTDIR will be an extra prefix.
set(LLDB_FRAMEWORK_INSTALL_DIR /Applications/Xcode.app/Contents/SharedFrameworks CACHE STRING "")

# Release builds may change these:
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.11 CACHE STRING "")
set(LLDB_USE_SYSTEM_DEBUGSERVER ON CACHE BOOL "")
set(LLVM_EXTERNALIZE_DEBUGINFO OFF CACHE BOOL "")
# Install location for externalized debug-info on the build machine.
# DESTDIR will be an extra prefix.
set(LLDB_DEBUGINFO_INSTALL_PREFIX /debuginfo CACHE STRING "")

set(LLVM_DISTRIBUTION_COMPONENTS
lldb
liblldb
lldb-argdumper
darwin-debug
debugserver
CACHE STRING "")
Loading

0 comments on commit d07eb80

Please sign in to comment.