mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Do not internalize a module if -link-as-library is passed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18825 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -212,9 +212,16 @@ int main(int argc, char **argv, char **envp) {
|
|||||||
// SIGINT signal.
|
// SIGINT signal.
|
||||||
sys::RemoveFileOnSignal(sys::Path(RealBytecodeOutput));
|
sys::RemoveFileOnSignal(sys::Path(RealBytecodeOutput));
|
||||||
|
|
||||||
// Generate the bytecode file.
|
// Strip everything if Strip is set, otherwise if stripdebug is set, just
|
||||||
|
// strip debug info.
|
||||||
int StripLevel = Strip ? 2 : (StripDebug ? 1 : 0);
|
int StripLevel = Strip ? 2 : (StripDebug ? 1 : 0);
|
||||||
if (GenerateBytecode(Composite.get(), StripLevel, !NoInternalize, &Out)) {
|
|
||||||
|
// Internalize the module if neither -disable-internalize nor
|
||||||
|
// -link-as-library are passed in.
|
||||||
|
bool ShouldInternalize = !NoInternalize & !LinkAsLibrary;
|
||||||
|
|
||||||
|
// Generate the bytecode file.
|
||||||
|
if (GenerateBytecode(Composite.get(), StripLevel, ShouldInternalize, &Out)){
|
||||||
Out.close();
|
Out.close();
|
||||||
return PrintAndReturn(argv[0], "error generating bytecode");
|
return PrintAndReturn(argv[0], "error generating bytecode");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user