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 | dabaa46c66dd20a7f10ac8f7813f1c6d532e4195 (patch) | |
tree | 8e687f01d91b87ec887ca13f87a6601f4ba62f81 /tools/gccld/gccld.cpp | |
parent | 25219a76fe86ebc09104b0ed5404883fee00e0f0 (diff) |
Allow the user to disable the internalize pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5792 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccld/gccld.cpp')
-rw-r--r-- | tools/gccld/gccld.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/gccld/gccld.cpp b/tools/gccld/gccld.cpp index 5d1a35f8a8..b8b3587938 100644 --- a/tools/gccld/gccld.cpp +++ b/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... // |