History log of /external/llvm/tools/gold/gold-plugin.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cddc3e03e4ec99c0268c03a126195173e519ed58 04-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r256229

http://b/26987366

(cherry picked from commit f3ef5332fa3f4d5ec72c178a2b19dac363a19383)

Change-Id: Ic75dcb63191d65df1b69724576392c0aaeb47728
/external/llvm/tools/gold/gold-plugin.cpp
6948897e478cbd66626159776a8017b3c18579b9 01-Jul-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r239765

Bug: 20140355: This rebase pulls the upstream fix for the spurious
warnings mentioned in the bug.

Change-Id: I7fd24253c50f4d48d900875dcf43ce3f1721a3da
/external/llvm/tools/gold/gold-plugin.cpp
0c7f116bb6950ef819323d855415b2f2b0aad987 06-May-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r235153

Change-Id: I9bf53792f9fc30570e81a8d80d296c681d005ea7
/external/llvm/tools/gold/gold-plugin.cpp
4c5e43da7792f75567b693105cc53e3f1992ad98 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master llvm for rebase to r233350

Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
/external/llvm/tools/gold/gold-plugin.cpp
ebe69fe11e48d322045d5949c83283927a0d790b 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r230699.

Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
/external/llvm/tools/gold/gold-plugin.cpp
37ed9c199ca639565f6ce88105f9e39e898d82d0 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r222494.

Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
/external/llvm/tools/gold/gold-plugin.cpp
c6a4f5e819217e1e12c458aed8e7b122e23a3a58 21-Jul-2014 Stephen Hines <srhines@google.com> Update LLVM for rebase to r212749.

Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls

Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
/external/llvm/tools/gold/gold-plugin.cpp
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/tools/gold/gold-plugin.cpp
7e667c56cf7e27ff521ceb86518beab32bfb630d 31-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Use LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN instead of the "dso list".

There are two ways one could implement hiding of linkonce_odr symbols in LTO:
* LLVM tells the linker which symbols can be hidden if not used from native
files.
* The linker tells LLVM which symbols are not used from other object files,
but will be put in the dso symbol table if present.

GOLD's API is the second option. It was implemented almost 1:1 in llvm by
passing the list down to internalize.

LLVM already had partial support for the first option. It is also very similar
to how ld64 handles hiding these symbols when *not* doing LTO.

This patch then
* removes the APIs for the DSO list.
* marks LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN all linkonce_odr unnamed_addr
global values and other linkonce_odr whose address is not used.
* makes the gold plugin responsible for handling the API mismatch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
2d8a1d677c81c8e05d1dbc7832e1ced10cfc629a 18-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Check for errors when calling lto_codegen_add_module in the gold plugin.

Thanks to Milan Lenčo for noticing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
648a2e6714885e9b3d2a4f380434fe44ef2c4b5b 16-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> [pr17595] Fix a use after free.

Destroying the codegen also frees the path of the created object. Copy the
path to a std::string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
438900938c3ac9d7fac2dd5d2c85ca4b9b2e35f7 03-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Optimize linkonce_odr unnamed_addr functions during LTO.

Generalize the API so we can distinguish symbols that are needed just for a DSO
symbol table from those that are used from some native .o.

The symbols that are only wanted for the dso symbol table can be dropped if
llvm can prove every other dso has a copy (linkonce_odr) and the address is not
important (unnamed_addr).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
75a641c910adb9df1de015de41cbf02570677bf8 03-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Dispose the codegen even when just writing the bitcode file.

This makes it possible to add timers to the code generator and still use them
with -plugin-opt=emit-llvm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
cfaa636a1d31f2db71df627e4882e9d5c066c419 12-Aug-2013 Shuxin Yang <shuxin.llvm@gmail.com> Revert r188188 and r188200.

In order to appease people (in Apple) who accuse me for committing "huge change" (?) without proper review.

Thank Eric for fixing a compile-warning.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
67d135ae40b121a138e334a175d0e02dbb54eeca 12-Aug-2013 Shuxin Yang <shuxin.llvm@gmail.com> Misc enhancements to LTO:

1. Add some helper classes for partitions. They are designed in a
way such that the top-level LTO driver will not see much difference
with or without partitioning.

2. Introduce work-dir. Now all intermediate files generated during
LTO phases will be saved under work-dir. User can specify the workdir
via -lto-workdir=/path/to/dir. By default the work-dir will be
erased before linker exit. To keep the workdir, do -lto-keep, or -lto-keep=1.

TODO: Erase the workdir, if the linker exit prematurely.
We are currently not able to remove directory on signal. The support
routines simply ignore directory.

3. Add one new API lto_codegen_get_files_need_remove().
Linker and LTO plugin will communicate via this API about which files
(including directories) need to removed before linker exit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
70c7e485453fdbc228406715556f9447bc9f9fd8 23-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> Split getOpenFile into getOpenFile and getOpenFileSlice.

The main observation is that we never need both the filesize and the map size.
When mapping a slice of a file, it doesn't make sense to request a null
terminator and that would be the only case where the filesize would be used.

There are other cleanups that should be done in this area:

* A client should not have to pass the size (even an explicit -1) to say if
it wants a null terminator or not, so we should probably swap the argument
order.
* The default should be to not require a null terminator. Very few clients
require this, but many end up asking for it just because it is the default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
963cf75e1cf9a87f0f571919d06adcbf60edd377 23-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> Fix use of the getOpenFile api.

The gold plugin was passing the desired map size as the file size. This was
working for two reasons:
* Recent version of gold provide the get_view callback, so this code was not
used.
* In older versions, getOpenFile was called, but the file size is never used
if we don't require null terminated buffers and map size defaults to the
file size.

Thanks to Eli Bendersky for noticing this.

I will try to make this api a bit less error prone.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
b317987c2bc5b5a3df145f22b650197ba0caf2a7 18-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Fix the build with gcc 4.7 and -std=c++11.

The error message was:

/home/espindola/llvm/llvm/tools/gold/gold-plugin.cpp: In function ‘ld_plugin_status cleanup_hook()’:
/home/espindola/llvm/llvm/tools/gold/gold-plugin.cpp:461:30: error: cannot pass objects of non-trivially-copyable type ‘std::string {aka class std::basic_string<char>}’ through ‘...’

I will check if this was a clang or gcc issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
b33941107080129a912632573e5a53f950c3610a 17-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't use PathV1.h in tools/gold/gold-plugin.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
675e0ac0bfd6fb78423d9fbee9f50c1dec62c111 13-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Avoid using PathV1.h in Program.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
f010c464a11444733ec67e31aace8bcebeaf2588 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort the #include lines for tools/...

Again, tools are trickier to pick the main module header for than
library source files. I've started to follow the pattern of using
LLVMContext.h when it is included as a stub for program source files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
fffb72470d126e7000a03a88ed30326e3521d84f 26-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> libLTO has a bug in that it will keep every symbol if none is needed. We used
to hack around this in the gold plugin by deleting a module if no symbol was
needed. Unfortunately, the hack is wrong in the case of o module having no
visible symbols but still having side effects via static constructors.

The bug will have to be fixed in libLTO itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
4f81768d448f909f503885520928b1723f0388a3 13-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Use LTO_CODEGEN_PIC_MODEL_DYNAMIC for PIE. This requirest a git version of
gold to work. Since the enum value LDPO_PIE has just been added to plugin-api.h,
use a numeric constant for now so that we don't require an unreleased
version of gold to build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
9421406aada374f79ce2f8e576824463f7830981 23-Dec-2011 Dylan Noblesmith <nobled@dreamwidth.org> drop unneeded config.h includes



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147197 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
71280b55a3406c7dd4215449bf4a3ab216e78ffd 16-Sep-2011 Ivan Krasin <krasin@chromium.org> use 64-bit types instead of off_t/size_t to avoid the issue when
gold plugin is built with Large File Support (sizeof(off_t) == 64 on i686)
and the rest of LLVM is built w/o Large File Support
(sizeof(off_t) == 32 on i686) which corrupts the stack.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
ccb7c906d1a2237c6dca4f4e8fbc4d7dca89979a 12-Sep-2011 Ivan Krasin <krasin@chromium.org> gold plugin: don't report error on non-bitcode (e.g. ELF) files.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
c170f5f31cd697818bf470b57b72c11a1da78010 09-Sep-2011 Ivan Krasin <krasin@chromium.org> gold plugin: report errors occured in lto_module_create_from_*



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
5e0ac58bef2632a804358ec42a6ba5c6be42c450 26-Jul-2011 Nick Lewycky <nicholas@mxc.ca> Don't try to dereference syms[0] on an empty vector. Reported by Todd Jackson
and Jeffrey Bosboom!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
2abb82b1d3bc31d75b7c03d76f7343d450f7b394 04-May-2011 Duncan Sands <baldrick@free.fr> Remove an unused variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
e578252c27a85f3e63eb749006def6d0ce5ef1e1 07-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
6421a8815e14189121a5e20731fd005ea08793e1 22-Mar-2011 Rafael Espindola <rafael.espindola@gmail.com> Add a lto_codegen_compile_to_file to avoid producing a file, reading it to
memory and writing it back to disk.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
f21b1058a194f411000bdd8000a8b675a7874056 17-Mar-2011 Rafael Espindola <rafael.espindola@gmail.com> Add support in the LTO library for loading an object from the middle
of an file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
d36fb9b5d44b5df27e3d6559e04d44f2cbc6be94 27-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Gold now rescans archives as needed, so the pass-through options are not
necessary anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
35358e02bbd584af79132df82ad346c2e32cae21 27-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> bfd was fixed, remove the work around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
981b1c4c62054e4e39570a9230c0318f13f9a0a9 26-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> LTO uses MC now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
8e04fc3adf3419eeb9466b66cbaf9b027dcc2cab 20-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Dispose modules early and only create codegen when the plugin is being
used by the linker and not by nm or ar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
37d42f8a5072bfd216445b8c1f983686dea0ea1c 19-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Add modules to codegen as soon as possible. This reduces the link time
of libxul from 12m31.084s to 7m1.359s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
5a287d7a03ebf56c85de05968548aa2826a5886b 16-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Add a debug obj-path option to make it easy to keep the .o produce by LTO.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
5d618ef7f1ad005fc6912f3e9a08c044b082e47f 14-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Switch llvm to using comdats. For now always use groups with a single
section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
b4cc031a3e1306fea74c9211d50c5cde6d9a8cd5 08-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
8b1659e8bf957f09da5cf912ad2702b3366e4c08 20-Jan-2011 Michael J. Spencer <bigcheesegs@gmail.com> gold: MinGW fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
3cc52ea33c0b96d1682f14fc45c45b57df0f39b6 29-Nov-2010 Michael J. Spencer <bigcheesegs@gmail.com> I swear I did a make clean and make before committing all this...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
e4f1a9b8a272ff7452759019ee7774e9dbdf1568 07-Oct-2010 Dan Gohman <gohman@apple.com> Move tool_output_file into its own file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
59b4d2a371e2a37db2876bc57db19475c7a1c527 02-Sep-2010 Nick Lewycky <nicholas@mxc.ca> Fix compile errors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
f29140106f74d15ba357aa0a7f109adc939c3104 20-Aug-2010 Dan Gohman <gohman@apple.com> Convert tools to use tool_output_file, and introduce error
checking to places which previously lacked it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
2d643ef32891859ec73b6eea2959748f5ebc3af7 11-Aug-2010 Rafael Espindola <rafael.espindola@gmail.com> Make it possible to set the cpu used for codegen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110759 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
98197e55c10176c3ef9100f7d852abbd2347225f 10-Aug-2010 Rafael Espindola <rafael.espindola@gmail.com> Make it possible to set the flags passed to the assembler.

Nick, please review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
15af387bffbf8e1fbab720fd0b92291bb68c023b 10-Aug-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix silly bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
cbb170d057aa6692b19f577b1e09a6c1c7a26969 09-Aug-2010 Rafael Espindola <rafael.espindola@gmail.com> Make it possible to set the target triple and expose that with an option in the
gold plugin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
51370298b848f215762bd8203afa64d0e2c89581 29-Jun-2010 Duncan Sands <baldrick@free.fr> Remove variables that are written by not read.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
11f403cf2be4d562f731571aee90bc25bd2d38ae 23-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
bebb640b6b495b89f37dde7921f88f24deaf00be 21-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> add_input_file and add_input_library now take const arguments, remove the
const_cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
dd76f18f90f3d9934353d852e45271b3be747743 18-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
38a979bf95db020094769194651b91291ca0220c 14-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't produce output only if *all* files are unused.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
221aec60a7feb5fa14e7c2539617909855623ac1 07-Jun-2010 Nick Lewycky <nicholas@mxc.ca> Plug a leak in the non-error case by removing one level of indirection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
6c8099243a0d8ff710e8f657628a8bea99b5dd07 07-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Misc cleanups to the gold plugin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
c4b55610d8cdd58e09b570c33c7484a60e500389 03-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Add a emit-llvm option to the plugin and make the path argument to also-emit-llvm optional.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
662f738ec3f9f4c77052b5a593cb30c28069713e 03-Jun-2010 Nick Lewycky <nicholas@mxc.ca> Perfer !string.empty() over string != "".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
fc55defb308aa994fae446f66ebc5a197263b81e 03-Jun-2010 Nick Lewycky <nicholas@mxc.ca> Whitespace cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
c72f8e9f9d5b7a9c1717428f02ba30ad3f401799 03-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105389 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
62bacd69c2a21d55c308fb3e94e550559762b32c 13-May-2010 Rafael Espindola <rafael.espindola@gmail.com> Add an also-emit-llvm option to the gold plugin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
4b67bc1e80a94ccceebda899e889e15c6c6c45ba 16-Apr-2010 Nick Lewycky <nicholas@mxc.ca> Revert r64616 which worked around http://gcc.gnu.org/PR42757 , we just didn't
know it at the time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
f6920033e0ad2cd1e18d52dd56d0e8a3384faf72 16-Apr-2010 Dan Gohman <gohman@apple.com> Make things static that don't need to be referenced from outside the file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
5c00b4af61bb6abff2fb28ddd904808623a7db23 28-Oct-2009 Viktor Kutuzov <vkutuzov@accesssoftek.com> Fix to pass options from Gold plugin to LTO codegen

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
09b5d90429258f92f5e5ac98411a71460bcd9230 22-Oct-2009 Duncan Sands <baldrick@free.fr> 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
baa26395ccf17fc988bb9cf62d6659ca8415ece9 25-Aug-2009 Dan Gohman <gohman@apple.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
17e9edc4a7bbeadf756494cf39fcacc9eff72202 23-Aug-2009 Chris Lattner <sabre@nondot.org> 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).




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
a1bdcedc3879510a874d24c450e07feb170d9cd6 15-Jul-2009 Dan Gohman <gohman@apple.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
ed1c0ffe0b2287deaee7cba7506c93aa34c6d4b7 01-Jul-2009 Jeffrey Yasskin <jyasskin@google.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
42de34f013ee15377dd78aa0d827100166cb66c9 15-Jun-2009 Rafael Espindola <rafael.espindola@gmail.com> 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
a9b9032df155fde9855307483f8e0b621f8730d7 07-Jun-2009 Nick Lewycky <nicholas@mxc.ca> Add option for specifying the path to assembler, "as". This overrides the path
to gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
195bea3498a7de1d84ace6d4685f02d4d7485468 30-Apr-2009 Nick Lewycky <nicholas@mxc.ca> Allow a user of libLTO to specify the full pathname of the gcc executable to
run when assembling.

Wire this up to the gold plugin. You can now pass --plugin-opt gcc=/foo/bar/gcc
and it will run that gcc instead of looking for it on the path.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
7431af050f287011fd52e64034ede6dd98193feb 24-Apr-2009 Rafael Espindola <rafael.espindola@gmail.com> Add LTO_SYMBOL_DEFINITION_WEAKUNDEF, use that on the gold plugin.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
ca4286295f7db200724cb488a04ad15441a8ba99 22-Feb-2009 Nick Lewycky <nicholas@mxc.ca> Add an option to the gold plugin to make it emit a file with the public api
list that can in turn be passed to -internalize pass through
-internalize-public-api-file.

Pass gold -plugin-opt=generate-api-file to produce "apifile.txt" in the current
directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
6210a9493a25a9f97f4f0ec62a3ed8ca00f72423 18-Feb-2009 Rafael Espindola <rafael.espindola@gmail.com> really fix style


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
98c507ed5c2883bc8ef487d952e851da37f8b32f 18-Feb-2009 Rafael Espindola <rafael.espindola@gmail.com> fix style


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
f163a957057339163c3dee24bce21911fb4dcdf5 17-Feb-2009 Rafael Espindola <rafael.espindola@gmail.com> tools like nm and ar only need register_claim_file and add_symbols. Don't abort
if other hooks are missing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64812 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
45eb7865c924001e09bb2049708d4f1576ac23d4 15-Feb-2009 Nick Lewycky <nicholas@mxc.ca> Shoot! Remove this debugging line again!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64617 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
e0afaa301d763096af400ef44714b0f4deb5b68b 15-Feb-2009 Nick Lewycky <nicholas@mxc.ca> Don't discard definitions of common symbols. Not sure if this is the right fix.

Before this change, the program:
int var;
int main(void) { return 0; }
when run under 'nm -g' would show 'U var' with the gold plugin and
'B var' with gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
0df91b2c8677f3f8fd25b46953051c9d95c1c1ae 07-Feb-2009 Nick Lewycky <nicholas@mxc.ca> Free the buffer in the case where we don't create a module out of it, as
pointed out by Torok Edwin.

Remove trailing whitespaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
ea97aa6129fc89292e215d01fa66504195f1a969 06-Feb-2009 Nick Lewycky <nicholas@mxc.ca> Free the buffer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
98245c7060a0a5399ca9e53f25541a5751ce4689 05-Feb-2009 Nick Lewycky <nicholas@mxc.ca> It's not obvious, but lto_module_create_from_memory doesn't need to use the
buffer after it creates the Module. Thus, we don't need to store this pointer
in claimed_file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
c1da8864a9a47329af6255567097f01d352eb311 05-Feb-2009 Nick Lewycky <nicholas@mxc.ca> Remove accidentally included debug message!

Reword a comment for clarity. Remove some extra whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
6cbbdfd2e900164beeb34513a25d88cc58e582b0 04-Feb-2009 Torok Edwin <edwintorok@gmail.com> Alphabetize includes. Update comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
4cb16349b0a45bfdc21d69bed416e4f3e00a1196 04-Feb-2009 Torok Edwin <edwintorok@gmail.com> remove printf - it was there only for debugging!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
3e5a0d8b0b848d1b0deb8976924703787b221e31 04-Feb-2009 Torok Edwin <edwintorok@gmail.com> add support for .a files containing LLVM IR to the gold plugin


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp
3e62b2dc93dae6904f0717612782ab6ebf413e1d 03-Feb-2009 Nick Lewycky <nicholas@mxc.ca> Add LLVM plugin for gold.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/gold/gold-plugin.cpp