summaryrefslogtreecommitdiff
path: root/tools/llvm-ld/llvm-ld.cpp
Commit message (Collapse)AuthorAge
* Make tool_output_file's raw_ostream instance a member variable insteadDan Gohman2010-09-01
| | | | | | | | | | | of a base class. This makes it possible to unregister the file from FilesToRemove when the file is done. Also, this eliminates the need for formatted_tool_output_file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112706 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
* Print chatty verbose messages to errs() instead of outs().Dan Gohman2010-08-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111599 91177308-0d34-0410-b5e6-96231b3b80d8
* don't pass -f to llc, it doesn't have it anymore. Patch by Kevin Fan (PR7090)Chris Lattner2010-05-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103263 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix more -Wcast-qual warnings.Dan Gohman2010-04-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101656 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix llvm-ld to clean up its output files in case of an error.Dan Gohman2010-03-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99915 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r99719 which is breaking the botz.Chris Lattner2010-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99721 91177308-0d34-0410-b5e6-96231b3b80d8
* Make llvm-ld remove its output files in the event of an error.Dan Gohman2010-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99719 91177308-0d34-0410-b5e6-96231b3b80d8
* No need to check the same condition twice.Dan Gohman2010-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99716 91177308-0d34-0410-b5e6-96231b3b80d8
* Trim #includes.Dan Gohman2010-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99416 91177308-0d34-0410-b5e6-96231b3b80d8
* It's not necessary to call raw_ostream::close explicitly on automaticDan Gohman2010-03-24
| | | | | | | raw_ostream variables immediately before they go out of scope. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99413 91177308-0d34-0410-b5e6-96231b3b80d8
* make sure to delete the llvm module before calling llvm_shutdown,Chris Lattner2010-03-23
| | | | | | | this fixes crashes in error cases, PR6683 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99334 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace strcpy with memcpy when we have the length around anyway.Benjamin Kramer2010-01-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94746 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-ld doesn't throw.Chris Lattner2009-10-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84819 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LLVM command-line tools overwrite their output files without -f.Dan Gohman2009-08-25
| | | | | | | | | | | | | | | | | 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
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-23
| | | | | | | | | | | | | | | | | | | | forcing them down into various .cpp files. This change also: 1. Renames TimeValue::toString() and Path::toString() to ::str() for similarity with the STL. 2. Removes all stream insertion support for sys::Path, forcing clients to call .str(). 3. Removes a use of Config/alloca.h from bugpoint, using smallvector instead. 4. Weans llvm-db off <iostream> sys::Path really needs to be gutted, but I don't have the desire to do it at this point. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79869 91177308-0d34-0410-b5e6-96231b3b80d8
* Change raw_fd_ostream to take flags as an optional bitmask Chris Lattner2009-08-23
| | | | | | | | | | | | | | | | | | | 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
* Use (void *)(intptr_t) to cast function addresses to void*Dan Gohman2009-08-05
| | | | | | | | for use with sys::Path::GetMainExecutable, to avoid warnings with -pedantic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78245 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix FindExecutable to use sys::Path::GetMainExecutable instead ofDan Gohman2009-08-05
| | | | | | | | | | | | | | just argv[0]. And remove the code for searching the current working directory and for searching PATH; the point of FindExecutable is not to find whatever version of the executable can be found by searching around, but to find an executable that accompanies the current executable. Update the tools to use sys::Program::FindProgramByName when they want PATH searching. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78240 91177308-0d34-0410-b5e6-96231b3b80d8
* Added -b option to override the default bitcode output file name.Sanjiv Gupta2009-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76768 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert more tools code from cerr and cout to errs() and outs().Dan Gohman2009-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76070 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill off last uses of TargetMachineRegistry class.Daniel Dunbar2009-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75892 91177308-0d34-0410-b5e6-96231b3b80d8
* To simplify the upcoming context-on-type change, switch all command line ↵Owen Anderson2009-07-15
| | | | | | | | | tools to using the default global context for now. This will let us to hardwire stuff to the global context in the short term while the API is sorted out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75846 91177308-0d34-0410-b5e6-96231b3b80d8
* Hold the LLVMContext by reference rather than by pointer.Owen Anderson2009-07-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-01
| | | | | | | | | | | LLVMContext through a lot of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74614 91177308-0d34-0410-b5e6-96231b3b80d8
* Change various llvm utilities to use PrettyStackTraceProgram inChris Lattner2009-03-06
| | | | | | | | their main routines. This makes the tools print their argc/argv commands if they crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66248 91177308-0d34-0410-b5e6-96231b3b80d8
* make llvm-ld smart enough to link against native libraries that are Chris Lattner2009-01-05
| | | | | | | | not in system library directories by checking -L paths as well. Patch by Axel Naumann! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61730 91177308-0d34-0410-b5e6-96231b3b80d8
* ignore the -m elf_i386 directive used in the linux kernelAndrew Lenharth2008-11-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59642 91177308-0d34-0410-b5e6-96231b3b80d8
* Since we are using GCC to assemble the program, make sure the assembly ↵Argyrios Kyrtzidis2008-06-27
| | | | | | syntax is AT&T. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52827 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an "exe" suffix only if the output file has no suffix at all.Argyrios Kyrtzidis2008-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52289 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure all produced executable files have "exe" suffix on Windows.Argyrios Kyrtzidis2008-06-15
| | | | | | With this more general way, -native and -native-cbe options are handled too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52287 91177308-0d34-0410-b5e6-96231b3b80d8
* Append "exe" suffix to executable files.Argyrios Kyrtzidis2008-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52285 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak build with gcc 4.3: provide missed includes and silence most ↵Anton Korobeynikov2008-02-20
| | | | | | annoying warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47367 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for frameworks. Patch by Shantonu Sen!Chris Lattner2008-01-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46421 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix llvm-ld -Xlinker, patch by Daniel Teske!Chris Lattner2008-01-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45770 91177308-0d34-0410-b5e6-96231b3b80d8
* remove attributions from tools.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45421 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the space in overview output for commands out of each of theDan Gohman2007-10-08
| | | | | | | commands and into the common code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42752 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead option.Reid Spencer2007-07-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40415 91177308-0d34-0410-b5e6-96231b3b80d8
* Here is the bulk of the sanitizing.Gabor Greif2007-07-05
| | | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37913 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pr1448Chris Lattner2007-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37658 91177308-0d34-0410-b5e6-96231b3b80d8
* switch tools to bitcode instead of bytecodeChris Lattner2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36868 91177308-0d34-0410-b5e6-96231b3b80d8
* add bitcode support.Chris Lattner2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36853 91177308-0d34-0410-b5e6-96231b3b80d8
* Augment the verbose output to print out the sub-commands executed.Reid Spencer2007-04-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36581 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1302:Reid Spencer2007-04-04
| | | | | | | | Rename LinkItems as NativeLinkItems since it is filled out by the Linker library to contain only those items deemed to be native. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35654 91177308-0d34-0410-b5e6-96231b3b80d8
* Add possibility to set memory limit for binaries run via libSystem. ThisAnton Korobeynikov2007-02-16
| | | | | | | is especially needed for bugpoint. This partly implements PR688 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34349 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up error handling.Reid Spencer2007-02-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34073 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1153:Reid Spencer2007-02-08
| | | | | | | Copy a couple more missing options from gccld to llvm-ld. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34061 91177308-0d34-0410-b5e6-96231b3b80d8
* default to emiting an uncompressed .bc fileChris Lattner2007-01-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33420 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-07
| | | | | | | now cerr, cout, and NullStream resp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
* make all llvm tools call llvm_shutdown when they exit, static'ify some stuff.Chris Lattner2006-12-06
| | | | | | | With this change, I can now move -stats to print when llvm_shutdown is called. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32250 91177308-0d34-0410-b5e6-96231b3b80d8