Commit Graph

217 Commits

Author SHA1 Message Date
Zachary Turner
799770c03a Fix linking of unit tests via CMake on Windows.
A previous attempt to make the unit tests link properly on
Linux broke it for Windows.  This patch fixes it for both platforms.

llvm-svn: 232648
2015-03-18 16:56:24 +00:00
Bhushan D. Attarde
29e5937cd9 Initial Assembly profiler for mips64
Summary:
This is initial implementation of assembly profiler which only scans prologue/epilogue assembly instructions to create CFI instructions.

Reviewers: clayborg, jasonmolenda

Differential Revision: http://reviews.llvm.org/D7696

llvm-svn: 232619
2015-03-18 09:21:29 +00:00
Zachary Turner
eeba1a896a [CMake] Make the unittests link against everything...
Sigh.  There's really not a good alternative until we decouple
python from lldb better.  The only way the build works right now
is by having every executable link against every LLDB library.
This causes implicit transitive link dependencies on the union
of everything that LLDB brings in.  Which means that if all we
want is one header file from interpreter, we have to bring in
everything, including everything that everything depends on,
which means python.

There's outstanding efforts to address this, but it's not yet
complete.  So until then, this is all we can do.

llvm-svn: 232287
2015-03-14 23:39:28 +00:00
Zachary Turner
26d7fcfc38 Create a CMake build for the gtest unit tests.
llvm-svn: 232210
2015-03-13 20:54:21 +00:00
Chaoren Lin
6fb4915bd6 Remove libedit and libncurses from LLDB_SYSTEM_LIBS if they're disabled.
Reviewers: clayborg, zturner, vharron, sbest

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8065

llvm-svn: 231423
2015-03-05 23:22:54 +00:00
Zachary Turner
44a14d95c2 [CMake] Refactor LLDB main CMake file.
The existing state of affairs was getting a little unwieldy.

All of LLDB's utility functions and initial configuration was in
the root CMake file.  I split this up into 3 separate files and
moved them to relevant subfolders under cmake/modules.

Also, I deleted the add_lldb_definitions() function.  It seemed
to be somewhat useless and did not serve any real purpose that
I was able to figure out.

llvm-svn: 231010
2015-03-02 20:45:26 +00:00
Robert Flack
ab3269d275 Reduce the number of components initialized by lldb-server to reduce static binary size.
Separate out the necessary component initialization for lldb-server such that the linker can greatly reduce the binary size. With this patch the size of lldb-server on my 64 bit linux release build drops from 46MB to 26MB.

Differential Revision: http://reviews.llvm.org/D7880

llvm-svn: 230963
2015-03-02 15:14:50 +00:00
Zachary Turner
030b8cb413 Resubmit "[CMake] Change lldbAPI to be a CMake OBJECT library."
This resubmits r230380.  The primary cause of the failure was
actually just a warning, which we can disable at the CMake level
in a followup patch on the LLVM side.  The other thing which was
actually an error on the bot should be able to be fixed with
a clean.

llvm-svn: 230389
2015-02-24 22:17:57 +00:00
Zachary Turner
0980447a5f Revert "[CMake] Change lldbAPI to be a CMake OBJECT library."
This reverts commit r230380.  It causes CMake to fail on certain
machines with an error about needing to use string(STRIP_GENEX).

llvm-svn: 230382
2015-02-24 21:28:01 +00:00
Zachary Turner
f4f8740eb0 [CMake] Change lldbAPI to be a CMake OBJECT library.
An OBJECT library is a special type of CMake library that produces
no archive, has no link interface, and no link inputs.  It is like
a regular archive, just without the physical output.  To link
against an OBJECT library, you reference it in the *source* file
list of a library using the special syntax $<TARGET_OBJECTS:lldbAPI>.
This will cause every object file to be passed to the linker
independently, as opposed to a single archive being passed to the
linker.

This is *extremely* important on Windows.  lldbAPI exports all of the
SB classes using __declspec(dllexport).  Unfortunately for technical
reasons it is not possible (well, extremely difficult) to get the
linker to propagate a __declspec(dllexport) attribute from a symbol
in an object file in an archive to a DLL that links against that
archive.  The solution to this is for the DLL to link the object files
directly.  So lldbAPI must be an OBJECT library.

This fixes an issue that has been present since the duplicated
lldbAPI file lists were removed, which would cause linker failures.

As a side effect, this also makes LLDB_DISABLE_PYTHON=1 work again
on Windows, which was previously totally broken.

llvm-svn: 230380
2015-02-24 20:58:39 +00:00
Tamas Berghammer
00e305d281 Create new platform: remote-android
* Create new platform plugin for lldb
* Create HostInfo class for android
* Create ProcessLauncher for android

Differential Revision: http://reviews.llvm.org/D7584

llvm-svn: 228943
2015-02-12 18:13:44 +00:00
Zachary Turner
aa60e3c886 Make PipeWindows::CreateWithUniqueName() use GUIDs on Windows.
Patch by Adrian McCarthy
Differential Revision: http://reviews.llvm.org/D7509

llvm-svn: 228859
2015-02-11 18:21:28 +00:00
Tamas Berghammer
d858487edd Fix build of lldb-gdbserver and lldb-platform for android (arm32, x86)
* Fix cmake script for android x86
* Reorder includes to avoid collision between system macros and local
  variables in clang framework

Differential Revision: http://reviews.llvm.org/D7435

llvm-svn: 228388
2015-02-06 10:57:40 +00:00
Chaoren Lin
ef1585ea7c added some missing ABIs
llvm-svn: 227922
2015-02-03 01:51:10 +00:00
Vince Harron
4d2857321d Fixes compilation/run error with BUILD_SHARED_LIBS=TRUE
BUILD_SHARED_LIBS=TRUE currently isn't working for Linux x86_64
This patch fixes the link errors and also some runtime errors

Test Plan:
CC=clang CXX=clang++ cmake -GNinja -DBUILD_SHARED_LIBS=TRUE -DCMAKE_LINKER=ld.gold -DCMAKE_BUILD_TYPE=Debug ../../llvm
ninja
ninja check-lldb

llvm-svn: 226039
2015-01-14 21:01:15 +00:00
Vince Harron
878a2ce554 lldb-platform - static link all llvm dependencies
Differential Revision: http://reviews.llvm.org/D6797

lldb-gdbserver statically links all llvm dependencies. This allows
dead stripping code and reduces total binary size.

This change modifies lldb-plaform to static link llvm dependencies
like lldb-gdbserver.

llvm-svn: 225398
2015-01-07 21:35:07 +00:00
Shawn Best
e1a76dba0d LLGS Android target support (r221570) missed adding some files: http://reviews.llvm.org/D6166
llvm-svn: 221593
2014-11-10 15:06:15 +00:00