8171137: Avoid warning: -Xint is not compatible with AOT (switching AOT off)

Put all AOT warnings under PrintAOT flag.

Reviewed-by: iveresov, dholmes
This commit is contained in:
Vladimir Kozlov 2016-12-12 21:56:45 -08:00
parent 001c67f1fb
commit c2b261c9f5

View File

@ -125,14 +125,18 @@ void AOTLoader::initialize() {
if (UseAOT) {
// EagerInitialization is not compatible with AOT
if (EagerInitialization) {
warning("EagerInitialization is not compatible with AOT (switching AOT off)");
if (PrintAOT) {
warning("EagerInitialization is not compatible with AOT (switching AOT off)");
}
FLAG_SET_DEFAULT(UseAOT, false);
return;
}
// -Xint is not compatible with AOT
if (Arguments::is_interpreter_only()) {
warning("-Xint is not compatible with AOT (switching AOT off)");
if (PrintAOT) {
warning("-Xint is not compatible with AOT (switching AOT off)");
}
FLAG_SET_DEFAULT(UseAOT, false);
return;
}