Commit Graph

16 Commits

Author SHA1 Message Date
Nick Lewycky
195bea3498 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-30 15:24:09 +00:00
Rafael Espindola
7431af050f Add LTO_SYMBOL_DEFINITION_WEAKUNDEF, use that on the gold plugin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69972 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-24 16:55:21 +00:00
Nick Lewycky
ca4286295f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65295 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 22:15:44 +00:00
Rafael Espindola
6210a9493a really fix style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64923 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 17:49:06 +00:00
Rafael Espindola
98c507ed5c fix style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64905 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 08:30:15 +00:00
Rafael Espindola
f163a95705 tools like nm and ar only need register_claim_file and add_symbols. Don't abort
if other hooks are missing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64812 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 21:08:21 +00:00
Nick Lewycky
45eb7865c9 Shoot! Remove this debugging line again!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64617 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-15 22:50:17 +00:00
Nick Lewycky
e0afaa301d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64616 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-15 22:49:17 +00:00
Nick Lewycky
0df91b2c86 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64002 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 03:15:01 +00:00
Nick Lewycky
ea97aa6129 Free the buffer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63907 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 01:58:34 +00:00
Nick Lewycky
98245c7060 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 05:36:01 +00:00
Nick Lewycky
c1da8864a9 Remove accidentally included debug message!
Reword a comment for clarity. Remove some extra whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63823 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 04:14:23 +00:00
Torok Edwin
6cbbdfd2e9 Alphabetize includes. Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63771 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 21:00:02 +00:00
Torok Edwin
4cb16349b0 remove printf - it was there only for debugging!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63742 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 17:40:28 +00:00
Torok Edwin
3e5a0d8b0b add support for .a files containing LLVM IR to the gold plugin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63741 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 17:39:30 +00:00
Nick Lewycky
3e62b2dc93 Add LLVM plugin for gold.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63623 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 07:13:24 +00:00