diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-04-16 21:43:22 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-04-16 21:43:22 +0000 |
| commit | a9a988005b50c2445d4a687b202c0251ac4b4780 (patch) | |
| tree | d41b094b194479c02de60453cf04ee0916c7485c /llvm/tools/gccld/gccld.cpp | |
| parent | 1078b20bc0533550f3441e6f4e511764289660a0 (diff) | |
| download | bcm5719-llvm-a9a988005b50c2445d4a687b202c0251ac4b4780.tar.gz bcm5719-llvm-a9a988005b50c2445d4a687b202c0251ac4b4780.zip | |
Allow the user to disable the internalize pass
llvm-svn: 5792
Diffstat (limited to 'llvm/tools/gccld/gccld.cpp')
| -rw-r--r-- | llvm/tools/gccld/gccld.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/llvm/tools/gccld/gccld.cpp b/llvm/tools/gccld/gccld.cpp index 5d1a35f8a88..b8b35879386 100644 --- a/llvm/tools/gccld/gccld.cpp +++ b/llvm/tools/gccld/gccld.cpp @@ -52,6 +52,10 @@ Libraries("l", cl::desc("Specify libraries to link to"), cl::Prefix, static cl::opt<bool> Strip("s", cl::desc("Strip symbol info from executable")); +static cl::opt<bool> +NoInternalize("disable-internalize", + cl::desc("Do not mark all symbols as internal")); + // FileExists - Return true if the specified string is an openable file... static inline bool FileExists(const std::string &FN) { @@ -153,10 +157,13 @@ int main(int argc, char **argv) { // Passes.add(createFunctionResolvingPass()); - // Now that composite has been compiled, scan through the module, looking for - // a main function. If main is defined, mark all other functions internal. - // - Passes.add(createInternalizePass()); + if (!NoInternalize) { + // Now that composite has been compiled, scan through the module, looking + // for a main function. If main is defined, mark all other functions + // internal. + // + Passes.add(createInternalizePass()); + } // Now that we have optimized the program, discard unreachable functions... // |

