Skip to content

Commit d07eb80

Browse files
authored
Merge pull request #44 from adrian-prantl/fast-forward
Fast forward apple/stable/20190619 to Sep 4.
2 parents f77138b + 00ca90d commit d07eb80

File tree

2,725 files changed

+28536
-95329
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,725 files changed

+28536
-95329
lines changed

libcxx/utils/libcxx/util.py

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -253,24 +253,27 @@ def killProcessAndChildren(pid):
253253
TODO: Reimplement this without using psutil so we can
254254
remove our dependency on it.
255255
"""
256-
import psutil
257-
try:
258-
psutilProc = psutil.Process(pid)
259-
# Handle the different psutil API versions
256+
if platform.system() == 'AIX':
257+
subprocess.call('kill -kill $(ps -o pid= -L{})'.format(pid), shell=True)
258+
else:
259+
import psutil
260260
try:
261-
# psutil >= 2.x
262-
children_iterator = psutilProc.children(recursive=True)
263-
except AttributeError:
264-
# psutil 1.x
265-
children_iterator = psutilProc.get_children(recursive=True)
266-
for child in children_iterator:
261+
psutilProc = psutil.Process(pid)
262+
# Handle the different psutil API versions
267263
try:
268-
child.kill()
269-
except psutil.NoSuchProcess:
270-
pass
271-
psutilProc.kill()
272-
except psutil.NoSuchProcess:
273-
pass
264+
# psutil >= 2.x
265+
children_iterator = psutilProc.children(recursive=True)
266+
except AttributeError:
267+
# psutil 1.x
268+
children_iterator = psutilProc.get_children(recursive=True)
269+
for child in children_iterator:
270+
try:
271+
child.kill()
272+
except psutil.NoSuchProcess:
273+
pass
274+
psutilProc.kill()
275+
except psutil.NoSuchProcess:
276+
pass
274277

275278

276279
def executeCommandVerbose(cmd, *args, **kwargs):

lldb/CMakeLists.txt

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ set(CMAKE_MODULE_PATH
1111
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
1212
)
1313

14-
include(LLDBStandalone)
14+
# If we are not building as part of LLVM, build LLDB as a standalone project,
15+
# using LLVM as an external library.
16+
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
17+
project(lldb)
18+
include(LLDBStandalone)
19+
endif()
20+
1521
include(LLDBConfig)
1622
include(AddLLDB)
1723

@@ -34,15 +40,38 @@ if (NOT LLDB_DISABLE_PYTHON)
3440
add_subdirectory(scripts)
3541
endif ()
3642

43+
# We need the headers generated by instrinsics_gen before we can compile
44+
# any source file in LLDB as the imported Clang modules might include
45+
# some of these generated headers. This approach is copied from Clang's main
46+
# CMakeLists.txt, so it should kept in sync the code in Clang which was added
47+
# in llvm-svn 308844.
48+
if(LLVM_ENABLE_MODULES AND NOT LLDB_BUILT_STANDALONE)
49+
list(APPEND LLVM_COMMON_DEPENDS intrinsics_gen)
50+
endif()
51+
52+
if(CMAKE_CROSSCOMPILING AND LLDB_BUILT_STANDALONE)
53+
set(LLVM_USE_HOST_TOOLS ON)
54+
include(CrossCompile)
55+
if (NOT NATIVE_LLVM_DIR OR NOT NATIVE_Clang_DIR)
56+
message(FATAL_ERROR
57+
"Crosscompiling standalone requires the variables NATIVE_{CLANG,LLVM}_DIR
58+
for building the native lldb-tblgen used during the build process.")
59+
endif()
60+
llvm_create_cross_target(lldb NATIVE "" Release
61+
-DLLVM_DIR=${NATIVE_LLVM_DIR}
62+
-DClang_DIR=${NATIVE_Clang_DIR})
63+
endif()
64+
65+
# TableGen
3766
add_subdirectory(utils/TableGen)
67+
3868
add_subdirectory(source)
3969
add_subdirectory(tools)
4070
add_subdirectory(docs)
4171

4272
option(LLDB_INCLUDE_TESTS "Generate build targets for the LLDB unit tests." ${LLVM_INCLUDE_TESTS})
43-
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)
44-
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)
4573
if(LLDB_INCLUDE_TESTS)
74+
set(LLDB_TEST_BUILD_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lldb-test-build.noindex" CACHE PATH "The build root for building tests.")
4675

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

54-
if (NOT LLDB_TEST_USE_CUSTOM_C_COMPILER AND TARGET clang)
83+
if (TARGET clang)
5584
set(LLDB_DEFAULT_TEST_C_COMPILER "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}")
56-
else()
57-
set(LLDB_DEFAULT_TEST_C_COMPILER "")
58-
endif()
59-
60-
if (NOT LLDB_TEST_USE_CUSTOM_CXX_COMPILER AND TARGET clang)
6185
set(LLDB_DEFAULT_TEST_CXX_COMPILER "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX}")
6286
else()
87+
set(LLDB_DEFAULT_TEST_C_COMPILER "")
6388
set(LLDB_DEFAULT_TEST_CXX_COMPILER "")
6489
endif()
6590

@@ -71,7 +96,7 @@ if(LLDB_INCLUDE_TESTS)
7196

7297
if (("${LLDB_TEST_C_COMPILER}" STREQUAL "") OR
7398
("${LLDB_TEST_CXX_COMPILER}" STREQUAL ""))
74-
message(FATAL_ERROR "LLDB test compilers not specified. Tests will not run")
99+
message(FATAL_ERROR "LLDB test compilers not specified. Tests will not run.")
75100
endif()
76101

77102
set(LLDB_TEST_DEPS lldb)
@@ -88,14 +113,6 @@ if(LLDB_INCLUDE_TESTS)
88113
list(APPEND LLDB_TEST_DEPS lldb-server)
89114
endif()
90115

91-
if(TARGET debugserver)
92-
list(APPEND LLDB_TEST_DEPS debugserver)
93-
endif()
94-
95-
if(TARGET lldb-mi)
96-
list(APPEND LLDB_TEST_DEPS lldb-mi)
97-
endif()
98-
99116
if(TARGET lldb-vscode)
100117
list(APPEND LLDB_TEST_DEPS lldb-vscode)
101118
endif()
@@ -196,19 +213,12 @@ if (NOT LLDB_DISABLE_PYTHON)
196213
DEPENDS ${lldb_scripts_dir}/lldb.py
197214
COMMENT "Python script sym-linking LLDB Python API")
198215

199-
if (TARGET readline)
200-
set(readline_dep readline)
201-
endif()
202-
add_dependencies(finish_swig swig_wrapper liblldb lldb-argdumper ${readline_dep})
216+
add_dependencies(finish_swig swig_wrapper liblldb lldb-argdumper)
203217
set_target_properties(finish_swig swig_wrapper PROPERTIES FOLDER "lldb misc")
204218

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

208-
if(LLDB_BUILD_FRAMEWORK)
209-
add_dependencies(lldb-framework finish_swig)
210-
endif()
211-
212222
# Add a Post-Build Event to copy the custom Python DLL to the lldb binaries dir so that Windows can find it when launching
213223
# lldb.exe or any other executables that were linked with liblldb.
214224
if (WIN32 AND NOT "${PYTHON_DLL}" STREQUAL "")
@@ -222,3 +232,7 @@ if (NOT LLDB_DISABLE_PYTHON)
222232
COMMENT "Copying Python DLL to LLDB binaries directory.")
223233
endif ()
224234
endif ()
235+
236+
if(LLDB_BUILT_STANDALONE AND NOT LLVM_ENABLE_IDE)
237+
llvm_distribution_add_targets()
238+
endif()

lldb/CODE_OWNERS.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ D: Watchpoints, Trampolines, Target, Command Interpreter, C++ / Objective-C Lang
2121
D: Expression evaluator, IR interpreter, Clang integration
2222
D: Data Formatters
2323

24-
N: Ilia K
25-
26-
D: lldb-mi
27-
2824
N: Ed Maste
2925
3026
D: FreeBSD
@@ -34,10 +30,6 @@ E: [email protected]
3430
D: ABI, Disassembler, Unwinding, iOS, debugserver, Platform, ObjectFile, SymbolFile,
3531
D: SymbolVendor, DWARF, gdb-remote
3632

37-
N: Hafiz Abid Qadeer
38-
39-
D: lldb-mi
40-
4133
N: Kamil Rytarowski
4234
4335
D: NetBSD

lldb/INSTALL.txt

Lines changed: 0 additions & 18 deletions
This file was deleted.

lldb/cmake/XcodeHeaderGenerator/CMakeLists.txt

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
include(${CMAKE_CURRENT_LIST_DIR}/Apple-lldb-base.cmake)
2+
3+
set(LLVM_DISTRIBUTION_COMPONENTS
4+
lldb
5+
liblldb
6+
lldb-argdumper
7+
lldb-server
8+
CACHE STRING "")
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
include(${CMAKE_CURRENT_LIST_DIR}/Apple-lldb-base.cmake)
2+
3+
set(CMAKE_GENERATOR Xcode CACHE STRING "")
4+
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "")
5+
set(CMAKE_XCODE_GENERATE_SCHEME ON CACHE BOOL "")
6+
7+
set(LLDB_BUILD_FRAMEWORK ON CACHE BOOL "")
8+
9+
# Apparently, module-enabled builds clash with Xcode's analysis.
10+
set(LLVM_ENABLE_MODULES OFF CACHE BOOL "" FORCE)
11+
12+
# Print a warning with instructions, if we
13+
# build with Xcode and didn't use this cache.
14+
set(LLDB_EXPLICIT_XCODE_CACHE_USED ON CACHE INTERNAL "")

lldb/cmake/caches/Apple-lldb-base.cmake

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@ set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
22
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "")
33

44
set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64 CACHE STRING "")
5-
set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")
65
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
76
set(LLVM_ENABLE_MODULES ON CACHE BOOL "")
87

9-
# Release builds set these explicitly:
10-
#set(LLDB_VERSION_MAJOR 9999 CACHE STRING "")
11-
#set(LLDB_VERSION_MINOR 9 CACHE STRING "")
12-
#set(LLDB_VERSION_PATCH 9 CACHE STRING "")
13-
#set(LLDB_VERSION_SUFFIX git CACHE STRING "")
8+
set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
9+
set(LIBCXX_ENABLE_STATIC OFF CACHE BOOL "")

lldb/cmake/caches/Apple-lldb-macOS.cmake

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,25 @@ include(${CMAKE_CURRENT_LIST_DIR}/Apple-lldb-base.cmake)
22

33
set(LLDB_BUILD_FRAMEWORK ON CACHE BOOL "")
44
set(LLDB_NO_INSTALL_DEFAULT_RPATH ON CACHE BOOL "")
5+
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.11 CACHE STRING "")
56

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

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

16-
# Release builds may change these:
17-
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.11 CACHE STRING "")
18-
set(LLDB_USE_SYSTEM_DEBUGSERVER ON CACHE BOOL "")
19-
set(LLVM_EXTERNALIZE_DEBUGINFO OFF CACHE BOOL "")
16+
# Install location for externalized debug-info on the build machine.
17+
# DESTDIR will be an extra prefix.
18+
set(LLDB_DEBUGINFO_INSTALL_PREFIX /debuginfo CACHE STRING "")
19+
20+
set(LLVM_DISTRIBUTION_COMPONENTS
21+
lldb
22+
liblldb
23+
lldb-argdumper
24+
darwin-debug
25+
debugserver
26+
CACHE STRING "")

0 commit comments

Comments
 (0)