mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-11 02:48:20 +00:00
8172054: Aot tests should include Java assertions into AOT compiled code
Reviewed-by: iveresov
This commit is contained in:
parent
1e918ed98c
commit
b58bb4740e
@ -710,7 +710,7 @@ bool AOTCodeHeap::load_klass_data(instanceKlassHandle kh, Thread* thread) {
|
||||
}
|
||||
|
||||
if (_lib->config()->_omitAssertions && JavaAssertions::enabled(kh->name()->as_C_string(), kh->class_loader() == NULL)) {
|
||||
// Assertions are omitted in the compiled code, but are enabled right now. Bail out.
|
||||
log_trace(aot, class, load)("class %s in %s does not have java assertions in compiled code, but assertions are enabled for this execution.", kh->internal_name(), _lib->name());
|
||||
sweep_dependent_methods(klass_data);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -93,6 +93,7 @@ public class AotCompiler {
|
||||
}
|
||||
}
|
||||
List<String> args = new ArrayList<>();
|
||||
args.add("--compile-with-assertions");
|
||||
args.add("--output");
|
||||
args.add(libName);
|
||||
if (file != null) {
|
||||
|
||||
@ -44,6 +44,7 @@ public class JaotcTestHelper {
|
||||
for (String vmOpt : Utils.getTestJavaOpts()) {
|
||||
launcher.addVMArg(vmOpt);
|
||||
}
|
||||
launcher.addToolArg("--compile-with-assertions");
|
||||
for (String arg : args) {
|
||||
launcher.addToolArg(arg);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user