Rafael Espindola
61e0c74936
If present, use gold's support for getting a file view. This prevents having
...
to map the file both in the linker and in the plugin.
llvm-svn: 129109
2011-04-07 21:11:00 +00:00
Rafael Espindola
1592f3ae24
Add a lto_codegen_compile_to_file to avoid producing a file, reading it to
...
memory and writing it back to disk.
llvm-svn: 128108
2011-03-22 20:57:13 +00:00
Rafael Espindola
8dab9a762b
Add support in the LTO library for loading an object from the middle
...
of an file.
llvm-svn: 127781
2011-03-17 00:36:11 +00:00
Oscar Fuentes
548931d606
Force re-linking of LLVMgold.so when its exports file changes.
...
llvm-svn: 127473
2011-03-11 18:27:13 +00:00
Oscar Fuentes
d83646bbfd
Fix processing of gold.exports.
...
llvm-svn: 127471
2011-03-11 18:07:46 +00:00
Oscar Fuentes
57a2625738
Add LTO and gold plugin to the CMake build. Linux-only, support for
...
other systems pending.
PR9456.
llvm-svn: 127466
2011-03-11 15:44:24 +00:00
Rafael Espindola
53fdf0bfc1
Gold now rescans archives as needed, so the pass-through options are not
...
necessary anymore.
llvm-svn: 126580
2011-02-27 20:30:22 +00:00
Rafael Espindola
744cde8b39
bfd was fixed, remove the work around.
...
llvm-svn: 126579
2011-02-27 20:15:37 +00:00
Rafael Espindola
13bfff7d40
LTO uses MC now.
...
llvm-svn: 126546
2011-02-26 16:44:13 +00:00
Rafael Espindola
83ad96cc73
Dispose modules early and only create codegen when the plugin is being
...
used by the linker and not by nm or ar.
llvm-svn: 126089
2011-02-20 18:28:29 +00:00
Rafael Espindola
f2fd1bf3d8
Add modules to codegen as soon as possible. This reduces the link time
...
of libxul from 12m31.084s to 7m1.359s.
llvm-svn: 126052
2011-02-19 21:49:57 +00:00
Rafael Espindola
3c40b1fab0
Add a debug obj-path option to make it easy to keep the .o produce by LTO.
...
llvm-svn: 125663
2011-02-16 11:19:44 +00:00
Rafael Espindola
3c32af5834
Switch llvm to using comdats. For now always use groups with a single
...
section.
llvm-svn: 125526
2011-02-14 22:23:49 +00:00
Rafael Espindola
43f9672afa
Don't open the file again in the gold plugin. To be able to do this, update
...
MemoryBuffer::getOpenFile to not close the file descriptor.
llvm-svn: 125128
2011-02-08 22:40:47 +00:00
Michael J. Spencer
2bf08ad59d
gold: MinGW fix.
...
llvm-svn: 123886
2011-01-20 05:43:16 +00:00
Charles Davis
e7f14dfdb8
Now to chant the magical incantation that will exorcise the System library
...
from LLVM forever:
grep -lR "llvm/System" * | grep -v .svn | xargs sed -ie 's#llvm/System#llvm/Support#g'
llvm-svn: 120314
2010-11-29 19:44:50 +00:00
Michael J. Spencer
4a63404543
I swear I did a make clean and make before committing all this...
...
llvm-svn: 120304
2010-11-29 18:47:54 +00:00
Dan Gohman
6645ce3f75
Move tool_output_file into its own file.
...
llvm-svn: 115973
2010-10-07 20:32:40 +00:00
NAKAMURA Takumi
7857655635
Don't build redundant libLLVMgold.a.
...
Building archive would be executed due to definition of BUILD_ARCHIVE,
even if BUILD_ARCHIVE = "0".
llvm-svn: 113578
2010-09-10 06:26:57 +00:00
Nick Lewycky
7d3f15bab3
Fix compile errors.
...
llvm-svn: 112808
2010-09-02 05:44:31 +00:00
Dan Gohman
d8be4c4aca
Convert tools to use tool_output_file, and introduce error
...
checking to places which previously lacked it.
llvm-svn: 111651
2010-08-20 16:59:15 +00:00
Rafael Espindola
f345661269
Make it possible to set the cpu used for codegen.
...
llvm-svn: 110759
2010-08-11 00:15:13 +00:00
Rafael Espindola
c61143ae75
Make it possible to set the flags passed to the assembler.
...
Nick, please review.
llvm-svn: 110705
2010-08-10 18:55:09 +00:00
Rafael Espindola
acfdd67ec8
Fix silly bug.
...
llvm-svn: 110684
2010-08-10 16:32:15 +00:00
Rafael Espindola
fd90a58cd3
Make it possible to set the target triple and expose that with an option in the
...
gold plugin.
llvm-svn: 110604
2010-08-09 21:09:46 +00:00
Rafael Espindola
c3b766cc93
s/libLLVMgold/LLVMgold/g
...
llvm-svn: 110552
2010-08-08 21:14:26 +00:00
Duncan Sands
d0286618b5
Remove variables that are written by not read.
...
llvm-svn: 107126
2010-06-29 11:07:47 +00:00
Rafael Espindola
ea22615ccd
Add an extra-library-path option to the plugin. This is used to support
...
having a library both as bitcode and native code. We want to use the
bitcode first, but if codegen produces new undefined references we have to use
the native code to satisfy those references.
Gold has no notion of bitcode and native search directories, so instead it has
an API where the plugin can instruct it to look for the libraries it is passing
to it. This patch uses that API.
llvm-svn: 106674
2010-06-23 20:20:59 +00:00
Rafael Espindola
705c2bd4c3
add_input_file and add_input_library now take const arguments, remove the
...
const_cast.
llvm-svn: 106410
2010-06-21 02:23:12 +00:00
Rafael Espindola
d7bfa3a0f7
Add a pass-through option to the plugin. The use case for this option is to
...
ask the linker to take another look into some library or object. The case when
one might want to do this is when codegen introduces a new undefined reference.
The canonical example is libgcc.
llvm-svn: 106303
2010-06-18 19:18:58 +00:00
Rafael Espindola
23f533848f
Don't produce output only if *all* files are unused.
...
llvm-svn: 105962
2010-06-14 21:20:52 +00:00
Nick Lewycky
ff1e3db00e
Plug a leak in the non-error case by removing one level of indirection.
...
llvm-svn: 105556
2010-06-07 21:42:19 +00:00
Rafael Espindola
b93be14fa0
Misc cleanups to the gold plugin.
...
llvm-svn: 105534
2010-06-07 16:45:22 +00:00
Rafael Espindola
ee11d1e6a5
Add a emit-llvm option to the plugin and make the path argument to also-emit-llvm optional.
...
llvm-svn: 105414
2010-06-03 21:11:20 +00:00
Nick Lewycky
14c5598c42
Perfer !string.empty() over string != "".
...
llvm-svn: 105397
2010-06-03 17:13:23 +00:00
Nick Lewycky
04d3d4e46f
Whitespace cleanup.
...
llvm-svn: 105395
2010-06-03 17:10:17 +00:00
Rafael Espindola
9d46e81a8b
Don't preserve all symbols in a .so and instead trust gold to know what is
...
needed. The result is that now we are able to drop unnecessary symbol from
shared libraries.
llvm-svn: 105389
2010-06-03 14:45:44 +00:00
Rafael Espindola
aa7f3b0561
Avoid renaming loadable modules at install time. Now the gold plugin is named
...
LLVMgold.so both in both the build and install directories.
llvm-svn: 103897
2010-05-16 03:13:23 +00:00
Rafael Espindola
bc6fabbd3e
Add an also-emit-llvm option to the gold plugin.
...
llvm-svn: 103714
2010-05-13 13:39:31 +00:00
Nick Lewycky
e96e382131
Revert r64616 which worked around http://gcc.gnu.org/PR42757 , we just didn't
...
know it at the time.
llvm-svn: 101439
2010-04-16 04:32:20 +00:00
Dan Gohman
499f38cfcb
Create an exports file, so that the plugin only exports the onload symbol.
...
llvm-svn: 101431
2010-04-16 00:43:25 +00:00
Dan Gohman
792df0f4ca
Make things static that don't need to be referenced from outside the file.
...
llvm-svn: 101430
2010-04-16 00:42:57 +00:00
Chris Lattner
5a57121631
make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
...
llvm-svn: 94378
2010-01-24 20:43:08 +00:00
Chris Lattner
276811b58a
Stop building RTTI information for *most* llvm libraries. Notable
...
missing ones are libsupport, libsystem and libvmcore. libvmcore is
currently blocked on bugpoint, which uses EH. Once it stops using
EH, we can switch it off.
This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.
llvm-svn: 94164
2010-01-22 06:49:46 +00:00
Viktor Kutuzov
4da1a5215a
Fix to pass options from Gold plugin to LTO codegen
...
llvm-svn: 85419
2009-10-28 18:55:55 +00:00
Duncan Sands
728eebe8e2
Include config.h in order to have HAVE_STDINT_H be defined.
...
In the latest binutils the plugin-api.h needs this - without
it the LLVM gold plugin fails to compile.
llvm-svn: 84861
2009-10-22 16:03:32 +00:00
Nick Lewycky
4c87d257a4
Fix Makefile to build correctly on Darwin. Patch by Sandeep Patel!
...
llvm-svn: 83813
2009-10-11 23:10:09 +00:00
Dan Gohman
53f0d68f87
Make LLVM command-line tools overwrite their output files without -f.
...
This is conventional command-line tool behavior. -f now just means
"enable binary output on terminals".
Add a -f option to llvm-extract and llvm-link, for consistency.
Remove F_Force from raw_fd_ostream and enable overwriting and
truncating by default. Introduce an F_Excl flag to permit users to
enable a failure when the file already exists. This flag is
currently unused.
Update Makefiles and documentation accordingly.
llvm-svn: 79990
2009-08-25 15:34:52 +00:00
Chris Lattner
f16d8ade4f
Change raw_fd_ostream to take flags as an optional bitmask
...
instead of as two bools. Use this to add a F_Append flag
which has the obvious behavior.
Other unrelated changes conflated into this patch:
1. REmove EH stuff from llvm-dis and llvm-as, the try blocks
are dead.
2. Simplify the filename inference code in llvm-as/llvm-dis,
because raw_fd_ostream does the right thing with '-'.
3. Switch machine verifier to use raw_ostream instead of ostream
(Which is the thing that needed append in the first place).
llvm-svn: 79807
2009-08-23 02:51:22 +00:00
Dan Gohman
9ced780576
Add a Force option to raw_fd_ostream to specify whether opening
...
an existing file is considered an error. Convert several tools
to use raw_fd_ostream instead of std::ostream, and to use this
new option instead of doing a manual check.
llvm-svn: 75801
2009-07-15 17:29:42 +00:00