Commit Graph

39 Commits

Author SHA1 Message Date
Dan Gohman 61a8796ddb 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.

llvm-svn: 79990
2009-08-25 15:34:52 +00:00
Chris Lattner 06fa176862 prune the #includes in raw_ostream.h by moving a
member out of line. ftostr is not particularly speedy,
so that method is presumably not perf sensitive.

llvm-svn: 79885
2009-08-24 03:52:50 +00:00
Chris Lattner c521f54198 Prune #includes from llvm/Linker.h and llvm/System/Path.h,
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.

llvm-svn: 79869
2009-08-23 22:45:37 +00:00
Benjamin Kramer 47f6943a95 Proper MSVC build fix (and remove my hack again). Patch by Yonggang Luo.
llvm-svn: 79418
2009-08-19 12:38:51 +00:00
Benjamin Kramer 9d908589d3 Add a hack to unbreak MSVC builds. str(n)casecmp are POSIX functions and aren't available on windows (mingw defines them though).
llvm-svn: 79417
2009-08-19 12:16:17 +00:00
Daniel Dunbar 8575a60d33 Change bugpoint to use Triple to make runtime decisions.
- This is cleaner, and makes bugpoint match the host instead of the build
   architecture.

 - Patch by Sandeep Patel!

llvm-svn: 79309
2009-08-18 03:35:57 +00:00
Dan Gohman 198f5e84c6 Use (void *)(intptr_t) to cast function addresses to void*
for use with sys::Path::GetMainExecutable, to avoid warnings
with -pedantic.

llvm-svn: 78245
2009-08-05 21:03:39 +00:00
Dan Gohman 46ffffa750 Fix FindExecutable to use sys::Path::GetMainExecutable instead of
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.

llvm-svn: 78240
2009-08-05 20:21:17 +00:00
Anton Korobeynikov 0c3f8d5f53 Pass user only if it's non-empty. Patch by Sandeep.
llvm-svn: 78184
2009-08-05 09:32:53 +00:00
Anton Korobeynikov 7cbff91e62 Add save-temps option to bugpoint to keep temporary stuff.
Patch by Sandeep Patel

llvm-svn: 78183
2009-08-05 09:32:10 +00:00
David Goodwin 47ca461c82 For remote execution, must cd to the executable directory since the exe expects to find a dylib in the CWD ('.').
llvm-svn: 76432
2009-07-20 17:15:03 +00:00
Viktor Kutuzov 858702541d Require a remote command to exit with the exit status of the test program or with 255 if an error occurred.
llvm-svn: 76323
2009-07-18 18:39:24 +00:00
Dan Gohman 607818a2c1 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.

llvm-svn: 75801
2009-07-15 17:29:42 +00:00
Dan Gohman d8db376071 Use errs() instead of std::cerr.
llvm-svn: 75791
2009-07-15 16:35:29 +00:00
Evan Cheng d1c4705577 control reaches end of non-void function.
llvm-svn: 75714
2009-07-14 23:55:32 +00:00
Viktor Kutuzov 1518de130e Fix for bugpoint -remote-client
llvm-svn: 75665
2009-07-14 19:10:55 +00:00
Daniel Dunbar 9dc326fbaa Fix unused function warning.
llvm-svn: 75386
2009-07-11 21:24:52 +00:00
David Goodwin 73f4e3f442 Support remote execute for ARM.
llvm-svn: 75292
2009-07-10 21:39:28 +00:00
Evan Cheng 127df07e56 bugpoint for jit should just ignore GCC arguments.
llvm-svn: 70988
2009-05-05 18:35:36 +00:00
Evan Cheng 690b635aa6 Also pass -gcc-tool-args when building a shared object.
llvm-svn: 66746
2009-03-12 00:53:34 +00:00
Bill Wendling bf5d827194 Add a "-gcc-tool-args" option. This option acts like the "-tool-args" option,
but passes the arguments to the "gcc" invocation instead of to the "llc"
invocation.

llvm-svn: 65896
2009-03-02 23:13:18 +00:00
Dan Gohman af2037fbfd Rename bugpoint's error message file so that if it somehow
gets left behind, it's less cryptic.

llvm-svn: 64399
2009-02-12 20:53:27 +00:00
Evan Cheng 7aedcf151c Allow use of ssh to perform remote execution.
llvm-svn: 55979
2008-09-09 06:11:26 +00:00
Anton Korobeynikov c53565c479 Add possibility of using arbitrary to to execute stuff from bugpoint.
Patch by Pekka Jääskeläinen!

llvm-svn: 50373
2008-04-28 20:53:48 +00:00
Torok Edwin 538160b7ff -fPIC is required on x86-64 when building shared objects.
llvm-svn: 49274
2008-04-06 12:42:29 +00:00
Chris Lattner 345353d6b4 remove attributions from tools.
llvm-svn: 45421
2007-12-29 20:44:31 +00:00
Gabor Greif 0e535c3c8e Pretty straightforward replacement of "bytecode" by "bitcode"
performed on tools/ first, in order not to cause lethal damage

llvm-svn: 37877
2007-07-04 21:55:50 +00:00
Lauro Ramos Venancio f04823af30 Fix bugpoint to run -llc-safe with -Xlinker.
llvm-svn: 37483
2007-06-06 23:10:56 +00:00
Evan Cheng 779b52e4c4 Added -rsh-host and -rsh-user to support remote execution.
llvm-svn: 36685
2007-05-03 18:36:15 +00:00
Anton Korobeynikov d01defedf6 Add possibility to set memory limit for binaries run via libSystem. This
is especially needed for bugpoint. This partly implements PR688

llvm-svn: 34349
2007-02-16 19:11:07 +00:00
Evan Cheng a50e3919b1 A bit more debugging printf's.
llvm-svn: 32832
2007-01-03 07:44:30 +00:00
Chris Lattner ff8a6b86db comment out debug code
llvm-svn: 30401
2006-09-15 23:01:10 +00:00
Chris Lattner 634bc046ca Add a new -cbe-bug mode, which works just like -run-llc, except that it uses
LLC as the reference compiler to reduce testcases for bugs in GCC.

llvm-svn: 30400
2006-09-15 21:29:15 +00:00
Reid Spencer e4ca722199 For PR797:
Final removal of exceptions from lib/System and adjustment of users to
accommodate.

llvm-svn: 29846
2006-08-23 20:34:57 +00:00
Reid Spencer 944645af44 For PR797:
Adjust usage of the ExecuteAndWait function to use the last argument which
is the ErrMsg string. This is necessitated because this function no longer
throws exceptions on error.

llvm-svn: 29791
2006-08-21 06:04:45 +00:00
Reid Spencer c295914b7a For PR797:
Make sys::Program::ExecuteAndWait not throw exceptions and update any
affected code. It now return -9999 to signal that the program couldn't be
executed. Only one case (in bugpoint) actually examines the result code.

llvm-svn: 29785
2006-08-21 02:04:43 +00:00
Chris Lattner cc21fa7b41 Pass -Xlinker flags to gcc when it builds the shared object.
llvm-svn: 28939
2006-06-27 20:35:36 +00:00
Chris Lattner 572e78c2f9 After telling GCC to type of the input file with -x asm/-x c, switch back to
-x none, to not foul up autodetection of .a file or .dylibs.

llvm-svn: 28741
2006-06-09 21:31:53 +00:00
Chris Lattner ffac286737 Move ToolRunner.(cpp|h) into the bugpoint directory
llvm-svn: 28699
2006-06-06 22:30:59 +00:00