File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
com.oracle.svm.core/src/com/oracle/svm/core/option
com.oracle.svm.driver/src/com/oracle/svm/driver Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 4242public abstract class OptionOrigin {
4343
4444 public static final OptionOrigin commandLineOptionOriginSingleton = new CommandLineOptionOrigin ();
45+ public static final String argFilePrefix = "argfile:" ;
4546
4647 public URI container () {
4748 return null ;
@@ -66,7 +67,7 @@ public List<String> getRedirectionValues(@SuppressWarnings("unused") Path values
6667
6768 public static OptionOrigin from (String origin ) {
6869
69- if (origin == null ) {
70+ if (origin == null || origin . startsWith ( argFilePrefix ) ) {
7071 return commandLineOptionOriginSingleton ;
7172 }
7273
@@ -78,10 +79,6 @@ public static OptionOrigin from(String origin) {
7879 }
7980 throw VMError .shouldNotReachHere ("Unsupported OptionOrigin: " + origin );
8081 }
81- if (originURI .getScheme () == null ) {
82- /* @argument files use path as origin */
83- return commandLineOptionOriginSingleton ;
84- }
8582 switch (originURI .getScheme ()) {
8683 case "jar" :
8784 return new JarOptionOrigin (originURI );
Original file line number Diff line number Diff line change 3636
3737import org .graalvm .compiler .options .OptionType ;
3838
39+ import com .oracle .svm .core .option .OptionOrigin ;
3940import com .oracle .svm .core .option .OptionUtils ;
4041import com .oracle .svm .driver .NativeImage .ArgumentQueue ;
4142
@@ -319,7 +320,7 @@ public boolean consume(ArgumentQueue args) {
319320 args .poll ();
320321 headArg = headArg .substring (1 );
321322 Path argFile = Paths .get (headArg );
322- NativeImage .NativeImageArgsProcessor processor = nativeImage .new NativeImageArgsProcessor (argFile . toString () );
323+ NativeImage .NativeImageArgsProcessor processor = nativeImage .new NativeImageArgsProcessor (OptionOrigin . argFilePrefix + argFile );
323324 readArgFile (argFile ).forEach (processor ::accept );
324325 List <String > leftoverArgs = processor .apply (false );
325326 if (leftoverArgs .size () > 0 ) {
You can’t perform that action at this time.
0 commit comments