summaryrefslogtreecommitdiff
path: root/tools/gold
Commit message (Collapse)AuthorAge
* Fix the build with gcc 4.7 and -std=c++11.Rafael Espindola2013-06-17
| | | | | | | | | | | 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
* Don't use PathV1.h in tools/gold/gold-plugin.cpp.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184099 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid using PathV1.h in Program.h.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183940 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the #include lines for tools/...Chandler Carruth2012-12-04
| | | | | | | | 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
* libLTO has a bug in that it will keep every symbol if none is needed. We usedRafael Espindola2012-10-26
| | | | | | | | | | 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
* Pass -lLTO after gold-plugin.o so that it gets used in systems that default toRafael Espindola2012-08-27
| | | | | | | --as-needed. Patch by Felix Geyer. Fixes pr13262. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162652 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LTO_CODEGEN_PIC_MODEL_DYNAMIC for PIE. This requirest a git version ofRafael Espindola2012-06-13
| | | | | | | | 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
* drop unneeded config.h includesDylan Noblesmith2011-12-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147197 91177308-0d34-0410-b5e6-96231b3b80d8
* Point to libLTO with -L/PATH/ -lLTO so that it is found in the installRafael Espindola2011-11-23
| | | | | | | directory. Patch by Markus Trippelsdorf. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145095 91177308-0d34-0410-b5e6-96231b3b80d8
* Use absolute path to exportsfile in gold plugin CMake build.Peter Collingbourne2011-11-05
| | | | | | (Ninja generator requirement.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143783 91177308-0d34-0410-b5e6-96231b3b80d8
* build: Tidy up a bunch of tool Makefiles, and simplify where possible using theDaniel Dunbar2011-10-18
| | | | | | new all-targets pseudo-component. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142401 91177308-0d34-0410-b5e6-96231b3b80d8
* use 64-bit types instead of off_t/size_t to avoid the issue whenIvan Krasin2011-09-15
| | | | | | | | | | 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
* gold plugin: don't report error on non-bitcode (e.g. ELF) files.Ivan Krasin2011-09-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139544 91177308-0d34-0410-b5e6-96231b3b80d8
* gold plugin: report errors occured in lto_module_create_from_*Ivan Krasin2011-09-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139340 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to dereference syms[0] on an empty vector. Reported by Todd JacksonNick Lewycky2011-07-26
| | | | | | | and Jeffrey Bosboom! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136066 91177308-0d34-0410-b5e6-96231b3b80d8
* Also remove -lLTO which should have been in r132349. I failed to apply thisNick Lewycky2011-05-31
| | | | | | | from David Meyer's patch! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132352 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the gold plugin build on Cygwin as well as Linux. Patch by David Meyer!Nick Lewycky2011-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132349 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake builds gold by default since revision 127466. This isOscar Fuentes2011-05-12
| | | | | | | | | inconsistent with autoconf, which by default set BINUTILS_INCDIR to empty and exclude gold from target list. Based on a patch by Haitao Li! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131229 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an unused variable.Duncan Sands2011-05-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130860 91177308-0d34-0410-b5e6-96231b3b80d8
* If present, use gold's support for getting a file view. This prevents havingRafael Espindola2011-04-07
| | | | | | 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
* Add a lto_codegen_compile_to_file to avoid producing a file, reading it toRafael Espindola2011-03-22
| | | | | | memory and writing it back to disk. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128108 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support in the LTO library for loading an object from the middleRafael Espindola2011-03-17
| | | | | | of an file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127781 91177308-0d34-0410-b5e6-96231b3b80d8
* Force re-linking of LLVMgold.so when its exports file changes.Oscar Fuentes2011-03-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127473 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix processing of gold.exports.Oscar Fuentes2011-03-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127471 91177308-0d34-0410-b5e6-96231b3b80d8
* Add LTO and gold plugin to the CMake build. Linux-only, support forOscar Fuentes2011-03-11
| | | | | | | | other systems pending. PR9456. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127466 91177308-0d34-0410-b5e6-96231b3b80d8
* Gold now rescans archives as needed, so the pass-through options are notRafael Espindola2011-02-27
| | | | | | necessary anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126580 91177308-0d34-0410-b5e6-96231b3b80d8
* bfd was fixed, remove the work around.Rafael Espindola2011-02-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126579 91177308-0d34-0410-b5e6-96231b3b80d8
* LTO uses MC now.Rafael Espindola2011-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126546 91177308-0d34-0410-b5e6-96231b3b80d8
* Dispose modules early and only create codegen when the plugin is beingRafael Espindola2011-02-20
| | | | | | 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
* Add modules to codegen as soon as possible. This reduces the link timeRafael Espindola2011-02-19
| | | | | | 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
* Add a debug obj-path option to make it easy to keep the .o produce by LTO.Rafael Espindola2011-02-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125663 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch llvm to using comdats. For now always use groups with a singleRafael Espindola2011-02-14
| | | | | | section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125526 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't open the file again in the gold plugin. To be able to do this, updateRafael Espindola2011-02-08
| | | | | | 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
* gold: MinGW fix.Michael J. Spencer2011-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123886 91177308-0d34-0410-b5e6-96231b3b80d8
* Now to chant the magical incantation that will exorcise the System libraryCharles Davis2010-11-29
| | | | | | | | | from LLVM forever: grep -lR "llvm/System" * | grep -v .svn | xargs sed -ie 's#llvm/System#llvm/Support#g' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120314 91177308-0d34-0410-b5e6-96231b3b80d8
* I swear I did a make clean and make before committing all this...Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120304 91177308-0d34-0410-b5e6-96231b3b80d8
* Move tool_output_file into its own file.Dan Gohman2010-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115973 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't build redundant libLLVMgold.a.NAKAMURA Takumi2010-09-10
| | | | | | | Building archive would be executed due to definition of BUILD_ARCHIVE, even if BUILD_ARCHIVE = "0". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113578 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix compile errors.Nick Lewycky2010-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112808 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert tools to use tool_output_file, and introduce errorDan Gohman2010-08-20
| | | | | | | checking to places which previously lacked it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111651 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible to set the cpu used for codegen.Rafael Espindola2010-08-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110759 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible to set the flags passed to the assembler.Rafael Espindola2010-08-10
| | | | | | Nick, please review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110705 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix silly bug.Rafael Espindola2010-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110684 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible to set the target triple and expose that with an option in theRafael Espindola2010-08-09
| | | | | | gold plugin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110604 91177308-0d34-0410-b5e6-96231b3b80d8
* s/libLLVMgold/LLVMgold/gRafael Espindola2010-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110552 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove variables that are written by not read.Duncan Sands2010-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107126 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an extra-library-path option to the plugin. This is used to supportRafael Espindola2010-06-23
| | | | | | | | | | | | 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
* add_input_file and add_input_library now take const arguments, remove theRafael Espindola2010-06-21
| | | | | | const_cast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106410 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a pass-through option to the plugin. The use case for this option is toRafael Espindola2010-06-18
| | | | | | | | 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
* Don't produce output only if *all* files are unused.Rafael Espindola2010-06-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105962 91177308-0d34-0410-b5e6-96231b3b80d8