Oscar Fuentes
0122841626
Force re-linking of LLVMgold.so when its exports file changes.
...
llvm-svn: 127473
2011-03-11 18:27:13 +00:00
Oscar Fuentes
87e4a4da0d
Fix processing of gold.exports.
...
llvm-svn: 127471
2011-03-11 18:07:46 +00:00
Oscar Fuentes
64d05bc281
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
7e5fe6ce1c
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
92c06ba158
bfd was fixed, remove the work around.
...
llvm-svn: 126579
2011-02-27 20:15:37 +00:00
Rafael Espindola
908d391bd2
LTO uses MC now.
...
llvm-svn: 126546
2011-02-26 16:44:13 +00:00
Rafael Espindola
9ef90d5b35
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
d4f34d840e
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
6b6ed5d1f9
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
70d8015063
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
56e41f7f0b
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
06f5223621
gold: MinGW fix.
...
llvm-svn: 123886
2011-01-20 05:43:16 +00:00
Charles Davis
54c9eb6fff
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
ab425d8360
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
0df7ea4c24
Move tool_output_file into its own file.
...
llvm-svn: 115973
2010-10-07 20:32:40 +00:00
NAKAMURA Takumi
217cadd434
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
3e19542ed3
Fix compile errors.
...
llvm-svn: 112808
2010-09-02 05:44:31 +00:00
Dan Gohman
8525fe7155
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
ccab1dddd1
Make it possible to set the cpu used for codegen.
...
llvm-svn: 110759
2010-08-11 00:15:13 +00:00
Rafael Espindola
0045646633
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
148c3284ee
Fix silly bug.
...
llvm-svn: 110684
2010-08-10 16:32:15 +00:00
Rafael Espindola
4ef89f5200
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
717cd17f6f
s/libLLVMgold/LLVMgold/g
...
llvm-svn: 110552
2010-08-08 21:14:26 +00:00
Duncan Sands
b69a3e27df
Remove variables that are written by not read.
...
llvm-svn: 107126
2010-06-29 11:07:47 +00:00
Rafael Espindola
ef49815638
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
9d94ebf1b6
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
8297640062
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
77b6d01906
Don't produce output only if *all* files are unused.
...
llvm-svn: 105962
2010-06-14 21:20:52 +00:00
Nick Lewycky
4ecf2cc5ea
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
c4dca3aeb6
Misc cleanups to the gold plugin.
...
llvm-svn: 105534
2010-06-07 16:45:22 +00:00
Rafael Espindola
8fb957e5cb
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
ca4180c92a
Perfer !string.empty() over string != "".
...
llvm-svn: 105397
2010-06-03 17:13:23 +00:00
Nick Lewycky
0ac5e2205c
Whitespace cleanup.
...
llvm-svn: 105395
2010-06-03 17:10:17 +00:00
Rafael Espindola
00121827b2
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
0af6889b89
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
ba3398bb1a
Add an also-emit-llvm option to the gold plugin.
...
llvm-svn: 103714
2010-05-13 13:39:31 +00:00
Nick Lewycky
bb2ec7de9c
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
0977358509
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
ebb4ae0912
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
823aed16f9
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
7ba0661f27
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
fd7ddd9c69
Fix to pass options from Gold plugin to LTO codegen
...
llvm-svn: 85419
2009-10-28 18:55:55 +00:00
Duncan Sands
f34a264c60
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
f8dd676a50
Fix Makefile to build correctly on Darwin. Patch by Sandeep Patel!
...
llvm-svn: 83813
2009-10-11 23:10:09 +00:00
Dan Gohman
61a8796ddb
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
9e6f1f160a
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
607818a2c1
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
Jeffrey Yasskin
1a93330ffa
Add a portable strerror*() wrapper, llvm::sys::StrError(). This includes the
...
Windows variant, strerror_s, but I couldn't test that.
I'll update configure and config.h.in in a subsequent patch.
llvm-svn: 74621
2009-07-01 18:11:20 +00:00
Chris Lattner
3912036c25
remove dead makefile flags.
...
llvm-svn: 74065
2009-06-24 05:29:56 +00:00
Rafael Espindola
27f6cb18d1
Remove the gcc= option. llvm-gcc uses only as=
...
Look for as in the path. Doing it here instead
of llvm-gcc because llvm-gcc has nothing as
convenient as sys::Program::FindProgramByName.
llvm-svn: 73383
2009-06-15 10:14:18 +00:00