mirror of https://github.com/aamine/cbc
r5116@macbookpro: aamine | 2009-06-15 01:05:26 +0900
* net/loveruby/cflat/compiler/Options.java (parseCommaSeparatedOptions): AbstractList does not support #remove. git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4293 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
parent
ee8432d4fa
commit
578e495480
|
|
@ -1,3 +1,9 @@
|
|||
Sun Jun 14 23:44:47 2009 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* net/loveruby/cflat/compiler/Options.java
|
||||
(parseCommaSeparatedOptions): AbstractList does not support
|
||||
#remove.
|
||||
|
||||
Sat Jun 13 22:42:24 2009 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* rename class: AssemblyFile -> AssemblyCode.
|
||||
|
|
|
|||
|
|
@ -312,12 +312,16 @@ class Options {
|
|||
|
||||
/** "-Wl,-rpath,/usr/local/lib" -> ["-rpath", "/usr/local/lib"] */
|
||||
private List<String> parseCommaSeparatedOptions(String opt) {
|
||||
List<String> opts = Arrays.asList(opt.split(","));
|
||||
opts.remove(0); // remove "-Wl" etc.
|
||||
if (opts.isEmpty()) {
|
||||
String[] opts = opt.split(",");
|
||||
if (opts.length <= 1) {
|
||||
parseError("missing argument for " + opt);
|
||||
}
|
||||
return opts;
|
||||
List<String> result = new ArrayList<String>();
|
||||
// move items into result, except first item ("-Wl", etc).
|
||||
for (int i = 1; i < opts.length; i++) {
|
||||
result.add(opts[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void printUsage(PrintStream out) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue