Commit Graph

1214 Commits

Author SHA1 Message Date
Brian Gaeke fe4e48e14b Use Config/alloca.h instead of alloca.h - pointed out by Duraid and Misha
llvm-svn: 19059
2004-12-20 04:02:01 +00:00
Brian Gaeke cb1b1e74eb Make this compile on Solaris.
llvm-svn: 19047
2004-12-19 21:08:07 +00:00
Reid Spencer 766ad0b77f For PR351:
* Support changes in sys::Program::ExecuteAndWait interface

llvm-svn: 19044
2004-12-19 18:00:56 +00:00
Reid Spencer 5ababc6f33 sys::CopyFile returns void and throws an exception on error which will be
caught by llvm-ld's main function.

llvm-svn: 19030
2004-12-18 06:54:21 +00:00
Reid Spencer 8b086e3871 sys::CopyString throws an exception on error which will be caught by gccld
main function.

llvm-svn: 19029
2004-12-18 06:53:10 +00:00
Reid Spencer 16ce83c3a6 The CopyFile function got moved into the sys namespace.
llvm-svn: 19026
2004-12-18 00:19:32 +00:00
Reid Spencer 1abfe0d655 Reverse the logic for Win32 to ensure that bugpoint and llvm-db are NOT
built on this platform.

llvm-svn: 19015
2004-12-17 08:00:40 +00:00
Reid Spencer 120aa08e1c Fix this file to actually work. ifneq was incorrectly used. Subtract out
llvm-db and bugpoint for Win32 rather than add them in
subtr

llvm-svn: 19014
2004-12-17 07:59:53 +00:00
Reid Spencer 19dd542a31 Makefile.JIT doesn't exist any more so it doesn't need to be distributed.
llvm-svn: 19009
2004-12-17 02:06:36 +00:00
Reid Spencer 0306c68c1f Disable bugpoint and llvm-db tools for Win32. They can't be supported on
that platform without a lot of work because they depend on process image
copy behavior of fork(2).

llvm-svn: 19008
2004-12-17 01:46:41 +00:00
Tanya Lattner c3a7bd7d0c Linking in all of ScalarOpts.
llvm-svn: 19002
2004-12-16 23:07:13 +00:00
Reid Spencer 584cb0a8c1 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

llvm-svn: 19001
2004-12-16 23:04:20 +00:00
Chris Lattner eb5a2cf32b No targets actually use this library
llvm-svn: 18995
2004-12-16 19:39:45 +00:00
Reid Spencer 8240a916db Unbreak all archive reading operations introduced by the last patch which
always exited the program with exit code 1 in these cases, regardless of
whether an error occurred or not.

llvm-svn: 18966
2004-12-15 21:58:03 +00:00
Chris Lattner 160a8a9725 Do not fail an assertion on a broken archive
llvm-svn: 18959
2004-12-15 07:44:15 +00:00
Reid Spencer 86960adfa3 Change LLVMGCCDIR/bytecode-libs -> LLVMGCCDIR/lib
llvm-svn: 18951
2004-12-15 01:54:37 +00:00
Reid Spencer d8c5b71bd4 For PR351:
Remove #inclusion of Support/FileUtilities.h which isn't needed any more.

llvm-svn: 18950
2004-12-15 01:53:50 +00:00
Reid Spencer 30067f1eac For PR351:
* Convert use of getUniqueFilename to sys::Path::makeUnique();

llvm-svn: 18949
2004-12-15 01:53:08 +00:00
Reid Spencer eedafda7bb For PR351:
* Change ExecWait calls to sys::Program::ExecuteAndWait
* Convert to use sys::Path where it makes sense

llvm-svn: 18929
2004-12-14 04:20:08 +00:00
Reid Spencer 79dc8b79bb For PR351:
Adjust to interface change for FindExecutable.

llvm-svn: 18920
2004-12-13 23:44:23 +00:00
Reid Spencer b7c56070ca For PR351:
llee was a nice hack, but it wasn't portable so its gone, with Misha's
approval.  Operating systems have facilities available for making bytecode
directly executable without this utility.

llvm-svn: 18916
2004-12-13 23:15:32 +00:00
Misha Brukman 318a44d867 Minor cleanups
llvm-svn: 18914
2004-12-13 21:42:16 +00:00
Reid Spencer 249eb144d9 For PR351:
Replace MakeFileReadable and MakeFileExecutable (from FileUtilities) with
sys::Path::makeReadable and sys::Path:makeExecutable, respectively.

llvm-svn: 18909
2004-12-13 20:03:02 +00:00
Reid Spencer 0afe178f21 Make the loop termination condition clear when building the set of items to
pass to the Linker::LinkInItems function.

llvm-svn: 18894
2004-12-13 17:18:19 +00:00
Reid Spencer aa95684acd For PR351: \
The getFileTimestamp and getFileSize functions have been removed from  \
FileUtilities.{h,cpp}. They are replaced by Path::getTimestamp and  \
Path::getSize,respectively.

llvm-svn: 18892
2004-12-13 17:01:53 +00:00
Reid Spencer ff17d0439d Make use of the new Path inserter function.
llvm-svn: 18887
2004-12-13 08:53:36 +00:00
Reid Spencer 17e7444a61 PR351: \
Use sys::Path not FileUtilities to check file types

llvm-svn: 18865
2004-12-13 03:01:26 +00:00
Reid Spencer 8d206908d8 Convert to use new Linker class interface
llvm-svn: 18864
2004-12-13 03:01:14 +00:00
Reid Spencer 0ebb926c0a LinkModules is now in the Linker class
llvm-svn: 18863
2004-12-13 03:01:03 +00:00
Chris Lattner b92fd6006c Do not internalize a module if -link-as-library is passed.
llvm-svn: 18825
2004-12-12 07:53:51 +00:00
Reid Spencer d58e09a275 Revert the last patch. We really do need SimplyCFG.
llvm-svn: 18787
2004-12-11 03:03:54 +00:00
Reid Spencer 5ccfd5a48b Path::get -> Path::toString
llvm-svn: 18785
2004-12-11 00:14:15 +00:00
Reid Spencer eef4420578 Remove this pass as its no longer needed.
llvm-svn: 18783
2004-12-10 22:55:35 +00:00
Chris Lattner dea2bde08f This pass is no longer needed.
llvm-svn: 18782
2004-12-10 22:30:32 +00:00
Reid Spencer 2da81ceb3d Get rid of warning from flex.
llvm-svn: 18779
2004-12-10 21:59:47 +00:00
Chris Lattner 4a03a2d433 Turn on ipsccp by default instead of simple IPCP
llvm-svn: 18753
2004-12-10 08:03:43 +00:00
Brian Gaeke af10b76b6c Link V8 backend into llc.
llvm-svn: 18739
2004-12-10 05:04:13 +00:00
Reid Spencer 359df30f3d When -link-as-library, add -l options to Module's deplibs
llvm-svn: 18617
2004-12-08 05:17:40 +00:00
Reid Spencer ef96665753 Fix PR139:\
When not linking as a library, use LinkItems to retain command line order of \
linking, otherwise use LinkFiles

llvm-svn: 18549
2004-12-05 19:15:29 +00:00
Chris Lattner 0558e23872 Add -strip-debug option
remove the temporary -disable-dse option

llvm-svn: 18451
2004-12-03 05:45:58 +00:00
Chris Lattner 99a7c3d26f Adjust to change in pass name
llvm-svn: 18442
2004-12-02 21:27:35 +00:00
Chris Lattner 4913b65616 Recognize --strip-all as a synonym for -s.
Add -S and --strip-debug option support.

llvm-svn: 18441
2004-12-02 21:26:10 +00:00
Reid Spencer 295a3bbb18 Implement file replacement correctly even with the f (TruncateNames) flag
set. The member name comparison was failing for truncated names. This patch
fixes that. Truncated names are now properly replaced.

llvm-svn: 18423
2004-12-02 09:21:55 +00:00
Reid Spencer 5686dc714d No longer necessary, moved Makefile.rules
llvm-svn: 18337
2004-11-29 07:17:31 +00:00
Reid Spencer bb9932c96a Use LLVMLIBS=JIT to get JIT libraries
llvm-svn: 18333
2004-11-29 07:17:18 +00:00
Reid Spencer 3ec3fc9870 Make sure the program's symbols can be dlsym'd as well.
llvm-svn: 18331
2004-11-29 06:23:19 +00:00
Reid Spencer da2a9e6b0c Make the check a little quieter.
llvm-svn: 18325
2004-11-29 04:51:58 +00:00
Reid Spencer d3f2e95e6c Add LLVMbzip2 library, now required.
llvm-svn: 18255
2004-11-25 20:22:06 +00:00
Reid Spencer cf5ca279ec Always pass -D_GNU_SOURCE to cc1plus
llvm-svn: 18253
2004-11-25 19:38:51 +00:00
Reid Spencer d7390bbd27 Always pass -D_GNU_SOURCE to cc1
llvm-svn: 18252
2004-11-25 19:38:39 +00:00
Reid Spencer 953e80db76 Correct the configuration variable used to find the bin directory.
llvm-svn: 18244
2004-11-25 09:36:28 +00:00
Reid Spencer 67386ceacc Make sure additional C++ suffixes are recognized by llvmc.
llvm-svn: 18191
2004-11-24 00:01:57 +00:00
Reid Spencer cfa51ff82b * Adjust the options to make them either accept multiple occurrences or be
optional so that compatibility with GCC is accomplished.
* Implement the -print-file-name option in an attempt to provide the same
  functionality as GCC. Unfortunately, without loading the cpp or c config
  files, this option won't help much.

llvm-svn: 18189
2004-11-23 23:47:58 +00:00
Reid Spencer cd893a9c50 * Don't pass empty arguments to ExecuteAndWait because it can cause the
sub-tool to start reading its standard input instead of the specified
  input.
* Clean up ouput of path names on error.
* Extend GetPathForLinkageItem to always search the LibraryPaths and thus
  make it suitable for an interface function (required by llvmc.cpp).
* Implement support for language-specific default library paths.

llvm-svn: 18188
2004-11-23 23:45:49 +00:00
Reid Spencer 5e1e6b9f82 Configuration data now supports a vector of library paths.
Add the GetPathForLinkageItem method to the interface so full paths can
be generated for a given linkage item.

llvm-svn: 18187
2004-11-23 23:40:06 +00:00
Reid Spencer fe6dd9da55 Add the c and cpp configuration files.
llvm-svn: 18186
2004-11-23 23:38:46 +00:00
Reid Spencer e1ae9d7c00 Removed in favor of configurable (*.in) versions.
llvm-svn: 18185
2004-11-23 23:38:07 +00:00
Reid Spencer d51dfe3946 Make various adjustments to parsing so that the separator character doesn't
terminate options or paths, so that SPACE tokens legally separate options
on a command line, and so that the lang.libs paths are parsed properly.

llvm-svn: 18184
2004-11-23 23:37:26 +00:00
Reid Spencer 513587fbe6 SPACE is a legitimate token now, to separate option words.
llvm-svn: 18183
2004-11-23 23:35:50 +00:00
Reid Spencer 6a0d9b99df Handle space, separators, bad substitutions, and library search path better
than before.

llvm-svn: 18182
2004-11-23 23:35:16 +00:00
Reid Spencer c14e53efb8 Configurable language configuration files.
llvm-svn: 18181
2004-11-23 23:33:08 +00:00
Reid Spencer 66c2d807a3 Get the -o option right
llvm-svn: 18052
2004-11-20 20:45:33 +00:00
Reid Spencer 835060938c Get the -o option right
llvm-svn: 18051
2004-11-20 20:39:33 +00:00
Reid Spencer 27962c7997 Not needed any more.
llvm-svn: 18050
2004-11-20 20:27:20 +00:00
Reid Spencer 72f75bc3b7 Content moved to llvm-ld.cpp
llvm-svn: 18049
2004-11-20 20:15:08 +00:00
Reid Spencer 0c66f97ae6 Incorporate GenerateCode.cpp. Make static things static.
llvm-svn: 18048
2004-11-20 20:02:56 +00:00
Reid Spencer dac73aa00a First cut at implementing generic link-time Optimization
llvm-svn: 18047
2004-11-20 19:43:28 +00:00
Reid Spencer 0e8c76ed90 The Archive class now has differentiation for BSD4.4 and SVR4 style archive
symbol tables. Adjust our usage to compensate.

llvm-svn: 18046
2004-11-20 18:01:22 +00:00
Chris Lattner e404d724ea Fix a bug that caused stuff like this:
main at ./eh.cpp:1414 ->          printf("a\n");

to be printed, instead of this:

main at ./eh.cpp:14
14 ->          printf("a\n");

llvm-svn: 18005
2004-11-19 19:45:44 +00:00
Chris Lattner dad1823703 Fix a bug in the checkin where I adjusted this code to work when
LinkModules nukes the second module argument.

llvm-svn: 17986
2004-11-19 07:09:40 +00:00
Chris Lattner 7fd27e2c35 Remove debugging code, unneuter this functionality
llvm-svn: 17963
2004-11-18 19:42:50 +00:00
Chris Lattner 8cb483b335 remove debugging code
llvm-svn: 17962
2004-11-18 19:40:13 +00:00
Tanya Lattner 21590db8fd Adding option to llc for ModuloScheduling. By default it is turned off.
llvm-svn: 17959
2004-11-18 18:38:01 +00:00
Chris Lattner 7a3767521d -disable-opt is not -O0, it's okay for it to disable internalize.
llvm-svn: 17911
2004-11-17 16:41:19 +00:00
Chris Lattner 05fe0244e1 Even with -disable-opt we should still internalize and strip if requested.
llvm-svn: 17903
2004-11-16 18:59:20 +00:00
Reid Spencer 66dc515ed6 Per code review: \
* Make static things static \
* Get rid of unused TmpArchive variable \
* Implement symbol table printing \
* Adjust to changes in llvm::Archive interface \
* Make sure we destruct objects even if exceptions occur. \
* Fix a typo in an output string.

llvm-svn: 17878
2004-11-16 06:41:20 +00:00
Reid Spencer 9fc38b1712 Per code review: \
* hide the compatibility option \
* Make static things static \
* Use cl::extrahelp instead of cl::MoreHelp (defunct) \
* Use cl::PrintHelpMessage instead of our own printUse function \
* Use a std::set<sys::Path> for the path list because its now required by \
  the sys::Path class and also ensues directories are traversed in sorted \
  order.\
* Implement symbol table printing locally instead of in libLLVMArchive \
* Adjust to changes in llvm::Archive interface \
* Make sure we destruct objects even if exceptions occur. \
* Fix a typo in an output string.

llvm-svn: 17877
2004-11-16 06:41:09 +00:00
Chris Lattner d308797cae Make this code not depend on LinkModules leaving the second argument unmolested.
llvm-svn: 17874
2004-11-16 06:31:38 +00:00
Tanya Lattner 8213dae317 This file was originally developed by the LLVM research group so this comment should stay. I also do NOT want my name explicity listed on src files. I am already mentioned in the credits.
llvm-svn: 17833
2004-11-15 19:21:49 +00:00
Reid Spencer 4cee8e3365 Linker.h moved to include/llvm.
llvm-svn: 17805
2004-11-14 23:25:32 +00:00
Reid Spencer aede779b1c bugpoint needs LLVMLinker.a now.
llvm-svn: 17804
2004-11-14 23:23:18 +00:00
Reid Spencer b3eaba688d Correct call of methods whose names have changed.
llvm-svn: 17803
2004-11-14 23:17:41 +00:00
Reid Spencer 36c3a58557 This program needs libLLVMLinker.a now
llvm-svn: 17802
2004-11-14 23:12:22 +00:00
Reid Spencer 16c3bb3198 Linker.h has a new home.
llvm-svn: 17801
2004-11-14 23:00:08 +00:00
Reid Spencer b2d0fa0823 Fix usage of changed function prototype
llvm-svn: 17798
2004-11-14 22:30:54 +00:00
Reid Spencer 34fae46c87 A tool for adding a symbol table to LLVM Archives
llvm-svn: 17797
2004-11-14 22:29:21 +00:00
Reid Spencer 30227fde87 Makefile for llvm-ranlib tool
llvm-svn: 17796
2004-11-14 22:28:33 +00:00
Reid Spencer 54a20f2009 *Fix usage of changed function prototype*Use Archive interface to symbol table for archives
llvm-svn: 17795
2004-11-14 22:27:46 +00:00
Reid Spencer c762abe046 This tool needs libLLVMArchive now
llvm-svn: 17794
2004-11-14 22:27:00 +00:00
Reid Spencer 0cb8c8c2af Remove linking declarations (in Linker.h now)
llvm-svn: 17793
2004-11-14 22:25:26 +00:00
Reid Spencer e7814f62b9 We need the libLLVMArchive library now
llvm-svn: 17792
2004-11-14 22:23:31 +00:00
Reid Spencer 8d3f9038c1 Moved to lib/Linker (common with gccld)
llvm-svn: 17791
2004-11-14 22:22:45 +00:00
Reid Spencer 84a12bfbd0 Total rewrite using Archive library & new functionality
llvm-svn: 17790
2004-11-14 22:20:07 +00:00
Reid Spencer 23dcddf47f This tool needs the libLLVMArchive library now.
llvm-svn: 17789
2004-11-14 22:19:21 +00:00
Reid Spencer 5f7d9675d4 Remove linking declarations (in Linker.h now)
llvm-svn: 17788
2004-11-14 22:17:49 +00:00
Reid Spencer 5ccfd9aea1 Provide exception handling
llvm-svn: 17787
2004-11-14 22:17:03 +00:00
Reid Spencer 3afabd441b Moved to lib/Linker
llvm-svn: 17786
2004-11-14 22:15:31 +00:00
Reid Spencer 22f42243cc Add the llvm-ranlib tool
llvm-svn: 17785
2004-11-14 22:13:59 +00:00
Reid Spencer abbefecf8e Make sure llee can deal with compressed bytecode too.
llvm-svn: 17652
2004-11-09 20:21:25 +00:00
Misha Brukman 8d5c13c3e3 Output the program name (in this case, gccld) with warning about invalid files
llvm-svn: 17638
2004-11-09 04:24:59 +00:00