Commit Graph

214 Commits

Author SHA1 Message Date
Chris Lattner
bf9add4745 The first argument to ExecuteAndWait should be the program name, but pointed
out by Markus F.X.J. Oberhumer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21211 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-10 20:59:38 +00:00
Reid Spencer
837149c08d Changes to enable creation of native executables directly from gccld and to
ensure that -L paths don't contain both bytecode and native libraries.
This patch contributed by Adam Treat.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20370 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-28 08:45:35 +00:00
Chris Lattner
ed5fa58a07 Make sure to null terminate argument lists!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20166 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 23:02:34 +00:00
Jeff Cohen
5fb6ed4ae6 Use binary mode for reading/writing bytecode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19751 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 17:36:17 +00:00
Reid Spencer
682084a157 Use explicit construction of sys::Path from std::string because the
constructor is "explicit".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19078 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-21 03:24:02 +00:00
Reid Spencer
f6358c75eb For PR351:
* Support changes in sys::Program::ExecuteAndWait interface


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19044 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 18:00:56 +00:00
Reid Spencer
b2d8c36018 sys::CopyString throws an exception on error which will be caught by gccld
main function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19029 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-18 06:53:10 +00:00
Reid Spencer
1bd2653c8f The CopyFile function got moved into the sys namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19026 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-18 00:19:32 +00:00
Reid Spencer
5f76760c88 For PR351:
* removeFile() -> sys::Path::destroyFile()
* remove extraneous toString() calls
* convert local variables representing path names from std::string to
  sys::Path
* Use sys::Path objects with FileRemove instead of std::string
* Use sys::Path methods for construction of path names


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19001 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 23:04:20 +00:00
Reid Spencer
6da1e0d50f For PR351:
* Change ExecWait calls to sys::Program::ExecuteAndWait
* Convert to use sys::Path where it makes sense


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18929 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 04:20:08 +00:00
Reid Spencer
93f8f55e19 For PR351:
Adjust to interface change for FindExecutable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18920 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 23:44:23 +00:00
Reid Spencer
319cdeccd1 For PR351:
Replace MakeFileReadable and MakeFileExecutable (from FileUtilities) with
sys::Path::makeReadable and sys::Path:makeExecutable, respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18909 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 20:03:02 +00:00
Reid Spencer
05f7e7991b Make the loop termination condition clear when building the set of items to
pass to the Linker::LinkInItems function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18894 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 17:18:19 +00:00
Reid Spencer
c406413471 Convert to use new Linker class interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18864 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:01:14 +00:00
Chris Lattner
bcfe1e2d64 Do not internalize a module if -link-as-library is passed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18825 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 07:53:51 +00:00
Chris Lattner
c59e09ec54 This pass is no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18782 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 22:30:32 +00:00
Chris Lattner
b4a400af2e Turn on ipsccp by default instead of simple IPCP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18753 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 08:03:43 +00:00
Reid Spencer
6b463b261e When -link-as-library, add -l options to Module's deplibs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18617 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-08 05:17:40 +00:00
Reid Spencer
c191d497d5 Fix PR139:\
When not linking as a library, use LinkItems to retain command line order of \
linking, otherwise use LinkFiles


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18549 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-05 19:15:29 +00:00
Chris Lattner
3f14fb1a0b Recognize --strip-all as a synonym for -s.
Add -S and --strip-debug option support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18441 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-02 21:26:10 +00:00
Reid Spencer
bf714df962 Add LLVMbzip2 library, now required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18255 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 20:22:06 +00:00
Chris Lattner
86f42db22b -disable-opt is not -O0, it's okay for it to disable internalize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17911 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-17 16:41:19 +00:00
Chris Lattner
429a9cbc2e Even with -disable-opt we should still internalize and strip if requested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17903 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 18:59:20 +00:00
Reid Spencer
605b9e2c5b Linker.h has a new home.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17801 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 23:00:08 +00:00
Reid Spencer
c7ebfdd2cc This tool needs the libLLVMArchive library now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17789 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:19:21 +00:00
Reid Spencer
6903c86348 Remove linking declarations (in Linker.h now)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17788 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:17:49 +00:00
Reid Spencer
4c1af902ad Provide exception handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17787 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:17:03 +00:00
Reid Spencer
5e081fb74a Moved to lib/Linker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17786 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:15:31 +00:00
Misha Brukman
669b524399 Output the program name (in this case, gccld) with warning about invalid files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17638 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 04:24:59 +00:00
Misha Brukman
eda20f933b Don't silently ignore invalid files: tell the user!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17633 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-08 22:03:10 +00:00
Reid Spencer
6cb21d443e Change Library Names Not To Conflict With Others When Installed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17286 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 23:18:45 +00:00
Reid Spencer
40a955ab05 We're not doing automake any more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17168 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-22 21:02:23 +00:00
Reid Spencer
cac731ecbe We won't use automake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17155 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-22 03:35:04 +00:00
Reid Spencer
86d341b204 Initial automake generated Makefile template
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17136 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 23:55:41 +00:00
Reid Spencer
d96cb6eaa0 Update to reflect changes in Makefile rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16950 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 11:46:52 +00:00
Chris Lattner
e3ef9b5fe2 Don't miss global optimizations because we run before the inliner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16913 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-11 04:47:18 +00:00
Reid Spencer
90a2adc866 Initial version of automake Makefile.am file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16894 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 22:36:40 +00:00
Chris Lattner
93a00e4ceb Rename pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16801 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-07 04:12:02 +00:00
Reid Spencer
551ccae044 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Reid Spencer
7c4c98d986 Add the LLVMsystem.a library as it is now used for operating system
independence of the tool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16092 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-29 19:29:38 +00:00
Reid Spencer
9de7b334ec The functions in Signal.h are now in the llvm::sys namespace - adjust
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16091 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-29 19:28:55 +00:00
Chris Lattner
93127fbc4a This pass has proven its metal, remove -disable option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15411 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-02 10:10:08 +00:00
Chris Lattner
2d26ffb679 Run DSE at link-time, and turn on an IP alias analysis by default in gccld!
The -disable-globalsmodref is temporary and will be removed eventually.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15268 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 08:13:15 +00:00
Misha Brukman
008248f2c0 Linker.h moved to include/llvm/Support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14351 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-23 17:33:09 +00:00
Chris Lattner
681692da43 Make gccld copy the llvm-stub program to be the execution wrapper for
bytecode files on win32 systems.  We keep the shell script on unix systems
because it is much more transparent for the users and supports -load
options.

This allows llvmgcc work correctly on win32 systems without the -native or
-native-cbe options.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13946 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 00:53:57 +00:00
Chris Lattner
0ebee7410f Move some functions out of gccld.cpp to GenerateCode.cpp. This allows us
to reduce the inter-file interface in the gccld tool and gets some
uninteresting code out of gccld.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13942 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 00:22:24 +00:00
Chris Lattner
7e88d418bb Refactor a bit of code into a function, no functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13941 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 00:10:19 +00:00
Chris Lattner
bed85ff010 Header file moved
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13813 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 05:41:36 +00:00
Brian Gaeke
7532e34537 Allow the user to set the LLVMINTERP environment variable as a workaround, for
when they have to run a gccld shell script without having lli in their path.
This is intended to address Bug 289.

Also, emit the traditional syntax ${1+"$@"} for passing all of a shell script's
args to a subprocess. If you have arguments that have spaces in them, $* will
not preserve the quoting (i.e., the quoted string "foo bar" as an argument will
end up as two arguments "foo" "bar" to lli.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13414 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-07 21:47:36 +00:00
Misha Brukman
7a46e4c62b Don't use invalid HTML in a doxygen comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12962 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-15 15:23:45 +00:00
Chris Lattner
f9c455d3df Add a couple more IPO's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12863 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-12 05:38:15 +00:00
Chris Lattner
a1346a2619 Disable strict alias analysis in the backend c compiler, as the code we
generate is not TBAA safe.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12774 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-08 15:18:59 +00:00
Chris Lattner
67e0a34178 Revert previous patch, I'm a moron :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12773 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-08 15:18:03 +00:00
Chris Lattner
121f09fb05 Right, we break strict aliasing requirements. Make sure to disable strict
aliasing in the C compiler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12772 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-08 15:14:43 +00:00
Chris Lattner
27a9b2713b Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12700 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-06 16:54:04 +00:00
Chris Lattner
69e8d282bf Add a new gccld -native-cbe option which causes gccld to generate native code
for the application with the C backend instead of the native LLVM code generator


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12698 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-06 16:43:13 +00:00
Chris Lattner
f8338c4375 Run the new pass in gccld now that it passes all tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12196 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-07 22:12:40 +00:00
Chris Lattner
f74a401f61 We have this snazzy link-time optimizer. How about we start using it? This
removes some cruft from 255.vortex, cleaning up after DAE and IPCP, which
do horrible, beautiful, things to vortex.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11861 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 03:34:30 +00:00
Chris Lattner
dd429c6de9 Add a new pass, run internalize first
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11839 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 21:35:13 +00:00
Alkis Evlogimenos
c38aa6dd79 Include Config/config.h for SHLIBEXT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11779 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-23 22:42:51 +00:00
Chris Lattner
364d1203e7 Make sure to print a stack trace whenever an error signal is delivered to
the tool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11633 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 20:32:39 +00:00
John Criswell
6f5592ae2c Fixed PR#197. The libcrtend library is removed from the library linking list
when creating native executables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10979 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-26 23:51:10 +00:00
John Criswell
7f7d16b62f Fixes for PR214. Use the SHLIBEXT variable instead of hardcoding .so into
every file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10976 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-26 20:59:41 +00:00
Chris Lattner
0cccb18c98 Make sure to verify the result before writing out the bytecode file. Not doing
so can cause obscure errors downstream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10840 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14 03:39:46 +00:00
John Criswell
368751f2b7 Modified the logic so that library objects with main() are only linked in
if the program currently has main undefined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10597 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-23 20:27:14 +00:00
John Criswell
1715ce00e4 Modified the linker so that it always links in an object from an archive
that defines the symbol "main."  This is a hack that ensures that programs
that place their main function in a library and then link it in
(i.e. Apache 2.x) get their main function linked in.

There is probably a more correct way to do this, but this works for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10594 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-23 17:37:06 +00:00
John Criswell
aa2a47d813 Added the -h option for compatibility with other linkers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10335 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-09 15:39:11 +00:00
Chris Lattner
9e6f686559 Fix compatibility with gcc 3.4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10262 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 19:45:47 +00:00
Chris Lattner
548e813fa7 The function resolving pass must be run, even if -disable-opt is specified
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10250 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-28 09:44:03 +00:00
Chris Lattner
6cc8ca9229 * The return value of LinkLibraries is ignored, so remove it.
* Finegrainify namespacification of Linker.cpp
* If linking a library in fails, do not STOP LINKING IN LIBRARIES AND
  CONTINUE ANYWAY!  Instead, just output the warning, and keep going. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10249 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-28 07:44:09 +00:00
Misha Brukman
0d2459a49f I'm gonna be picky and say we don't really need that trailing slash "lib/"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10196 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-24 05:31:57 +00:00
Misha Brukman
3e15c7a976 Make sure we ONLY add a `-load' switch to the JIT command line if the file is
verified as having an ELF header. This fixes PR151.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10195 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-24 05:29:42 +00:00
Misha Brukman
3e25f2e1be When writing out the runner script, add -load=<lib> lines to pull in all the
shared objects automagically, so it doesn't have to be done by hand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10114 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 19:08:42 +00:00
Misha Brukman
84fbc653ce Add ability to search only for native shared object, and expose the
functionality to the rest of gccld.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10113 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 19:08:06 +00:00
Misha Brukman
438e364692 For consistency, removed space between function name and left paren in function
call, i.e. [ addPass (...) ]  =>  [ addPass(...) ]


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10105 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 06:26:15 +00:00
Misha Brukman
9839969110 * Doxygenified comments, simplifying them and shortening in the process
* Eliminated extra space


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10104 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 06:21:54 +00:00
Brian Gaeke
1ab90d4e38 Add a -verify option to verify the results of gccld passes.
Add a -disable-opt option to turn off gccld optimization passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10040 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 23:07:28 +00:00
Brian Gaeke
2282ae1ebd When we find a module we want, in an archive, in verbose mode,
print out the module's identifier (which should now contain the name
 of both the archive and the module.)
Wrap some lines at 80 cols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10039 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 23:07:13 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Brian Gaeke
0d723acf15 Move IsArchive, IsBytecode to FileUtilities. Fix up some method comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9902 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 21:54:01 +00:00
Brian Gaeke
ee8adb1955 This version of Linker.cpp works a lot better, but it's a little messy. Sorry.
Use FileOpenable() instead of FileExists().
Create IsBytecode() predicate -- like IsArchive(), but for bytecode files.
Use IsBytecode() before trying to load any file as a bytecode file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9893 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 18:27:37 +00:00
Chris Lattner
cc650b615d Give gccld more guts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9835 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 19:55:09 +00:00
Brian Gaeke
aee4de9957 Give this header file an Emacs mode-line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9749 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 22:13:10 +00:00
Brian Gaeke
00cc86a8fc Do not assume the first file is a bytecode file. Instead, construct a dummy
Module and link things into that.

Also, fix a typo in an error message.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9748 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 22:13:00 +00:00
Brian Gaeke
3b3640a373 Shorten and correct some function-header comments.
Make "verbose" output MUCH nicer. Now it tells you when you are linking a
bytecode file, or an archive, and whether it's because you called it by name,
or because you gave it a -l option, and it says "Trying" before it takes
action and prints a message in the past tense afterwards.

Make LinkFiles not skip the first file in Files.

Make LinkFiles warn you if it can't find a file and LLVM_LIB_SEARCH_PATH is
unset.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9747 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 22:12:52 +00:00
Chris Lattner
fe32bf5d0d Make -r work, fixing PR 91
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9724 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 06:05:21 +00:00
Chris Lattner
fd35c6417d If linking a library, do not link other libraries, like libc, into it!
This fixes lots of annoying warnings and error messages


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9677 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 17:27:17 +00:00
Brian Gaeke
7c7a3a2d7f lli -q is history. Rebuild your gccld shell scripts, folks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9494 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-24 20:00:06 +00:00
Chris Lattner
246ce3c2d5 Turn on the inliner by default at link-time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9477 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-24 18:09:23 +00:00
Chris Lattner
eaa35bb794 Turn on the IPCP pass by default. It has passed all of the tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9435 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 18:25:57 +00:00
Brian Gaeke
f1fce0881f Fix off-by-one error in processing of libraries named on command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9351 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-21 21:07:12 +00:00
John Criswell
e2fab734ad Added LLVM copyright to Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9314 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 22:29:16 +00:00
Chris Lattner
1dd27b157b fix file header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9294 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 17:58:43 +00:00
John Criswell
7c0e022c5c Added copyright header to all C++ source files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9291 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 17:47:21 +00:00
Brian Gaeke
82a036fd19 Don't include "Config/stdlib.h".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9037 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 19:12:22 +00:00
Misha Brukman
cf00c4ab3b Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9027 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:57:28 +00:00
Brian Gaeke
608e75c604 Make more error messages have gccld's name in them.
Add a newline after "Cannot find <library>".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8968 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-08 19:09:30 +00:00
Misha Brukman
5208ba1292 Doxygen-ified comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8778 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:09:32 +00:00
Misha Brukman
e97fbed83a * Ordered includes according to LLVM style
* Put function signatures on one line if possible
* Deleted empty comment lines (^//$)
* Deleted braces around single statements
* Deleted space between function call and argument list


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8775 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 17:59:25 +00:00
Misha Brukman
61087cc023 Made code more terse:
* Deleted empty comment lines
* No single begin-braces '{' on a line by themselves


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8773 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 17:51:20 +00:00