Enable whole-module-optimizations for the stdlib and for tests.

This gives about 7% code size reduction in Swift.o



Swift SVN r22659
This commit is contained in:
Erik Eckstein
2014-10-10 09:54:53 +00:00
parent e59c4b6eb7
commit d6861570db
2 changed files with 3 additions and 9 deletions

View File

@@ -181,13 +181,7 @@ static bool performCompile(CompilerInstance &Instance,
SM = performSILGeneration(*PrimarySourceFile, None, opts.SILSerializeAll);
else
SM = performSILGeneration(Instance.getMainModule(), opts.SILSerializeAll,
// Only do whole-module compilation if these options are not set.
// This is to keep the test suite happy (many tests use internal
// functions).
// TODO: add a separate option to explicitly disable whole-
// module compilation (to be used in the testsuite).
Invocation.getLangOptions().EnableAccessControl &&
Invocation.getLangOptions().EnableObjCAttrRequiresFoundation);
true);
}
// We've been told to emit SIL after SILGen, so write it now.