Skip to content

Commit 0028f47

Browse files
committed
[GR-64029] SVM: Must explicitly set optimization level to the default value
PullRequest: graal/20484
2 parents bfa9492 + 3381d09 commit 0028f47

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageClassLoaderSupport.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -324,7 +324,11 @@ private String createOptionStr(HostedOptionKey<AccumulatingLocatableMultiOptionV
324324

325325
public void setupHostedOptionParser(List<String> arguments) {
326326
hostedOptionParser = new HostedOptionParser(getClassLoader(), arguments);
327+
// Explicitly set the default value of Optimize as it can modify the default values of other
328+
// options
329+
SubstrateOptions.Optimize.update(hostedOptionParser.getHostedValues(), SubstrateOptions.Optimize.getDefaultValue());
327330
remainingArguments = Collections.unmodifiableList((hostedOptionParser.parse()));
331+
328332
/*
329333
* The image layer support needs to be configured early to correctly set the
330334
* class-path/module-path options. Note that parsedHostedOptions is a copy-by-value of

0 commit comments

Comments
 (0)