1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
Commit Graph

80 Commits

Author SHA1 Message Date
Frederic Riss
97bc106daa Revert "Initial dsymutil tool commit."
This reverts commit r223793. The review thread wasn't concluded.

llvm-svn: 223794
2014-12-09 17:21:50 +00:00
Frederic Riss
df32fb09cf Initial dsymutil tool commit.
The goal of this tool is to replicate Darwin's dsymutil functionality
based on LLVM. dsymutil is a DWARF linker. Darwin's linker (ld64) does
not link the debug information, it leaves it in the object files in
relocatable form, but embbeds a `debug map` into the executable that
describes where to find the debug information and how to relocate it.
When releasing/archiving a binary, dsymutil is called to link all the DWARF
information into a `dsym bundle` that can distributed/stored along with
the binary.

With this commit, the LLVM based dsymutil is just able to parse the STABS
debug maps embedded by ld64 in linked binaries (and not all of them, for
example archives aren't supported yet).

Note that the tool directory is called dsymutil, but the executable is
currently called llvm-dsymutil. This discrepancy will disappear once the
tool will be feature complete. At this point the executable will be renamed
to dsymutil, but until then you do not want it to override the system one.

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

llvm-svn: 223793
2014-12-09 17:03:30 +00:00
Rafael Espindola
ce9d67c91b Be less conservative about when we build the gold plugin.
It is only build if LLVM_BINUTILS_INCDIR is explicitly given, so there is
no point in having extra restrictions.

llvm-svn: 223481
2014-12-05 17:25:52 +00:00
Peter Collingbourne
749234c1e4 Teach LLVM about llgo subproject.
llvm-svn: 222860
2014-11-27 00:15:21 +00:00
NAKAMURA Takumi
97575e9b4b [CMake] Move llvm-shlib in prior to other tools.
llvm-svn: 221590
2014-11-10 15:03:02 +00:00
Chris Bieneman
17f4cbe676 Adding llvm-shlib to CMake build system with a few new bells and whistles
Summary:
This patch adds a new CMake build setting LLVM_BUILD_LLVM_DYLIB, which defaults to OFF. When set to ON, this will generate a shared library containing most of LLVM. The contents of the shared library can be overriden by specifying LLVM_DYLIB_COMPONENTS. LLVM_DYLIB_COMPONENTS can be set to a semi-colon delimited list of any LLVM components that you llvm-config can resolve.

On Windows, unless you are using Cygwin, you must specify an explicit symbol export file using LLVM_EXPORTED_SYMBOL_FILE. On Cygwin and all unix-like platforms if you do not specify LLVM_EXPORTED_SYMBOL_FILE, an export file containing only the LLVM C API will be auto-generated from the list of LLVM components specified in LLVM_DYLIB_COMPONENTS.

Reviewers: rnk

Reviewed By: rnk

Subscribers: rnk, llvm-commits

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

llvm-svn: 220490
2014-10-23 17:22:14 +00:00
Peter Collingbourne
65b92cb354 Add llvm-go tool.
This tool lets us build LLVM components within the tree by setting up a
$GOPATH that resembles a tree fetched in the normal way with "go get".

It is intended that components such as the Go frontend will be built in-tree
using this tool.

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

llvm-svn: 220462
2014-10-23 02:33:23 +00:00
Duncan P. N. Exon Smith
4af7ebf31b Rename llvm-uselistorder => verify-uselistorder
llvm-svn: 214318
2014-07-30 17:11:27 +00:00
Duncan P. N. Exon Smith
3f8034a1c9 Move -verify-use-list-order into llvm-uselistorder
Ugh.  Turns out not even transformation passes link in how to read IR.
I sincerely believe the buildbots will finally agree with my system
after this though.  (I don't really understand why all of this has been
working on my system, but not on all the buildbots.)

Create a new tool called llvm-uselistorder to use for verifying use-list
order.  For now, just dump everything from the (now defunct)
-verify-use-list-order pass into the tool.

This might be a better way to test use-list order anyway.

Part of PR5680.

llvm-svn: 213957
2014-07-25 17:13:03 +00:00
David Majnemer
e9b121df38 llvm-vtabledump: A vtable dumper
This tool's job is to dump the vtables inside object files.  It is
currently limited to MS ABI vf- and vb-tables but it will eventually
support Itanium-style v-tables as well.

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

llvm-svn: 213903
2014-07-24 23:14:40 +00:00
Rafael Espindola
4cf5b0ab5e Don't force the build of toos/lto as a static lib.
Any uses of tools/lto as a static lib should probably move to lib/LTO.
This was also never implemented in the configure build, so this reduces
the differences among the two.

llvm-svn: 211852
2014-06-27 02:51:21 +00:00
Sebastian Pop
420901fde5 static link polly into tools
llvm-svn: 203886
2014-03-14 04:04:14 +00:00
Sebastian Pop
210ef0c908 fix polly buildbot
llvm-svn: 203492
2014-03-10 21:27:04 +00:00
Sebastian Pop
470d5c6a2f fix PR13550: add a cmake WITH_POLLY option
llvm-svn: 203486
2014-03-10 20:47:39 +00:00
NAKAMURA Takumi
2b7ca99e50 Remove out-of-date comment in llvm/tools/CMakeLists.txt.
llvm-svn: 202857
2014-03-04 16:13:21 +00:00
Duncan P. N. Exon Smith
73eacbb02b PGO: llvm-profdata: tool for merging profiles
Introducing llvm-profdata, a tool for merging profile data generated by
PGO instrumentation in clang.

- The name indicates a file extension of <name>.profdata.  Eventually
  profile data output by clang should be changed to that extension.

- llvm-profdata merges two profiles.  However, the name is more general,
  since it will likely pick up more tasks (such as summarizing a single
  profile).

- llvm-profdata parses the current text-based format, but will be
  updated once we settle on a binary format.

<rdar://problem/15949645>

llvm-svn: 201535
2014-02-17 23:22:49 +00:00
NAKAMURA Takumi
eec68da299 llvm/tools/llvm-c-test should be built also on msvc.
llvm-svn: 193257
2013-10-23 17:56:59 +00:00
Anders Waldenborg
94fc29186e Add llvm-c-test tool for testing llvm-c
This provides rudimentary testing of the llvm-c api.

The following commands are implemented:

  * --module-dump
    Read bytecode from stdin - print ir

  * --module-list-functions
    Read bytecode from stdin - list summary of functions

  * --module-list-globals
    Read bytecode from stdin - list summary of globals

  * --targets-list
    List available targets

  * --object-list-sections
    Read object file from stdin - list sections

  * --object-list-symbols
    Read object file from stdin - list symbols (like nm)

  * --disassemble
    Read lines of triple, hex ascii machine code from stdin - print disassembly

  * --calc
    Read lines of name, rpn from stdin - print generated module ir

Differential-Revision: http://llvm-reviews.chandlerc.com/D1776
llvm-svn: 193233
2013-10-23 08:10:20 +00:00
Chandler Carruth
ee12d58370 Remove the very substantial, largely unmaintained legacy PGO
infrastructure.

This was essentially work toward PGO based on a design that had several
flaws, partially dating from a time when LLVM had a different
architecture, and with an effort to modernize it abandoned without being
completed. Since then, it has bitrotted for several years further. The
result is nearly unusable, and isn't helping any of the modern PGO
efforts. Instead, it is getting in the way, adding confusion about PGO
in LLVM and distracting everyone with maintenance on essentially dead
code. Removing it paves the way for modern efforts around PGO.

Among other effects, this removes the last of the runtime libraries from
LLVM. Those are being developed in the separate 'compiler-rt' project
now, with somewhat different licensing specifically more approriate for
runtimes.

llvm-svn: 191835
2013-10-02 15:42:23 +00:00
Rafael Espindola
f84c89a432 Enable building LTO on WIN32.
Enable building the LTO library (.lib and.dll) and llvm-lto.exe on Windows with
MSVC and Mingw as well as re-enabling the associated test.

Patch by Greg Bedwell!

llvm-svn: 191823
2013-10-02 14:04:38 +00:00
Rafael Espindola
bed99fa456 Revert "Enable building LTO on WIN32."
This reverts commit r191670.

It was causing build failures on the msvc bots:

http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/5166/steps/compile/logs/stdio

llvm-svn: 191679
2013-09-30 16:32:51 +00:00
Rafael Espindola
5a90437273 Enable building LTO on WIN32.
Enable building the LTO library (.lib and.dll) and llvm-lto.exe on Windows with
MSVC and Mingw as well as re-enabling the associated test.

Patch by Greg Bedwell!

llvm-svn: 191670
2013-09-30 15:28:14 +00:00
Peter Collingbourne
2a807b9eca Fix LTO handling of module-level assembly (PR14152).
Patch by Tom Roeder!

llvm-svn: 191042
2013-09-19 22:15:52 +00:00
Argyrios Kyrtzidis
8975027f95 [CMake] Put back the add_llvm_external_project() calls for specific projects.
This allows setting-up the LLVM_EXTERNAL_* CMake variables that some people are using,
e.g. to set the source directory of the project in a different place.

llvm-svn: 189415
2013-08-27 23:27:56 +00:00
Hans Wennborg
a5e4216365 CMake: build llvm-config on Windows.
It was previously not being built on Windows because the cmake file relied
on a sed script to generate a .in file that llvm-config needs.

By using cmake's configure_file function, we can get rid off the sed hack,
and also have this work on Windows.

Differential Revision: http://llvm-reviews.chandlerc.com/D1481

llvm-svn: 189125
2013-08-23 17:59:13 +00:00
Argyrios Kyrtzidis
3149b23fc7 [CMake] Automatically pick up subdirectories in llvm/tools as 'external projects' if they contain a 'CMakeLists.txt' file.
Allow CMake to pick up external projects in llvm/tools without the need to modify the "llvm/tools/CMakeLists.txt" file.
This makes it easier to work with projects that live in other repositories, without needing to specify each one in "llvm/tools/CMakeLists.txt".

llvm-svn: 188921
2013-08-21 19:13:44 +00:00
Andy Gibbs
a57bb6a6f7 Provide bootstrap support to build only llvm+clang when using cmake.
Where a source tree is complete with lld, lldb and polly, it may not be possible to use cmake to configure build scripts if the host compiler it not capable of compiling these sub-projects.  This change makes it possible to first build a bootstrap clang compiler when can then be used to build a complete llvm toolchain.  An example bootstrap build sequence could be as follows:

$ mkdir bootstrap
$ cd bootstrap
$ cmake -G 'Unix Makefiles'
        -DCMAKE_BUILD_TYPE:STRING=Release
        -DCMAKE_PREFIX_PATH:STRING=$(pwd)
        -DLLVM_TARGETS_TO_BUILD:STRING=host
        -DLLVM_INCLUDE_TOOLS:STRING=bootstrap-only
        ../source
$ make clang  # build clang only for host

$ cd ..
$ export CC=$(realpath bootstrap/bin)/clang
$ export CXX=$(realpath bootstrap/bin)/clang++

$ mkdir final
$ cd final
$ cmake -G 'Unix Makefiles' ../source
$ make all check-all

llvm-svn: 184924
2013-06-26 08:05:08 +00:00
Rafael Espindola
daa7f712a2 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
67ed9d1cfb Move yaml2obj to tools too.
llvm-svn: 178904
2013-04-05 20:00:35 +00:00
Rafael Espindola
b2b188b238 Move obj2yaml to tools to sort out make's dependencies.
llvm-svn: 178835
2013-04-05 02:57:22 +00:00
Rafael Espindola
fc74cd7c44 Build LLVMgold.so on FreeBSD using cmake.
Patch by Stephen Checkoway.

llvm-svn: 177233
2013-03-17 12:01:05 +00:00
Daniel Malea
c7049271a2 Connect LLVM CMake build scripts to LLDB's CMake scripts:
- if you have LLDB checked out in $llvm/tools, CMake will build it now!
- LLDB is known to build on Linux with libstdc++ and GCC 4.6/4.7 or Clang 3.3
- to run lldb tests, do "make check-lldb" after a build

llvm-svn: 176307
2013-02-28 23:15:15 +00:00
Andrew Kaylor
4c7a9eebb0 Adding tests for the Intel JIT event listener's MCJIT support.
llvm-svn: 168459
2012-11-21 20:38:26 +00:00
Alexander Potapenko
441c9aafe6 [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
ca24351f26 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
fbbb8b9593 [CMake] Restructure how Clang, Polly and other external projects get included.
While making lld build under the tools directory I decided to refactor how this
works.

There is now a macro, add_llvm_external_project, which takes the name of the
expected subdirectory. This sets up two CMake options.

 * LLVM_EXTERNAL_${NAME}_SOURCE_DIR
     This is the path to the source. It defaults to
     ${CMAKE_CURRENT_SOURCE_DIR}/${name}.
 * LLVM_EXTERNAL_${NAME}_BUILD
     Enable and disable building the tool as part of LLVM.

I chose LLVM_EXTERNAL_${NAME} as a prefix so they all show up together in the
GUI.

llvm-svn: 155654
2012-04-26 19:43:35 +00:00
Michael J. Spencer
e6c28a171e 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
44201a2d17 [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
8ce0029942 Add a random .LL file generator to stress-test different llvm components.
llvm-svn: 151479
2012-02-26 08:35:53 +00:00
Duncan Sands
cc43a2e4fd Have cmake build llvm-cov. Patch by arrowdodger.
llvm-svn: 146071
2011-12-07 20:54:41 +00:00
Daniel Dunbar
3c06b26f09 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
84beef543d 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
7dcd93d4fa 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
7c4510b4de 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
745409c62f 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
e9f2479115 llvm-config: Replace with C++ version (was llvm-config-2).
llvm-svn: 144300
2011-11-10 18:49:59 +00:00
Daniel Dunbar
6ed1f79da0 llvm-config-2: Implement build system support for getting the variables we only
know at build time.

llvm-svn: 143649
2011-11-03 21:01:36 +00:00
Daniel Dunbar
cce5afb483 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
782601653d tools/CMakeLists.txt: Fixup r142103. I don't remember why I had missed the line.
llvm-svn: 142136
2011-10-16 11:50:37 +00:00
NAKAMURA Takumi
9ef901972f CMake: Introduce LLVM_CLANG_SOURCE_DIR, "tools/clang" by default. Clang will not be built if LLVM_CLANG_SOURCE_DIR="" or ${LLVM_CLANG_SOURCE_DIR}/CMakeLists.txt is not found.
llvm-svn: 142103
2011-10-16 02:54:33 +00:00