5959import com .oracle .svm .core .heap .ReferenceHandler ;
6060import com .oracle .svm .core .option .APIOption ;
6161import com .oracle .svm .core .option .APIOptionGroup ;
62+ import com .oracle .svm .core .option .BundleMember ;
6263import com .oracle .svm .core .option .HostedOptionKey ;
6364import com .oracle .svm .core .option .HostedOptionValues ;
6465import com .oracle .svm .core .option .LocatableMultiOptionValue ;
@@ -80,7 +81,7 @@ public class SubstrateOptions {
8081 @ Option (help = "Preserve the local variable information for every Java source line to allow line-by-line stepping in the debugger. Allow the lookup of Java-level method information, e.g., in stack traces." )//
8182 public static final HostedOptionKey <Boolean > SourceLevelDebug = new HostedOptionKey <>(false );
8283 @ Option (help = "Constrain debug info generation to the comma-separated list of package prefixes given to this option." )//
83- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > SourceLevelDebugFilter = new HostedOptionKey <>(LocatableMultiOptionValue .Strings .commaSeparated ());
84+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > SourceLevelDebugFilter = new HostedOptionKey <>(LocatableMultiOptionValue .Strings .buildWithCommaDelimiter ());
8485
8586 public static boolean parseOnce () {
8687 /*
@@ -267,10 +268,11 @@ public static void setOptimizeValueUpdateHandler(ValueUpdateHandler<Optimization
267268 public static final HostedOptionKey <Boolean > IncludeNodeSourcePositions = new HostedOptionKey <>(false );
268269
269270 @ Option (help = "Search path for C libraries passed to the linker (list of comma-separated directories)" )//
270- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > CLibraryPath = new HostedOptionKey <>(LocatableMultiOptionValue .Strings .commaSeparated ());
271+ @ BundleMember (role = BundleMember .Role .Input )//
272+ public static final HostedOptionKey <LocatableMultiOptionValue .Paths > CLibraryPath = new HostedOptionKey <>(LocatableMultiOptionValue .Paths .buildWithCommaDelimiter ());
271273
272274 @ Option (help = "Path passed to the linker as the -rpath (list of comma-separated directories)" )//
273- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > LinkerRPath = new HostedOptionKey <>(LocatableMultiOptionValue .Strings .commaSeparated ());
275+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > LinkerRPath = new HostedOptionKey <>(LocatableMultiOptionValue .Strings .buildWithCommaDelimiter ());
274276
275277 @ Option (help = "Directory of the image file to be generated" , type = OptionType .User )//
276278 public static final HostedOptionKey <String > Path = new HostedOptionKey <>(null );
@@ -342,11 +344,11 @@ protected void onValueUpdate(EconomicMap<OptionKey<?>, Object> values, Boolean o
342344
343345 @ APIOption (name = "trace-class-initialization" )//
344346 @ Option (help = "Comma-separated list of fully-qualified class names that class initialization is traced for." )//
345- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > TraceClassInitialization = new HostedOptionKey <>(LocatableMultiOptionValue .Strings .commaSeparated ());
347+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > TraceClassInitialization = new HostedOptionKey <>(LocatableMultiOptionValue .Strings .buildWithCommaDelimiter ());
346348
347349 @ APIOption (name = "trace-object-instantiation" )//
348350 @ Option (help = "Comma-separated list of fully-qualified class names that object instantiation is traced for." )//
349- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > TraceObjectInstantiation = new HostedOptionKey <>(LocatableMultiOptionValue .Strings .commaSeparated ());
351+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > TraceObjectInstantiation = new HostedOptionKey <>(LocatableMultiOptionValue .Strings .buildWithCommaDelimiter ());
350352
351353 @ Option (help = "Trace all native tool invocations as part of image building" , type = User )//
352354 public static final HostedOptionKey <Boolean > TraceNativeToolUsage = new HostedOptionKey <>(false );
@@ -361,10 +363,10 @@ protected void onValueUpdate(EconomicMap<OptionKey<?>, Object> values, Boolean o
361363 @ APIOption (name = "enable-https" , fixedValue = "https" , customHelp = "enable https support in the generated image" )//
362364 @ APIOption (name = "enable-url-protocols" )//
363365 @ Option (help = "List of comma separated URL protocols to enable." )//
364- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > EnableURLProtocols = new HostedOptionKey <>(LocatableMultiOptionValue .Strings .commaSeparated ());
366+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > EnableURLProtocols = new HostedOptionKey <>(LocatableMultiOptionValue .Strings .buildWithCommaDelimiter ());
365367
366368 @ Option (help = "List of comma separated URL protocols that must never be included." )//
367- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > DisableURLProtocols = new HostedOptionKey <>(LocatableMultiOptionValue .Strings .commaSeparated ());
369+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > DisableURLProtocols = new HostedOptionKey <>(LocatableMultiOptionValue .Strings .buildWithCommaDelimiter ());
368370
369371 @ SuppressWarnings ("unused" ) //
370372 @ APIOption (name = "enable-all-security-services" )//
@@ -413,10 +415,11 @@ protected void onValueUpdate(EconomicMap<OptionKey<?>, Object> values, Boolean o
413415 @ Option (help = "Print GC warnings as part of build output" , type = OptionType .User )//
414416 public static final HostedOptionKey <Boolean > BuildOutputGCWarnings = new HostedOptionKey <>(true );
415417
418+ @ BundleMember (role = BundleMember .Role .Output )//
416419 @ Option (help = "Print build output statistics as JSON to the specified file. " +
417420 "The output conforms to the JSON schema located at: " +
418421 "docs/reference-manual/native-image/assets/build-output-schema-v0.9.1.json" , type = OptionType .User )//
419- public static final HostedOptionKey <String > BuildOutputJSONFile = new HostedOptionKey <>("" );
422+ public static final HostedOptionKey <LocatableMultiOptionValue . Paths > BuildOutputJSONFile = new HostedOptionKey <>(LocatableMultiOptionValue . Paths . build () );
420423
421424 /*
422425 * Object and array allocation options.
@@ -481,7 +484,7 @@ public static long getTearDownFailureNanos() {
481484 public static final HostedOptionKey <Boolean > AOTTrivialInline = new HostedOptionKey <>(true );
482485
483486 @ Option (help = "file:doc-files/NeverInlineHelp.txt" , type = OptionType .Debug )//
484- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > NeverInline = new HostedOptionKey <>(new LocatableMultiOptionValue .Strings ());
487+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > NeverInline = new HostedOptionKey <>(LocatableMultiOptionValue .Strings . build ());
485488
486489 @ Option (help = "Maximum number of nodes in a method so that it is considered trivial." )//
487490 public static final HostedOptionKey <Integer > MaxNodesInTrivialMethod = new HostedOptionKey <>(20 );
@@ -502,7 +505,7 @@ public static long getTearDownFailureNanos() {
502505 public static final HostedOptionKey <Boolean > UseCompressedFrameEncodings = new HostedOptionKey <>(true );
503506
504507 @ Option (help = "Report error if <typename>[:<UsageKind>{,<UsageKind>}] is discovered during analysis (valid values for UsageKind: InHeap, Allocated, Reachable)." , type = OptionType .Debug )//
505- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > ReportAnalysisForbiddenType = new HostedOptionKey <>(new LocatableMultiOptionValue .Strings ());
508+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > ReportAnalysisForbiddenType = new HostedOptionKey <>(LocatableMultiOptionValue .Strings . build ());
506509
507510 @ Option (help = "Backend used by the compiler" , type = OptionType .User )//
508511 public static final HostedOptionKey <String > CompilerBackend = new HostedOptionKey <>("lir" ) {
@@ -569,7 +572,7 @@ public static boolean useLIRBackend() {
569572 public static final HostedOptionKey <String > CCompilerPath = new HostedOptionKey <>(null );
570573 @ APIOption (name = "native-compiler-options" )//
571574 @ Option (help = "Provide custom C compiler option used for query code compilation." , type = OptionType .User )//
572- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > CCompilerOption = new HostedOptionKey <>(new LocatableMultiOptionValue .Strings ());
575+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > CCompilerOption = new HostedOptionKey <>(LocatableMultiOptionValue .Strings . build ());
573576
574577 @ Option (help = "Use strict checks when performing query code compilation." , type = OptionType .User )//
575578 public static final HostedOptionKey <Boolean > StrictQueryCodeCompilation = new HostedOptionKey <>(true );
@@ -625,7 +628,7 @@ protected void onValueUpdate(EconomicMap<OptionKey<?>, Object> values, Integer o
625628 };
626629
627630 @ Option (help = "Search path for source files for Application or GraalVM classes (list of comma-separated directories or jar files)" )//
628- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > DebugInfoSourceSearchPath = new HostedOptionKey <>(LocatableMultiOptionValue .Strings . commaSeparated ());
631+ public static final HostedOptionKey <LocatableMultiOptionValue .Paths > DebugInfoSourceSearchPath = new HostedOptionKey <>(LocatableMultiOptionValue .Paths . buildWithCommaDelimiter ());
629632
630633 @ Option (help = "Directory under which to create source file cache for Application or GraalVM classes" )//
631634 public static final HostedOptionKey <String > DebugInfoSourceCacheRoot = new HostedOptionKey <>("sources" );
0 commit comments