* 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
* Remove extra blank lines
* Delete space between function call and arg list
* Delete non-content comment lines ("//")
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8768 91177308-0d34-0410-b5e6-96231b3b80d8
2. I think the caller of LinkFiles() should not ignore a true return value.
(If you have a good reason why it ought to, feel free to revert
this. It's just something that's been bugging me for a while.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8760 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed space between function name and its argument list
* Removed space between '&' and variable name
* Removed empty comment lines: `//'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8750 91177308-0d34-0410-b5e6-96231b3b80d8
* Local header file goes at top
* Remove unneeded #includes
* Wrap code at 80 columns
* Declare variables where they are used
* 'register' is not needed
* Use 'unsigned' instead of 'int' variables where possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8657 91177308-0d34-0410-b5e6-96231b3b80d8
Renamed functions that were all lower-case.
Moved functions from util.cpp into linker.cpp or gccld.cpp.
Removed util.h and created gccld.h.
Refactored the linker functionality in linker.cpp so that it is easier to
follow, easier to modify, and it's library/object file search behavior is
easier to understand and document.
Added code to include library paths when doing native linking, but this
causes problems and is currently #ifdef'd out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8609 91177308-0d34-0410-b5e6-96231b3b80d8
Added code ignore bytecode link failures when generating native code.
Moved native code and bytecode generation out of the main() function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8595 91177308-0d34-0410-b5e6-96231b3b80d8
passed into main(). This may (or may not) be more portable, but it looks
nicer.
Added functions to copy the environment array and modify the copy, thus
preserving the environment.
Switched from using system() to using ExecWait().
The code now removes the assembly file generated when using the -native option.
Fixed the remove_env() function: The previous revision truncated the
environment variable list. This version just zaps the variable as intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8579 91177308-0d34-0410-b5e6-96231b3b80d8
With this option, gccld links the program into LLVM bytecode and a native code
binary. This allows llvmgcc to correctly tell GNU configure scripts when
things aren't defined properly (because the native link will fail).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8570 91177308-0d34-0410-b5e6-96231b3b80d8
script).
Removed the use of sys/types.h and sys/stat.h.
Modified FileExists() so that it uses the access() system call to check for
file existance. This requires less header files and might even be a tad bit
faster.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8328 91177308-0d34-0410-b5e6-96231b3b80d8
library code now adds all execute bits that are allowed by the umask value to
the file's current permission bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8325 91177308-0d34-0410-b5e6-96231b3b80d8
Added code to respect the umask value. Before, files were generated world
readable, which may not be desirable for all installations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8215 91177308-0d34-0410-b5e6-96231b3b80d8
Fix typo in header.
Add IsArchive static method.
Roll LoadLibraryFromDirectory() into LoadLibrary(), and factor
LoadLibraryExactName() out of the result. Instead of treating the current
directory specially, just insert it into LibPaths in the beginning of
main().
Make LoadLibrary() take a "search" flag that says whether to search for the
correct library, or just trust that LibName is right.
Make LinkLibrary() take a "search" flag, and pass it to LoadLibrary().
Change the for-loop over InputFilenames to detect ar archives and link them
in as libraries without searching.
Change the for-loop over Libraries to explicitly turn on the "search" flag
to LinkLibrary() that makes LoadLibrary() search for the correct library
(i.e., when processing -lNAME options.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6316 91177308-0d34-0410-b5e6-96231b3b80d8