Dan Gohman
9ced780576
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
Jeffrey Yasskin
29ea777c1e
Add a portable strerror*() wrapper, llvm::sys::StrError(). This includes the
...
Windows variant, strerror_s, but I couldn't test that.
I'll update configure and config.h.in in a subsequent patch.
llvm-svn: 74621
2009-07-01 18:11:20 +00:00
Chris Lattner
07463b0a0a
remove dead makefile flags.
...
llvm-svn: 74065
2009-06-24 05:29:56 +00:00
Rafael Espindola
904e6801af
Remove the gcc= option. llvm-gcc uses only as=
...
Look for as in the path. Doing it here instead
of llvm-gcc because llvm-gcc has nothing as
convenient as sys::Program::FindProgramByName.
llvm-svn: 73383
2009-06-15 10:14:18 +00:00
Nick Lewycky
acd23348af
Add option for specifying the path to assembler, "as". This overrides the path
...
to gcc.
llvm-svn: 73008
2009-06-07 00:50:45 +00:00
Duncan Sands
28cf31b990
Make sure the CXXFLAGS setting is picked up by
...
the common Makefile. Not sure why this suddenly
started causing problems.
llvm-svn: 71925
2009-05-16 04:00:00 +00:00
Nick Lewycky
503cfd4ace
Allow a user of libLTO to specify the full pathname of the gcc executable to
...
run when assembling.
Wire this up to the gold plugin. You can now pass --plugin-opt gcc=/foo/bar/gcc
and it will run that gcc instead of looking for it on the path.
llvm-svn: 70490
2009-04-30 15:24:09 +00:00
Rafael Espindola
b01a03d6d5
Add LTO_SYMBOL_DEFINITION_WEAKUNDEF, use that on the gold plugin.
...
llvm-svn: 69972
2009-04-24 16:55:21 +00:00
Nick Lewycky
2e90dfefff
Force 'llvm-config' to go first, optionally followed by lto and gold mixed in
...
with the rest of the parallel directories.
Build lto when possible on all platforms. Make gold to explicitly depend on
libLTO.
llvm-svn: 65518
2009-02-26 07:56:49 +00:00
Nick Lewycky
9dc59d9c7b
Add an option to the gold plugin to make it emit a file with the public api
...
list that can in turn be passed to -internalize pass through
-internalize-public-api-file.
Pass gold -plugin-opt=generate-api-file to produce "apifile.txt" in the current
directory.
llvm-svn: 65295
2009-02-22 22:15:44 +00:00
Rafael Espindola
86b3bf5add
really fix style
...
llvm-svn: 64923
2009-02-18 17:49:06 +00:00
Rafael Espindola
3435277172
fix style
...
llvm-svn: 64905
2009-02-18 08:30:15 +00:00
Rafael Espindola
c5a5171d1b
tools like nm and ar only need register_claim_file and add_symbols. Don't abort
...
if other hooks are missing.
llvm-svn: 64812
2009-02-17 21:08:21 +00:00
Nick Lewycky
6b1d3c472e
Shoot! Remove this debugging line again!
...
llvm-svn: 64617
2009-02-15 22:50:17 +00:00
Nick Lewycky
c3eb6707e6
Don't discard definitions of common symbols. Not sure if this is the right fix.
...
Before this change, the program:
int var;
int main(void) { return 0; }
when run under 'nm -g' would show 'U var' with the gold plugin and
'B var' with gcc.
llvm-svn: 64616
2009-02-15 22:49:17 +00:00
Nick Lewycky
11dca311a6
Free the buffer in the case where we don't create a module out of it, as
...
pointed out by Torok Edwin.
Remove trailing whitespaces.
llvm-svn: 64002
2009-02-07 03:15:01 +00:00
Nick Lewycky
0f8a4bbb7e
Free the buffer.
...
llvm-svn: 63907
2009-02-06 01:58:34 +00:00
Duncan Sands
134778fae1
Revert the previous commit. It seems it didn't
...
really solve the problem. Also it changed the
name from libLLVMgold to LLVMgold (correcting
the name resulted in the original problem
suddenly reappearing).
llvm-svn: 63861
2009-02-05 10:21:34 +00:00
Duncan Sands
9ae3dee83e
Stop llvm-config thinking that there are circular
...
dependencies between libraries due to __dso_handle
when doing "make install". I don't know what the
LINK_COMPONENTS stuff is about, so I left it alone.
llvm-svn: 63860
2009-02-05 09:54:02 +00:00
Nick Lewycky
7c25f31e98
It's not obvious, but lto_module_create_from_memory doesn't need to use the
...
buffer after it creates the Module. Thus, we don't need to store this pointer
in claimed_file.
llvm-svn: 63834
2009-02-05 05:36:01 +00:00
Nick Lewycky
43c102836a
Remove accidentally included debug message!
...
Reword a comment for clarity. Remove some extra whitespace.
llvm-svn: 63823
2009-02-05 04:14:23 +00:00
Torok Edwin
cd96136848
Alphabetize includes. Update comment.
...
llvm-svn: 63771
2009-02-04 21:00:02 +00:00
Torok Edwin
04de24510f
mention that PIC is needed for libLTO and libLLVMgold
...
llvm-svn: 63755
2009-02-04 19:12:25 +00:00
Torok Edwin
b3017f3e09
remove printf - it was there only for debugging!
...
llvm-svn: 63742
2009-02-04 17:40:28 +00:00
Torok Edwin
36cbde673b
add support for .a files containing LLVM IR to the gold plugin
...
llvm-svn: 63741
2009-02-04 17:39:30 +00:00
Nick Lewycky
23adb71f2a
Add LLVM plugin for gold.
...
llvm-svn: 63623
2009-02-03 07:13:24 +00:00