Commit Graph

151 Commits

Author SHA1 Message Date
Rafael Espindola 668c642830 Remove the LLVM specific archive index.
Archive files (.a) can have a symbol table indicating which object
files in them define which symbols. The purpose of this symbol table
is to speed up linking by allowing the linker the read only the .o
files it is actually going to use instead of having to parse every
object's symbol table.

LLVM's archive library currently supports a LLVM specific format for
such table. It is hard to see any value in that now that llvm-ld is
gone:

* System linkers don't use it: GNU ar uses the same plugin as the
linker to create archive files with a regular index. The OS X ar
creates no symbol table for IL files, I assume the linker just parses
all IL files.

* It doesn't interact well with archives having both IL and native objects.

* We probably don't want to be responsible for yet another archive
format variant.

This patch then:

* Removes support for creating and reading such index from lib/Archive.
* Remove llvm-ranlib, since there is nothing left for it to do.

We should in the future add support for regular indexes to llvm-ar for
both native and IL objects. When we do that, llvm-ranlib should be
reimplemented as a symlink to llvm-ar, as it is equivalent to "ar s".

llvm-svn: 184019
2013-06-14 23:25:53 +00:00
Rafael Espindola 3add3e9c4a Move yaml2obj to tools too.
llvm-svn: 178904
2013-04-05 20:00:35 +00:00
Rafael Espindola 87a0290941 Move obj2yaml to tools to sort out make's dependencies.
llvm-svn: 178835
2013-04-05 02:57:22 +00:00
Andrew Kaylor c5feb5109e Make building of llvm-jitlistener conditional on the USE_INTEL_JITEVENTS setting.
llvm-svn: 168665
2012-11-27 01:24:25 +00:00
Andrew Kaylor 93fe3dcb13 Adding tests for the Intel JIT event listener's MCJIT support.
llvm-svn: 168459
2012-11-21 20:38:26 +00:00
Alexander Potapenko 8c07f55568 [ASan] Add llvm-symbolizer from to tools/
This is the second and last (2/2) part of a change that moves llvm-symbolizer to llvm/tools/, which will allow to build it
with both cmake and configure+make.

llvm-svn: 167723
2012-11-12 11:33:29 +00:00
Jim Grosbach acd8801e25 MC: Simple example parser for MC assembly markup.
Nothing fancy, just a simple demonstration parser.

llvm-svn: 167181
2012-10-31 23:24:13 +00:00
Michael J. Spencer 9125493efe Remove llvm-ld and llvm-stub (which is only used by llvm-ld).
llvm-ld is no longer useful and causes confusion and so it is being removed.

* Does not work very well on Windows because it must call a gcc like driver to
  assemble and link.
* Has lots of hard coded paths which are wrong on many systems.
* Does not understand most of ld's options.
* Can be partially replaced by llvm-link | opt | {llc | as, llc -filetype=obj} |
  ld, or fully replaced by Clang.

I know of no production use of llvm-ld, and hacking use should be
replaced by Clang's driver.

llvm-svn: 155147
2012-04-19 19:27:54 +00:00
David Meyer 2fc34c5f84 [Object]
* Add begin_dynamic_table() / end_dynamic_table() private interface to ELFObjectFile.
* Add begin_libraries_needed() / end_libraries_needed() interface to ObjectFile, for grabbing the list of needed libraries for a shared object or dynamic executable.
* Implement this new interface completely for ELF, leave stubs for COFF and MachO.
* Add 'llvm-readobj' tool for dumping ObjectFile information.

llvm-svn: 151785
2012-03-01 01:36:50 +00:00
Nadav Rotem 78bda89412 Add a random .LL file generator to stress-test different llvm components.
llvm-svn: 151479
2012-02-26 08:35:53 +00:00
Daniel Dunbar ab0ad4ed1e llvm-config: Replace with C++ version (was llvm-config-2).
- Another reapply of r144300, with hopefully one last fix.

llvm-svn: 145623
2011-12-01 20:18:09 +00:00
Duncan Sands b8e6cee9ca Revert commit 145449 (ddunbar) since it is breaking the dragonegg buildbots.
Original commit message:
llvm-config: Replace with C++ version (was llvm-config-2).
 - Reapply of r144300, with lots of fixes/migration easement in between.

llvm-svn: 145582
2011-12-01 10:50:19 +00:00
Daniel Dunbar 8d5cc33ad8 llvm-config: Replace with C++ version (was llvm-config-2).
- Reapply of r144300, with lots of fixes/migration easement in between.

llvm-svn: 145449
2011-11-29 22:56:31 +00:00
Daniel Dunbar b074d102a3 edis: Sink EDMain.cpp into lib/MC/MCDisassembler.
- This fixes some layering violations and matches how we handle the llvm-c lib,
   for example.

llvm-svn: 145338
2011-11-29 00:25:57 +00:00
Daniel Dunbar 933b43f188 Revert r144300 "llvm-config: Replace with C++ version (was llvm-config-2).",
which didn't appear ready for prime time.

llvm-svn: 144309
2011-11-10 19:59:35 +00:00
Daniel Dunbar 166c804893 llvm-config: Replace with C++ version (was llvm-config-2).
llvm-svn: 144300
2011-11-10 18:49:59 +00:00
Daniel Dunbar b0f7a1472b llvm-config: Start stubbing out a C++ version of llvm-config (as llvm-config-2,
for now).

 - Mostly complete except for the data that needs to come from the build system
   or the dependencies.

 - Has some small improvements from current llvm-config:

   o Uses TargetRegistry directly to get some information.

   o Designed to work correctly when used from a CMake build tree (relatively
     untested currently) (although pcc fixed this recently for old llvm-config).

llvm-svn: 143616
2011-11-03 17:30:16 +00:00
NAKAMURA Takumi 914f1924e0 autoconf: Introduce --with-clang-srcdir, to build out-of-tree clang as tools/clang on tools/Makefile.
llvm-svn: 142102
2011-10-16 02:54:26 +00:00
Michael J. Spencer c4ad46605e Add llvm-size.
llvm-svn: 140722
2011-09-28 20:57:46 +00:00
Devang Patel 3714065a94 Introduce llvm-cov.
Add llvm-cov skeleton. It has initial support to read coverage info generated by GCOVProfiling.cpp. 
Today, you can do
prompt> clang a.c -ftest-coverage -fprofile-arcs -o a
prompt> ./a
prompt> llvm-cov -gcno a.gcno -gcda a.gcda 
a.c
 :	#include "a.h"
 :	
 :	int main() {
 :		int i = 0;
 :		if (i) {
1:			int j = 0;
1:			j = 1;
1:		} else {
 :			int k = 1;
 :			k = 2;
 :		}
1:		return 0;
 :	}
 :	
 :	

llvm-svn: 140712
2011-09-28 18:50:00 +00:00
Eric Christopher 4b0ae48614 Remove llvmc and assorted build machinery for it.
The problems that llvmc solved have largely been subsumed with the
tasks that the clang driver can accomplish, but llvmc lacks flexibility
and depends too heavily on the EOL'd llvm-gcc.

llvm-svn: 140093
2011-09-19 23:22:41 +00:00
Benjamin Kramer aa2f78f5e6 Sketch out a DWARF parser.
This introduces a new library to LLVM: libDebugInfo. It will provide debug information
parsing to LLVM. Much of the design and some of the code is taken from the LLDB project.

It also contains an llvm-dwarfdump tool that can dump the abbrevs and DIEs from an
object file. It can be used to write tests for DWARF input and output easily.

llvm-svn: 139627
2011-09-13 19:42:23 +00:00
Jim Grosbach 0072cdbc50 MachO file loader and execution utility.
Add a bone-simple utility to load a MachO object into memory, look for
a function (main) in it, and run that function directly. This will be used
as a test and development platform for MC-JIT work regarding symbol resolution,
dynamic lookup, etc..

Code by Daniel Dunbar.

llvm-svn: 127885
2011-03-18 17:11:39 +00:00
Stephen Wilson a32b8d7801 This patch lets LLDB build as an LLVM subproject. LLDB is not built in
parallel with the rest of the tools directory as it depends on Clang.

This patch was first applied in r125956 and subsequently reverted in
r125964 as it broke in-tree builds.  Makefile.rules was fixed up in 
r126070 to handle missing optional directories for the in-tree case,
so it should be safe now to bring this patch back in.
 

llvm-svn: 126071
2011-02-20 04:17:15 +00:00
Owen Anderson d2f7431fa8 Revert r125956, which broke the build if you _don't_ have lldb checked out.
llvm-svn: 125964
2011-02-18 21:33:23 +00:00
Stephen Wilson 880a6129e2 This patch lets LLDB build as an LLVM subproject. LLDB is not built in
parallel with the rest of the tools directory as it depends on Clang.

llvm-svn: 125956
2011-02-18 20:50:33 +00:00
Michael J. Spencer 2670c2528c Add llvm-objdump
llvm-svn: 123898
2011-01-20 06:39:06 +00:00
Daniel Dunbar 73a860b290 build: Fix ONLY_TOOLS to not build lto etc. unless specified.
llvm-svn: 121969
2010-12-16 15:42:26 +00:00
NAKAMURA Takumi 638110fde1 tools/Makefile: Don't look into $(TARGET_OS), but $(HOST_OS), to inspect availability of loadable module!
The last commit made run.build.step.test_llvm_1 to fail.

llvm-svn: 120283
2010-11-29 08:58:11 +00:00
NAKAMURA Takumi 71c8c12d4d tools/Makefile: Fix indentation.
llvm-svn: 120276
2010-11-29 00:20:34 +00:00
NAKAMURA Takumi 142b32535e tools/Makefile: Enable building lto, edis and bugpoint-passes on Cygming.
bugpoint-passes would be built with ENABLE_SHARED=1.
You could try building gold on Cygming, though, it would fail.

llvm-svn: 120275
2010-11-29 00:20:28 +00:00
Daniel Dunbar fdfb635bff macho-dump: Stub out C++ macho-dump tool.
llvm-svn: 120191
2010-11-27 05:58:44 +00:00
Tobias Grosser ea9dca4c6c Add polly support to the build system.
Update the cmake and autoconf build system to compile polly
as a shared library if it is checked out into tools/polly. In case
polly is not checked out, nothing changes.
This models the way clang can be added to llvm if checked out to tools/clang.

Also rebuild configure.

Patch contributed by ether.

llvm-svn: 117755
2010-10-30 00:54:26 +00:00
John McCall 5ee026c512 Check in a couple of changes that I apparently never committed:
- teach DifferenceEngine to unify successors of calls and invokes
    in certain circumstances
  - basic blocks actually don't have their own numbering;  did that change?
  - add llvm-diff to the Makefile and CMake build systems

llvm-svn: 111909
2010-08-24 09:16:51 +00:00
Rafael Espindola 68f8b27bb9 Don't try to build a plugin on windows.
llvm-svn: 110573
2010-08-09 14:05:42 +00:00
Rafael Espindola 92a4a833f9 Move the bugpoint test passes to a plugin in preparation for having bugpoint
use opt.

llvm-svn: 110520
2010-08-07 21:48:09 +00:00
Chris Lattner 9289f93153 fix DISABLE_EDIS
llvm-svn: 108925
2010-07-20 20:55:57 +00:00
Chris Lattner 979634bbb0 start straightening out libedis's dependencies and make it fit
better in the llvm world.  Among other things, this changes:

1. The guts of libedis are now moved into lib/MC/MCDisassembler
2. llvm-mc now depends on lib/MC/MCDisassembler, not tools/edis,
   so edis and mc don't have to be built in series.
3. lib/MC/MCDisassembler no longer depends on the C api, the C
   API depends on it.
4. Various code cleanup changes. 

There is still a lot to be done to make edis fit with the llvm
design, but this is an incremental step in the right direction.

llvm-svn: 108869
2010-07-20 18:25:19 +00:00
Bob Wilson f1a6d7abc3 Remove some broken code to check the DISABLE_EDIS flag (edis is now in the
DIRS list, so it does no good to filter it from PARALLEL_DIRS), and replace
it with a check to disable building the shared library version of edis when
the flag is set.  Disabling it entirely does not work because MC uses it now.

llvm-svn: 108367
2010-07-14 22:41:51 +00:00
Sean Callanan d75c8a0813 Build system fix to make llvm-mc properly build
after edis.  Really, there ought to be some
mechanism to ensure that PARALLEL_DIRS get built
after DIRS.

llvm-svn: 101095
2010-04-12 23:55:28 +00:00
Sean Callanan 393c4df342 Build system fixes. llvm-mc depends on
libEnhancedDisassembly, so we now build the
static library in all cases (although the shared
library is only built when requested/possible).

Also, fixed a bug where edis wasn't properly
initializing the targets it uses.

llvm-svn: 101072
2010-04-12 21:55:49 +00:00
Sean Callanan 2d03d3a8a7 Second try at integrating the edis tester. This
time I use the LIBS variable, which is not subject
to a %.a -> -l% transformation, to link llvm-mc
against libEnhancedDisassembly.

llvm-mc -edis works the same as llvm-mc
-disassemble, but outputs tokens and operands.

llvm-svn: 101058
2010-04-12 19:43:00 +00:00
Sean Callanan a4ae4e7693 Updated the edis build mechanism to allow for builds
that do not build some (or all) of the targets that
edis supports.

llvm-svn: 100910
2010-04-10 00:48:10 +00:00
Chris Lattner 55ddc30f07 revert r100842 which broke several of the build bots.
llvm-svn: 100848
2010-04-09 04:24:20 +00:00
Sean Callanan 844a7febd3 Added a tester for the enhanced disassembler,
integrated into the llvm-mc testing tool.

llvm-svn: 100842
2010-04-09 01:43:16 +00:00
Bill Wendling 703d0b978a Remove if DISABLED not if not DISABLED...
llvm-svn: 99343
2010-03-23 23:09:03 +00:00
Bill Wendling c941619a73 Use "DISABLE_EDIS" to disable building "edis" explicitly. Don't build it for
Apple-style builds.

llvm-svn: 99336
2010-03-23 22:15:33 +00:00
Duncan Sands 5674c34780 Attempt to fix random build failures seen when doing highly
parallel builds: the gold plugin fails to link because the lto
library is in the middle of being written out by the linker.

llvm-svn: 98054
2010-03-09 09:03:21 +00:00
Chris Lattner 5ec1b24f8f apparently if gold is around lto needs to be part of DIRS.
llvm-svn: 97780
2010-03-05 02:34:34 +00:00
Chris Lattner 2e89d20ad3 Only build libedis if ENABLE_SHARED is specified, just like liblto.
Don't build any of the dynamic library stuff on cygwin/mingw.

llvm-svn: 97771
2010-03-05 00:59:18 +00:00