Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ public class SubstrateOptions {
if (!Platform.includedIn(Platform.LINUX.class)) {
throw UserError.invalidOptionValue(key, key.getValue(), "Building static executable images is currently only supported on Linux. Remove the '--static' option or build on a Linux machine");
}
if (!LibCBase.targetLibCIs(MuslLibC.class)) {
throw UserError.invalidOptionValue(key, key.getValue(),
"Building static executable images is only supported with musl libc. Remove the '--static' option or add the '--libc=musl' option.");
}
});

@APIOption(name = "libc")//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@
package com.oracle.svm.core.option;

import org.graalvm.collections.UnmodifiableMapCursor;
import jdk.graal.compiler.options.OptionKey;

import com.oracle.svm.core.feature.InternalFeature;
import com.oracle.svm.core.feature.AutomaticallyRegisteredFeature;
import com.oracle.svm.core.feature.InternalFeature;

import jdk.graal.compiler.options.OptionKey;

@AutomaticallyRegisteredFeature
public class ValidateImageBuildOptionsFeature implements InternalFeature {
@Override
public void afterRegistration(AfterRegistrationAccess access) {
public void beforeAnalysis(BeforeAnalysisAccess access) {
UnmodifiableMapCursor<OptionKey<?>, Object> cursor = RuntimeOptionValues.singleton().getMap().getEntries();
while (cursor.advance()) {
validate(cursor.getKey());
Expand Down